llvm fails to get built in mxe-octave

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

llvm fails to get built in mxe-octave

PhilipNienhuis
Hi,

When starting a completely new fresh mxe-octave build, building llvm gets
stuck in the last stages. Excerpt from build log below. I see a long list of
errors about "too many open files".

What can I do to get llvm cross-built?

:
[ 98%] Building CXX object
lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86CallingConv.cpp.obj
[ 98%] Linking CXX static library ../../libLLVMX86CodeGen.a
make[4]: Leaving directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
[ 98%] Built target LLVMX86CodeGen
make[4]: Entering directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
Scanning dependencies of target LLVM
make[4]: Leaving directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
make[4]: Entering directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
[ 98%] Building CXX object
tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.obj
[100%] Linking CXX shared library ../../bin/LLVM.dll
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find ../../lib/libLLVMExecutionEngine.a: Too many open files
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find ../../lib/libLLVMInterpreter.a: Too many open files
:
     <snipped long list of similar messages>
:
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find ../../lib/libLLVMSupport.a: Too many open files
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find ../../lib/libLLVMDemangle.a: Too many open files
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find -lz
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find -lpsapi
:
     <snipped another long list of similar messages>
:
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find -lmsvcrt
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/bin/x86_64-w64-mingw32-ld:
cannot find
/home/philip/devel/octdev/mxe/mxe_64b20190321/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/crtend.o:
Too many open files
collect2: error: ld returned 1 exit status
tools/llvm-shlib/CMakeFiles/LLVM.dir/build.make:179: recipe for target
'bin/LLVM.dll' failed
make[4]: *** [bin/LLVM.dll] Error 1
make[4]: Leaving directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
CMakeFiles/Makefile2:11566: recipe for target
'tools/llvm-shlib/CMakeFiles/LLVM.dir/all' failed
make[3]: *** [tools/llvm-shlib/CMakeFiles/LLVM.dir/all] Error 2
make[3]: Leaving directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
Makefile:151: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/philip/devel/octdev/mxe/mxe_64b20190321/tmp-llvm/llvm-6.0.1.src/.build'
/home/philip/devel/octdev/mxe/mxe_64b20190321/Makefile:934: recipe for
target 'build-only-llvm' failed
make[1]: *** [build-only-llvm] Error 2
make[1]: Leaving directory '/home/philip/devel/octdev/mxe/mxe_64b20190321'


Philip




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: llvm fails to get built in mxe-octave

John Donoghue-3
On 3/23/19 7:09 AM, [hidden email] wrote:
> When starting a completely new fresh mxe-octave build, building llvm gets
> stuck in the last stages. Excerpt from build log below. I see a long list of
> errors about "too many open files".

Are running make JOBS=X ? If so, try a smaller X number


Reply | Threaded
Open this post in threaded view
|

Re: llvm fails to get built in mxe-octave

John W. Eaton
Administrator
In reply to this post by PhilipNienhuis
On 3/23/19 6:09 AM, PhilipNienhuis wrote:
> Hi,
>
> When starting a completely new fresh mxe-octave build, building llvm gets
> stuck in the last stages. Excerpt from build log below. I see a long list of
> errors about "too many open files".
>
> What can I do to get llvm cross-built?

What do

   ulimit -n
   ulimit -Hn

say?  On Debian systems the soft limit appears to be 1024 by default.
That's apparently too low now for building llvm, so try increasing it.

   ulimit -n 4096

The procedure for setting the default value may vary by system.  On
Debian sytsems, edit /etc/sysctl.conf and add/change the value for

   fs.file-max=4096

The value should change on the next system restart.

I did this for the buildbot systems that are doing Windows builds
because we were having the same problem there.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: llvm fails to get built in mxe-octave

PhilipNienhuis
John W. Eaton wrote

> On 3/23/19 6:09 AM, PhilipNienhuis wrote:
>> Hi,
>>
>> When starting a completely new fresh mxe-octave build, building llvm gets
>> stuck in the last stages. Excerpt from build log below. I see a long list
>> of
>> errors about "too many open files".
>>
>> What can I do to get llvm cross-built?
>
> What do
>
>    ulimit -n
>    ulimit -Hn

1024 & 4096, resp.


> say?  On Debian systems the soft limit appears to be 1024 by default.
> That's apparently too low now for building llvm, so try increasing it.
>
>    ulimit -n 4096

Thanks, I've set it to 2048 that way and that was enough to get past llvm.

Setting X to 1 in the JOBS=X setting for make-nsis-installer made no
difference.

That llvm issue must be a recent change as a mxe build tree freshly cloned
in January ran w/o trouble.


> The procedure for setting the default value may vary by system.  On
> Debian sytsems, edit /etc/sysctl.conf and add/change the value for
>
>    fs.file-max=4096
>
> The value should change on the next system restart.

My Mageia 6 system didn't accept that, with that addition it never got past
the login screen, and with ridiculously high values for fn.file-max (65336)
"ulimit -n" stubbornly reported 1024.
Removing the fn.file-max line in /etc/sysctl.conf restored the login
process.
Anyway that's another issue, My immediate problem is solved.

Thanks all,

Philip



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html