Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1094103 - tolua++ segfault while building stratagus (x86 only, x86_64 looks good)
Summary: tolua++ segfault while building stratagus (x86 only, x86_64 looks good)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tolua++
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 993385 1107379
TreeView+ depends on / blocked
 
Reported: 2014-05-05 05:36 UTC by Filipe Rosset
Modified: 2014-06-16 17:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-16 17:44:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Filipe Rosset 2014-05-05 05:36:30 UTC
tolua++ segfault while building stratagus (x86 only, x86_64 looks good)

Maybe it's related w/ https://bugzilla.redhat.com/show_bug.cgi?id=994468

SRPM to reproduce the issue (through koji or mock) here: http://filiperosset.fedorapeople.org/rawhide/stratagus/stratagus-2.2.7-3.fc21.src.rpm


failed Koji build attempt:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6813102


http://kojipkgs.fedoraproject.org//work/tasks/3105/6813105/build.log (x86) ERROR
[  1%] Generating tolua.cpp
cd /builddir/build/BUILD/stratagus_2.2.7.orig/src/tolua && /usr/bin/tolua++ -L stratagus.lua -o /builddir/build/BUILD/stratagus_2.2.7.orig/build/tolua.cpp stratagus.pkg
[  1%] Building CXX object CMakeFiles/metaserver.dir/metaserver/cmd.cpp.o
/usr/bin/c++   -DHAVE_STRCASESTR -DHAVE_STRNLEN -DHAVE_X11 -DPIXMAPS=\"/usr/share/pixmaps\" -DUSE_BZ2LIB -DUSE_MIKMOD -DUSE_MNG -DUSE_OPENGL -DUSE_THEORA -DUSE_VORBIS -DUSE_ZLIB -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -fsigned-char -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include/guichan -I/usr/include/lua-5.1 -I/usr/include/SDL    -o CMakeFiles/metaserver.dir/metaserver/cmd.cpp.o -c /builddir/build/BUILD/stratagus_2.2.7.orig/metaserver/cmd.cpp
Building CXX object CMakeFiles/metaserver.dir/metaserver/db.cpp.o
/usr/bin/c++   -DHAVE_STRCASESTR -DHAVE_STRNLEN -DHAVE_X11 -DPIXMAPS=\"/usr/share/pixmaps\" -DUSE_BZ2LIB -DUSE_MIKMOD -DUSE_MNG -DUSE_OPENGL -DUSE_THEORA -DUSE_VORBIS -DUSE_ZLIB -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -fsigned-char -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include/guichan -I/usr/include/lua-5.1 -I/usr/include/SDL    -o CMakeFiles/metaserver.dir/metaserver/db.cpp.o -c /builddir/build/BUILD/stratagus_2.2.7.orig/metaserver/db.cpp
/bin/sh: line 1: 18566 Segmentation fault      /usr/bin/tolua++ -L stratagus.lua -o /builddir/build/BUILD/stratagus_2.2.7.orig/build/tolua.cpp stratagus.pkg
make[2]: *** [tolua.cpp] Error 139
make[2]: Leaving directory `/builddir/build/BUILD/stratagus_2.2.7.orig/build'
make[1]: *** [CMakeFiles/stratagus.dir/all] Error 2



http://kojipkgs.fedoraproject.org//work/tasks/3104/6813104/build.log (x86_86) - FINE
Generating tolua.cpp
cd /builddir/build/BUILD/stratagus_2.2.7.orig/src/tolua && /usr/bin/tolua++ -L stratagus.lua -o /builddir/build/BUILD/stratagus_2.2.7.orig/build/tolua.cpp stratagus.pkg
[  1%] [  1%] Building CXX object CMakeFiles/metaserver.dir/metaserver/cmd.cpp.o
/usr/bin/c++   -DHAVE_STRCASESTR -DHAVE_STRNLEN -DHAVE_X11 -DPIXMAPS=\"/usr/share/pixmaps\" -DUSE_BZ2LIB -DUSE_MIKMOD -DUSE_MNG -DUSE_OPENGL -DUSE_THEORA -DUSE_VORBIS -DUSE_ZLIB -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -fsigned-char -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include/guichan -I/usr/include/lua-5.1 -I/usr/include/SDL    -o CMakeFiles/metaserver.dir/metaserver/cmd.cpp.o -c /builddir/build/BUILD/stratagus_2.2.7.orig/metaserver/cmd.cpp
Building CXX object CMakeFiles/metaserver.dir/metaserver/db.cpp.o
/usr/bin/c++   -DHAVE_STRCASESTR -DHAVE_STRNLEN -DHAVE_X11 -DPIXMAPS=\"/usr/share/pixmaps\" -DUSE_BZ2LIB -DUSE_MIKMOD -DUSE_MNG -DUSE_OPENGL -DUSE_THEORA -DUSE_VORBIS -DUSE_ZLIB -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic  -fsigned-char -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include -I/builddir/build/BUILD/stratagus_2.2.7.orig/src/guichan/include/guichan -I/usr/include/lua-5.1 -I/usr/include/SDL    -o CMakeFiles/metaserver.dir/metaserver/db.cpp.o -c /builddir/build/BUILD/stratagus_2.2.7.orig/metaserver/db.cpp
/usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/stratagus_2.2.7.orig/build/CMakeFiles 1
[  2%] Building CXX object CMakeFiles/metaserver.dir/metaserver/games.cpp.o

Comment 1 Tim Niemueller 2014-05-06 11:06:17 UTC
Seems you are building with Lua 5.2. I haven't tried that here, I'm still using lua-compat for our stuff. Would that even be an option for stratagus?

Comment 2 Hans de Goede 2014-05-06 12:35:46 UTC
Hi All,

Tim is right for tolua++ using projects you must use compat-lua51, tolua++ was never ported to 5.2, there is an upstream mail-thread about it here: http://lua-users.org/lists/lua-l/2013-01/msg00352.html

Note that that is about a never finished port, so for now we're stuck with using compat-lua51. As for the tolua++ segfault itself, that sounds a lot like an arm issue I fixed a while back:

* Fri Aug 09 2013 Hans de Goede <hdegoede> - 1.0.93-10
- Use the pre-generated toluabind.c on non x86, as something goes wrong
  when re-generating it (bootstrap) on non x86. This fixes tolua++
  segfaulting on arm, and hopefully also on ppc (rhbz#704372)

So maybe with a recent gcc / lua we just get bad code for 32 bit platforms when re-generating the toluabind.c file and we should stop doing that all together ?

Regards,

Hans

Comment 3 Filipe Rosset 2014-05-15 20:34:19 UTC
Hi guys, I'm building with lua5.1 (tolua++ tolua++-devel and compat-lua-devel), but still reaching this issue.

Hans, there are any chance to build tolua for x86 in the same way we're doing for arm?

Regards,
Filipe R.

Comment 4 Hans de Goede 2014-05-16 07:18:00 UTC
Hi,

(In reply to Filipe Rosset from comment #3)
> Hi guys, I'm building with lua5.1 (tolua++ tolua++-devel and
> compat-lua-devel), but still reaching this issue.
> 
> Hans, there are any chance to build tolua for x86 in the same way we're
> doing for arm?

If you can do a local build like that, and then confirm that it helps, yes that can be done, but first I would like to know if it actually helps :)

Regards,

Hans

Comment 5 Filipe Rosset 2014-06-11 04:04:51 UTC
OK, I can confirm tolua++ works fine in x86 if build w/ this command:

gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua-5.1 -ldl -lm

To reproduce, I put some srpms here:
http://filiperosset.fedorapeople.org/rawhide/stratagus/


http://filiperosset.fedorapeople.org/rawhide/stratagus/stratagus-2.2.7-3.fc21.src.rpm (segfault w/ currently tolua++ in rawhide x86, fortunately both arm and x86_64 looks fine)

http://filiperosset.fedorapeople.org/rawhide/stratagus/tolua++-1.0.93-13.fc21.src.rpm (w/ this version, above stratagus rpm builds fine, without segfault when calling tolua++)

I'm not sure about the counter side effects when building tolua w/ this option (arm arch are already build that way).

Comment 6 Filipe Rosset 2014-06-11 04:15:04 UTC
It's almost done, needs a fix in tolua++ to build properly in x86 (arm + x86_64 are fine).

Comment 7 Filipe Rosset 2014-06-16 14:25:18 UTC
ping

Comment 8 Hans de Goede 2014-06-16 15:37:18 UTC
I've kicked of a build building tolua++ with the pre-build byte-code object on x86 (32-bit), which should fix this: http://koji.fedoraproject.org/koji/taskinfo?taskID=7048282

Please try rebuild stratagus once this is in the buildroot, to wait for it to show up in the buildroot do:

koji wait-repo --target=tolua++-1.0.93-12.fc21 f21-build

If this new build fixes things please close this bug once stratagus has been build successfully.

Comment 9 Hans de Goede 2014-06-16 17:27:36 UTC
The new tolua++ is in the build root now, so I've started another attempt at building stratagus-2.2.7-3.fc21 now.

Comment 10 Hans de Goede 2014-06-16 17:44:31 UTC
The stratagus build has completed successfully, closing.


Note You need to log in before you can comment on or make changes to this bug.