Previous Thread
Next Thread
Print Thread
Joined: Mar 2004
Posts: 656
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 656
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.
Joined: Mar 2001
Posts: 16,614
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,614
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.

Joined: Feb 2004
Posts: 2,194
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,194
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.

Joined: Mar 2004
Posts: 656
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 656
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

Joined: Mar 2008
Posts: 154
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
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
Joined: Jan 2012
Posts: 848
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 848
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.

Joined: Mar 2008
Posts: 154
Senior Member
Offline
Senior Member
Joined: Mar 2008
Posts: 154
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
Joined: Mar 2004
Posts: 656
Senior Member
OP Offline
Senior Member
Joined: Mar 2004
Posts: 656
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

Joined: Jan 2012
Posts: 848
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 848
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 

Link Copied to Clipboard
Who's Online Now
2 members (judge, Pernod), 43 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,837
Posts116,231
Members4,921
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.5