compile error with llvm on 32-bit Ubuntu (llvm 2.6.0) #86

Closed
flavorjones opened this Issue Nov 23, 2009 · 5 comments

Comments

Projects
None yet
6 participants
@flavorjones
  1. find an x86 (32-bit) Ubuntu Jaunty machine

  2. sudo apt-get install llvm

  3. llvm-config --version => 2.6

  4. clone rubinius

  5. ./configure --enable-llvm

    Using LLVM: auto
      Checking for existing LLVM tree: found!
    Checking for function 'backtrace': found!
    
  6. rake build

  7. wait

  8. see the following error:

    gcc -Ivm/external_libs/libtommath -Ivm/external_libs/libgdtoa -Ivm/external_libs/onig -Ivm/external_libs/libffi/include -Ivm/external_libs/libbstring -Ivm/external_libs/libcchash -Ivm/external_libs/libmquark -Ivm/external_libs/libptr_array -Ivm/external_libs/libltdl -Ivm/external_libs/libev -Ivm/test/cxxtest -Ivm -I. -Ivm/assembler -Ivm/assembler/udis86-1.7 -pipe -Wall -Wno-deprecated -DBASE_PATH=\"/home/mike/code/rubinius\" -DRBA_PATH=\"/home/mike/code/rubinius/runtime\" -DENABLE_LLVM -DHAS_EXECINFO -DRBX_HOST=\"i686-pc-linux-gnu\" -ggdb3 -O2 -Werror -DRBX_PROFILER -Ivm/external_libs/llvm/include -c -o vm/vmmethod.o vm/vmmethod.cpp 2>&1
    In file included from /usr/include/llvm/Support/PointerLikeTypeTraits.h:18,
                     from /usr/include/llvm/ADT/PointerIntPair.h:17,
                     from /usr/include/llvm/Use.h:30,
                     from /usr/include/llvm/Value.h:18,
                     from /usr/include/llvm/User.h:22,
                     from /usr/include/llvm/Constant.h:17,
                     from /usr/include/llvm/GlobalValue.h:21,
                     from /usr/include/llvm/Function.h:21,
                     from /usr/include/llvm/Module.h:18,
                     from vm/llvm/jit.hpp:7,
                     from vm/vmmethod.cpp:32:
    /usr/include/llvm/Support/DataTypes.h:47:3: error: #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
    /usr/include/llvm/Support/DataTypes.h:51:3: error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
    In file included from /usr/include/llvm/Attributes.h:18,
                     from /usr/include/llvm/Argument.h:18,
                     from /usr/include/llvm/Function.h:23,
                     from /usr/include/llvm/Module.h:18,
                     from vm/llvm/jit.hpp:7,
                     from vm/vmmethod.cpp:32:
    /usr/include/llvm/Support/MathExtras.h: In function ‘bool llvm::isInt(int64_t)’:
    /usr/include/llvm/Support/MathExtras.h:57: error: there are no arguments to ‘INT64_C’ that depend on a template parameter, so a declaration of ‘INT64_C’ must be available
    /usr/include/llvm/Support/MathExtras.h:57: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
    /usr/include/llvm/Support/MathExtras.h:57: error: there are no arguments to ‘INT64_C’ that depend on a template parameter, so a declaration of ‘INT64_C’ must be available
    /usr/include/llvm/Support/MathExtras.h: In function ‘bool llvm::isUint(uint64_t)’:
    /usr/include/llvm/Support/MathExtras.h:62: error: there are no arguments to ‘UINT64_C’ that depend on a template parameter, so a declaration of ‘UINT64_C’ must be available
    rake aborted!
    Command failed with status (1): [gcc -Ivm/external_libs/libtommath -Ivm/ext...]
    
    (See full trace by running task with --trace)
    
@bernd

This comment has been minimized.

Show comment
Hide comment
@bernd

bernd Nov 26, 2009

I got the same error on ubuntu 9.10 (karmic) with the llvm package. I removed the ubuntu llvm package and the rubinius build downloaded a pre-built llvm from the rubinius page. That worked.

bernd commented Nov 26, 2009

I got the same error on ubuntu 9.10 (karmic) with the llvm package. I removed the ubuntu llvm package and the rubinius build downloaded a pre-built llvm from the rubinius page. That worked.

@rubiojr

This comment has been minimized.

Show comment
Hide comment
@rubiojr

rubiojr Nov 27, 2009

build failed also in RHEL5:

[[Bvm/instruments/profiler.hpp:26: error: redefinition of 'struct std::tr1::hash'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional:1123: error: previous definition of 'struct std::tr1::hash'
rake aborted!
Command failed with status (1): [gcc -Ivm/external_libs/libtommath -Ivm/ext...]

rubiojr commented Nov 27, 2009

build failed also in RHEL5:

[[Bvm/instruments/profiler.hpp:26: error: redefinition of 'struct std::tr1::hash'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional:1123: error: previous definition of 'struct std::tr1::hash'
rake aborted!
Command failed with status (1): [gcc -Ivm/external_libs/libtommath -Ivm/ext...]

@evanphx

This comment has been minimized.

Show comment
Hide comment
@evanphx

evanphx Nov 29, 2009

Member

Hm, ok. Looks like we'll need to do a little work to get things compiling against g++ 4.1.

Member

evanphx commented Nov 29, 2009

Hm, ok. Looks like we'll need to do a little work to get things compiling against g++ 4.1.

@vito

This comment has been minimized.

Show comment
Hide comment
@vito

vito Jan 10, 2010

Contributor

Same problem here. Arch Linux x86_64. g++ v4.4.2, llvm 2.6-6.

Contributor

vito commented Jan 10, 2010

Same problem here. Arch Linux x86_64. g++ v4.4.2, llvm 2.6-6.

@dbussink

This comment has been minimized.

Show comment
Hide comment
@dbussink

dbussink Feb 7, 2010

Member

This isn't related to the 4.1 issue, but using system provided llvm. This was fixed in 5531a56 so closing this one

Member

dbussink commented Feb 7, 2010

This isn't related to the 4.1 issue, but using system provided llvm. This was fixed in 5531a56 so closing this one

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment