Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12907 closed bug (no change required)

compiling llvm with GCC 5.4.0

Reported by: Eddy Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All



When compiling llvm under Haiku (gcc2 hybrid and x64), I have the following error.

/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/5.4.0/../../../../i586-pc-haiku/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: error: ld returned 1 exit status tools/lto/CMakeFiles/LTO.dir/build.make:254: recipe for target 'lib/' failed make[2]: * [lib/] Error 1 CMakeFiles/Makefile2:12990: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed make[1]: * [tools/lto/CMakeFiles/LTO.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: * [all] Error 2

Change History (6)

comment:1 by korli, 5 years ago

Resolution: no change required
Status: newclosed

Seems memory is lacking: *check your virtual memory settings (at least 2GB virtual memory) *when in a VM check it has enough memory (ie 2GB physical RAM) *check the build doesn't happen with too many jobs (-j argument ie -j2).

Unless I'm mistaken, this doesn't require a change to Haiku.

comment:2 by Eddy, 5 years ago

I tried on two different images. Supported gcc2 hybrid with 4GB of memory. Unsupported gcc_64 with 4GB and 8GB of ram. My system has 32GB of RAM. Virtual memory is set to 1.92GB.

comment:3 by korli, 5 years ago

It seems correct. Anyway LLVM built successfully on both platforms as early as tonight:

Did you try to build llvm with haikuporter?

comment:4 by Eddy, 5 years ago

No, I am trying to compile the current svn repository. A mistake with pthread was already found so the guys from the llvm project will modify their cmake script (the modification they asked me to do is working). libcxx and lldb do not compile but I will investigate this later. Right now it failed around 59% of the complete compiling process. I do not know if this is coming from llvm, gcc 5.4.0, our version of gcc 5.4.0 or Haiku.

Last edited 5 years ago by pulkomandy (previous) (diff)

comment:5 by korli, 5 years ago

Well, trying to build any project from trunk won't get you much support...

Please try with haikuporter, here is the trunk recipe (revision mid April, this was known to work back then).

comment:6 by nielx, 4 years ago

I have the same issue with compiling the llvm source that is bundled with Rust 1.11.0. See

Only on the gcc2 hybrid, not on x86_64. I will try to use haikuporter with the 3.8.1 recipe, to see whether that works.

*Update:* The issue is actually different in that ld crashes (segfaults), it does not run out of memory. So this might be a different issue after all.

Last edited 4 years ago by nielx (previous) (diff)
Note: See TracTickets for help on using tickets.