[LLVMdev] Can't get llvmg++ to work
Jeff Cohen
jeffc at jolt-lang.org
Thu Aug 19 08:54:57 PDT 2004
On Thu, 19 Aug 2004 08:45:23 -0700
Reid Spencer <reid at x10sys.com> wrote:
> > 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
>
> Ah, yeah, that would do it. You have an error making the C Runtime
> library. The C Runtime library contains the definition of "stdout" which
> is what lli complained about above. You need to make sure that you can
> completely build and install the runtime directory or stuff like this
> will happen. As for the specific error, I'm not sure as I haven't BSD'd
> in a long while. Obviously you need to look at
> /usr/include/machine/_types.h:88 and figure out if you can fix it
> without breaking the rest of your system. What gcc version are you
> using?
>
> Also, as a general note, make sure you follow precisely the steps for
> building the c front end. If you discover any BSDisms that aren't
> documented, we'd love to hear about them.
>
> Thanks,
>
> Reid.
I didn't build cfontend; I used the prebuilt linux binaries. That could be part of the problem.
Here's the line in error in _types.h:
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
>> typedef __uint32_t __size_t; /* sizeof() */
typedef __int32_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
Seems perfectly reasonable. The other error was a missing file features.h. I am indeed missing this file; it's probably linux specific.
It seems my best bet is to try and build the front end myself. I'm using gcc 3.3.3.
More information about the llvm-dev
mailing list