Previous Thread
Next Thread
Print Thread
#109841 - 06/07/17 06:24 PM memory exhausted when building Fedora RPM on i686  
Joined: Mar 2004
Posts: 604
belegdol Offline
Senior Member
belegdol  Offline
Senior Member

Joined: Mar 2004
Posts: 604
Switzerland
Hello,

I have experienced memory exhaustion when trying to build my RPMs updated to 0.186 on i686:
Code
Compiling src/mame/drivers/bfm_sc4.cpp...
g++    -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DNATIVE_DRC=drcbe_x86 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I../../../../../src/osd -I../../../../../src/emu -I../../../../../src/devices -I../../../../../src/mame -I../../../../../src/lib -I../../../../../src/lib/util -I../../../../../src/lib/netlist -I../../../../../3rdparty -I../../../../generated/mame/layout -I../../../../../scripts   -m32 -pipe -Wno-deprecated-declarations -O2 -fno-strict-aliasing -O2 -g1 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-unused-result -Wno-array-bounds -m32 -x c++ -std=c++14 -Woverloaded-virtual -Wsuggest-override -flifetime-dse=1 -include ../../../../linux_gcc/obj/x32/Release/emu.h -o "../../../../linux_gcc/obj/x32/Release/src/mame/drivers/bfm_sc4.o" -c "../../../../../src/mame/drivers/bfm_sc4.cpp"
bfm.make:421: recipe for target '../../../../linux_gcc/obj/x32/Release/src/mame/drivers/bfm_sc4.o' failed
virtual memory exhausted: Operation not permitted
make[2]: *** [../../../../linux_gcc/obj/x32/Release/src/mame/drivers/bfm_sc4.o] Error 1

I was advised to reduce debuginfo size (already at -g1), but it made me wonder - is there any point of building mame on i686 these days anyway? Thanks for the feedback!

Last edited by belegdol; 06/07/17 06:30 PM.
#109843 - 06/07/17 07:26 PM Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol]  
Joined: Mar 2001
Posts: 15,658
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,658
USA
MAMEdev doesn't have formal guidance yet on this, but my feeling is that we'll probably declare 32-bit dead in the next 6 months or so. There aren't a ton of users and it's an increasingly outsized strain on the build process.

#109844 - 06/08/17 01:38 AM Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol]  
Joined: Feb 2004
Posts: 1,802
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,802
Sydney, Australia
You can cross-compile for 32-bit using a 64-bit compiler with the -m32 flag, but you can't compile with a 32-bit compiler. If you're using a 32-bit chroot, you're probably screwed.

#109846 - 06/08/17 06:04 AM Re: memory exhausted when building Fedora RPM on i686 [Re: Vas Crabb]  
Joined: Mar 2004
Posts: 604
belegdol Offline
Senior Member
belegdol  Offline
Senior Member

Joined: Mar 2004
Posts: 604
Switzerland
Originally Posted by Vas Crabb
You can cross-compile for 32-bit using a 64-bit compiler with the -m32 flag, but you can't compile with a 32-bit compiler. If you're using a 32-bit chroot, you're probably screwed.

This is unfortunately not going to work for RPM building, the packages must build natively [1]:
Quote
All builds have to happen in a native environment. this means cross compiling is not allowed, you can however use virtualisation to emulate your target system.

[1] http://fedoraproject.org/wiki/Architectures#Buildsystems

#109902 - 06/13/17 08:47 PM Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol]  
Joined: Mar 2008
Posts: 150
wallyweek Offline
Senior Member
wallyweek  Offline
Senior Member

Joined: Mar 2008
Posts: 150
Italy
Same issue on Ubuntu, I've been pointed to excessive size of source files failing to build:

Code
virtual memory exhausted: Operation not permitted
bfm.make:421: recipe for target 'obj/Release/src/mame/drivers/bfm_sc4.o' failed

virtual memory exhausted: Operation not permitted
barcrest.make:351: recipe for target 'obj/Release/src/mame/drivers/mpu4.o' failed

virtual memory exhausted: Operation not permitted
bfm.make:425: recipe for target 'obj/Release/src/mame/drivers/bfm_sc5.o' failed


Do you reckon lowering optimization level could help?

Please find the bug I reported here:
https://bugs.launchpad.net/launchpad-buildd/+bug/1695903

Full building log available here:
https://launchpadlibrarian.net/3225...mame_0.186-1~ppa1~zesty1_BUILDING.txt.gz


Master of Sarcastic Wit
Linux User #182984
#109904 - 06/14/17 03:28 AM Re: memory exhausted when building Fedora RPM on i686 [Re: wallyweek]  
Joined: Jan 2012
Posts: 669
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 669
You're still removing linenoise? I replaced linenoise-ng so we don't have convertutf.c after someone complained that the console wasn't working in the debian package. I hoped you/they would remove that patch.

#109935 - 06/18/17 07:09 PM Re: memory exhausted when building Fedora RPM on i686 [Re: crazyc]  
Joined: Mar 2008
Posts: 150
wallyweek Offline
Senior Member
wallyweek  Offline
Senior Member

Joined: Mar 2008
Posts: 150
Italy
Originally Posted by crazyc
You're still removing linenoise? I replaced linenoise-ng so we don't have convertutf.c after someone complained that the console wasn't working in the debian package. I hoped you/they would remove that patch.

It's a licence matter AFAIK, I'll ask Jordi (Debian maintainer and author of the patch) if it's gone now.

Unapplying it won't help anyway, I had to remove optimization in order to have code built for i386.


Master of Sarcastic Wit
Linux User #182984
#110014 - 06/28/17 06:01 AM Re: memory exhausted when building Fedora RPM on i686 [Re: crazyc]  
Joined: Mar 2004
Posts: 604
belegdol Offline
Senior Member
belegdol  Offline
Senior Member

Joined: Mar 2004
Posts: 604
Switzerland
Originally Posted by crazyc
You're still removing linenoise? I replaced linenoise-ng so we don't have convertutf.c after someone complained that the console wasn't working in the debian package. I hoped you/they would remove that patch.

Which linenoise fork are you using? I tried to use system linenoise on Fedora, but it did not work. Fedora seems to use https://github.com/tadmarshall/linenoise

#110075 - 06/30/17 03:25 PM Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol]  
Joined: Jan 2012
Posts: 669
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 669
I used https://github.com/msteveb/linenoise which appears to be close to that one but I made some customizations to make it more like linenoise-ng so there aren't major changes from a user persective (specifically preloadbuffer which would prevent system linenoise from working).


Moderated by  R. Belmont 

Who's Online Now
2 registered members (Justin, 1 invisible), 20 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,389
Posts108,532
Members4,750
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.028s Queries: 14 (0.007s) Memory: 4.9985 MB (Peak: 5.2135 MB) Zlib enabled. Server Time: 2017-07-28 18:52:31 UTC