Previous Thread
Next Thread
Print Thread
memory exhausted when building Fedora RPM on i686 #109841
06/07/17 06:24 PM
06/07/17 06:24 PM
Joined: Mar 2004
Posts: 608
Switzerland
belegdol Offline OP
Senior Member
belegdol  Offline OP
Senior Member
Joined: Mar 2004
Posts: 608
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.
Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol] #109843
06/07/17 07:26 PM
06/07/17 07:26 PM
Joined: Mar 2001
Posts: 16,007
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,007
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.

Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol] #109844
06/08/17 01:38 AM
06/08/17 01:38 AM
Joined: Feb 2004
Posts: 1,986
Sydney, Australia
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member
Joined: Feb 2004
Posts: 1,986
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.

Re: memory exhausted when building Fedora RPM on i686 [Re: Vas Crabb] #109846
06/08/17 06:04 AM
06/08/17 06:04 AM
Joined: Mar 2004
Posts: 608
Switzerland
belegdol Offline OP
Senior Member
belegdol  Offline OP
Senior Member
Joined: Mar 2004
Posts: 608
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

Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol] #109902
06/13/17 08:47 PM
06/13/17 08:47 PM
Joined: Mar 2008
Posts: 152
Italy
wallyweek Offline
Senior Member
wallyweek  Offline
Senior Member
Joined: Mar 2008
Posts: 152
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
Re: memory exhausted when building Fedora RPM on i686 [Re: wallyweek] #109904
06/14/17 03:28 AM
06/14/17 03:28 AM
Joined: Jan 2012
Posts: 783
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 783
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.

Re: memory exhausted when building Fedora RPM on i686 [Re: crazyc] #109935
06/18/17 07:09 PM
06/18/17 07:09 PM
Joined: Mar 2008
Posts: 152
Italy
wallyweek Offline
Senior Member
wallyweek  Offline
Senior Member
Joined: Mar 2008
Posts: 152
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
Re: memory exhausted when building Fedora RPM on i686 [Re: crazyc] #110014
06/28/17 06:01 AM
06/28/17 06:01 AM
Joined: Mar 2004
Posts: 608
Switzerland
belegdol Offline OP
Senior Member
belegdol  Offline OP
Senior Member
Joined: Mar 2004
Posts: 608
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

Re: memory exhausted when building Fedora RPM on i686 [Re: belegdol] #110075
06/30/17 03:25 PM
06/30/17 03:25 PM
Joined: Jan 2012
Posts: 783
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 783
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
0 registered members (), 79 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,575
Posts112,038
Members4,812
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.028s Queries: 14 (0.012s) Memory: 5.6562 MB (Peak: 5.8671 MB) Zlib enabled. Server Time: 2018-09-24 02:00:50 UTC