[LLVMdev] Can't get llvmg++ to work

Jeff Cohen jeffc at jolt-lang.org
Wed Aug 18 22:14:20 PDT 2004


I'm another new person to LLVM.  I can't successfully compile and
execute a simple C++ program.  The compiler seems to work, as it
produces a.out and a.out.bc files, but I get a whole bunch of warnings:

WARNING: Found global types that are not compatible:
         "struct.std::messages<wchar_t>"* %_ZN9__gnu_cxx10messages_cE
         [16 x sbyte]* %_ZN9__gnu_cxx10messages_cE
WARNING: Found global types that are not compatible:
         "struct.std::messages<wchar_t>"* %_ZN9__gnu_cxx10messages_wE
         [16 x sbyte]* %_ZN9__gnu_cxx10messages_wE
WARNING: Found global types that are not compatible:
         "struct.std::numpunct<char>"* %_ZN9__gnu_cxx10numpunct_cE
         [12 x sbyte]* %_ZN9__gnu_cxx10numpunct_cE
WARNING: Found global types that are not compatible:
         "struct.std::numpunct<wchar_t>"* %_ZN9__gnu_cxx10numpunct_wE
         [12 x sbyte]* %_ZN9__gnu_cxx10numpunct_wE
WARNING: Found global types that are not compatible:
         "struct.std::__codecvt_abstract_base<wchar_t,char,__mbstate_t>"* %_ZN9__gnu_cxx10time_get_cE
         [8 x sbyte]* %_ZN9__gnu_cxx10time_get_cE
WARNING: Found global types that are not compatible:
         "struct.std::__codecvt_abstract_base<wchar_t,char,__mbstate_t>"* %_ZN9__gnu_cxx10time_get_wE
         [8 x sbyte]* %_ZN9__gnu_cxx10time_get_wE
WARNING: Found global types that are not compatible:
         "struct.std::__codecvt_abstract_base<wchar_t,char,__mbstate_t>"* %_ZN9__gnu_cxx10time_put_cE
         [8 x sbyte]* %_ZN9__gnu_cxx10time_put_cE
WARNING: Found global types that are not compatible:
         "struct.std::__codecvt_abstract_base<wchar_t,char,__mbstate_t>"* %_ZN9__gnu_cxx10time_put_wE
         [8 x sbyte]* %_ZN9__gnu_cxx10time_put_wE

and many many more like this.  Then when I try to run a.out:

Could not resolve external global address: stdout
Abort (core dumped)

I'm running FreeBSD 5.2.1 with gcc 3.3.3.  I had some problem starting
the build as I had to get linux binary emulation to work.  (The problem
here is that FreeBSD can be made compatible with 5 different distros,
and not all of them work with LLVM.  I used linux_base-8; linux_base-6
did not work.)  I did have some build errors, which look like they may
be relevant:

gmake[3]: Entering directory `/usr/home/llvm/obj/runtime/GCCLibraries/crtend'
Compiling crtend.c to bytecode
Compiling listend.ll to bytecode
Linking comp_main.bc component...
Compiling Exception.cpp to bytecode
Linking comp_genericeh.bc component...
Compiling SJLJ-Exception.cpp to bytecode
In file included from /usr/home/llvm/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../include/c++/3.4-llvm/i686-pc-linux-gnu/bits/c++config.h:35,
                 from /usr/home/llvm/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../include/c++/3.4-llvm/cstdlib:49,
                 from /usr/home/llvm/obj/../runtime/GCCLibraries/crtend/SJLJ-Exception.cpp:16:
/usr/home/llvm/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../include/c++/3.4-llvm/i686-pc-linux-gnu/bits/os_defines.h:39:22: features.h: No such file or directory
In file included from /usr/include/sys/_types.h:33,
                 from /usr/include/stdlib.h:42,
                 from /usr/home/llvm/cfrontend/x86/llvm-gcc/bin/../lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../../../include/c++/3.4-llvm/cstdlib:52,
                 from /usr/home/llvm/obj/../runtime/GCCLibraries/crtend/SJLJ-Exception.cpp:16:
/usr/include/machine/_types.h:88: error: declaration does not declare anything
gmake[3]: *** [/usr/home/llvm/obj/runtime/GCCLibraries/crtend/BytecodeObj/SJLJ-Exception.bc] Error 1
gmake[3]: Target `all' not remade because of errors.
gmake[3]: Leaving directory `/usr/home/llvm/obj/runtime/GCCLibraries/crtend'
gmake[2]: *** [crtend/.makeall] Error 2




More information about the llvm-dev mailing list