cyrustransform
9th October 2007 22:07 UTC
compiling makensis binary on Linux 64-bit OS
I have been attempting to get the makensis binary to compile on a Linux 64-bit (Fedora Core 7) operating system with no success. I have not found any posts in these forums or any others regarding similar problems so its time to post. Is it possible to compile the makensis binary on x64 architecture? If so what am I doing wrong or what do I need to change to make it work?
# uname -a
Linux buildserver10 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 20:47:39 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
# scons --version
SCons by Steven Knight et al.:
script: v0.96.93.D001, 2006/11/06 08:31:54, by knight on roxbury
engine: v0.96.93.D001, 2006/11/06 08:31:54, by knight on roxbury
# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)
# python --version
Python 2.5
I extracted the file nsis-2.31-src.tar.bz2 to /buildsystem/tools/nsis-2.31-src
Then executed the following command
# scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/buildsystem/tools/nsis-2.31-src
I have included the full output from the above command in the scons-output.txt file attached to this topic.
The problem I'm running into starts with
/usr/bin/ld: warning: i386 architecture of input file `build/release/makensis/build.o' is incompatible with i386:x86-64 output
kichik
9th October 2007 23:24 UTC
The incompatible output warnings seem to come from the lack of -m32 in the linkage. That should be automatically added by the configuration, but yours is cached to not use it. Add --cache=force to your scons call line and attach config.log.
cyrustransform
10th October 2007 21:54 UTC
Thank you for the reply. I used --cache-force. It still failed. I deleted my nsis-2.31-src directory, extracted the source download and copied it back over to make sure there wasn't anything left behind that could cause issues. This is the command I ended up running.
# scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/buildsystem/tools/nsis-2.31-src --cache-force
Attached is my config.log
kichik
10th October 2007 23:52 UTC
It's actually --config=force with an equality sign. But cleaning out the entire directory did the same trick. It was not meant to solve the problem, just show it in config.log, and I think it did. ld hits a segfault when testing for -m32. While strictly speaking it should be considered as a gcc bug, I'd guess testing for -m32 in the compiler prior to checking for it in the linker should solve it. In SCons/Config/gnu try replacing lines 88 and 89.
cyrustransform
11th October 2007 01:40 UTC
I get the following output when I use the = instead of the - in --cache=force. That's why I ended up using --cache-force instead. I thought it was because you are using a newer version of scons but I upgraded to v0.97.D001 and it still does the same thing.
# scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/buildsystem/tools/nsi
s-2.31-src --cache=force
usage: scons [OPTION] [TARGET] ...
SCons error: ambiguous option: --cache (--cache-disable, --cache-show, --cache-populate, --cache-debug, --cache-force?)
Anyway... Moving on to the good stuff. As you suggested above, I moved line 88-->89 and 89-->88 in nsis-2.31-src/SCons/Config/gnu and I got the result "scons: done building targets." I now have the nsis-2.31-src/build/release/makensis/makensis binary.
Thank you very much! PROBLEM SOLVED.
kichik
14th October 2007 22:26 UTC
Weird... Maybe the equality sign is used only on Windows.
Anyway, I've fixed this for the next version of NSIS. You might also want to report this to gcc. It shouldn't segfault.