Archive: Building on Linux does not generate makensis binary for me


Building on Linux does not generate makensis binary for me
Hi everybody,

I've been trying to build a makensis binary w/o cross-compiler on my Linux x86_64 system.

Here's what happens:


intern:~/nsis-2.39-src # scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \
NSIS_CONFIG_CONST_DATA=no PREFIX=~/nsis-2.39 install-compiler
scons: Reading SConscript files ...
Delete("nsis-05-Sep-2008.cvs")
Delete(".instdist")
Delete(".test")
Using GNU tools configuration
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag $MAP_FLAG... no
Checking for linker flag -s... no
Checking for linker flag $MAP_FLAG... yes
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag -s... no
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for memcpy requirement... yes
Checking for memset requirement... yes
Checking for linker flag -pthread... no
Checking for __BIG_ENDIAN__... no
Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library dl... no
Checking for C library gdi32... no
Checking for C library iconv... no
Checking for C library pthread... no
Checking for C library user32... no
Checking for C++ library cppunit... no
scons: done reading SConscript files.
scons: Building targets ...
gcc -o build/release/makensis/crc32.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/crc32.c
gcc -o build/release/makensis/bzip2/blocksort.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/blocksort.c
gcc -o build/release/makensis/bzip2/bzlib.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/bzlib.c
gcc -o build/release/makensis/bzip2/compress.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/compress.c
gcc -o build/release/makensis/bzip2/huffman.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/huffman.c
gcc -o build/release/makensis/zlib/deflate.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/deflate.c
gcc -o build/release/makensis/zlib/trees.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/trees.c
scons: done building targets.


I'm missing a makensis binary?! The build/release/makensis directory has none, neither has the zip installation directory. Or am I just looking in the wrong place?

Here are my binary versions:

intern:~ # scons -v
SCons by Steven Knight et al.:
script: v0.98.3.r2928, 2008/04/29 22:44:09, by knight on bangkok
engine: v0.98.3.r2928, 2008/04/29 22:44:09, by knight on bangkok
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation

intern:~ # python -V
Python 2.5.1

intern:~ # gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local
--infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release
--with-gxx-include-dir=/usr/include/c++/4.2.1 --enable-ssp --disable-libssp --disable-libgcj
--with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2
--enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)

I'm not familiar with scons and cross-compiling, so any help would be really appreciated.

Thanks in advance!

The compiler should be installed into ~/nsis-2.39. Try providing a full path if that does work. I think I came across scons not eating the wave symbol once.


Thanks for your prompt reply, kichik!

Originally posted by kichik
The compiler should be installed into ~/nsis-2.39.
It is:

intern:~ # ll -d nsis*
drwxr-xr-x 10 root root 4096 Sep 5 11:45 nsis-2.39
drwxrwxrwx 12 root root 4096 Sep 5 14:03 nsis-2.39-src
-rw-r--r-- 1 root root 1474305 Sep 5 11:44 nsis-2.39-src.tar.bz2
-rw-r--r-- 1 root root 2277754 Sep 5 11:44 nsis-2.39.zip


Originally posted by kichik
Try providing a full path if that does work. I think I came across scons not eating the wave symbol once.
Here we go (with a clean extracted source tarball):

intern:~/nsis-2.39-src # scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all \
SKIPMISC=all NSIS_CONFIG_CONST_DATA=no PREFIX=/root/nsis-2.39 install-compiler
scons: Reading SConscript files ...
Delete("nsis-05-Sep-2008.cvs")
Delete(".instdist")
Delete(".test")
Using GNU tools configuration
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag $MAP_FLAG... no
Checking for linker flag -s... no
Checking for linker flag $MAP_FLAG... yes
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag -s... no
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for memcpy requirement... yes
Checking for memset requirement... yes
Checking for linker flag -pthread... no
Checking for __BIG_ENDIAN__... no
Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library dl... no
Checking for C library gdi32... no
Checking for C library iconv... no
Checking for C library pthread... no
Checking for C library user32... no
Checking for C++ library cppunit... no
scons: done reading SConscript files.
scons: Building targets ...
gcc -o build/release/makensis/crc32.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/crc32.c
gcc -o build/release/makensis/bzip2/blocksort.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/blocksort.c
gcc -o build/release/makensis/bzip2/bzlib.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/bzlib.c
gcc -o build/release/makensis/bzip2/compress.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/compress.c
gcc -o build/release/makensis/bzip2/huffman.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/huffman.c
gcc -o build/release/makensis/zlib/deflate.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/deflate.c
gcc -o build/release/makensis/zlib/trees.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/trees.c
scons: done building targets.

intern:~/nsis-2.39-src # ll build/release/makensis/
total 4
drwxr-xr-x 2 root root 71 Sep 5 14:08 bzip2
-rw-r--r-- 1 root root 896 Sep 5 14:08 crc32.o
drwxr-xr-x 2 root root 36 Sep 5 14:08 zlib

intern:~ # ll /root/nsis-2.39
total 1680
drwxr-xr-x 2 root root 103 Sep 5 11:45 Bin
-rw-rw-rw- 1 root root 15632 Dec 22 2007 COPYING
drwxr-xr-x 8 root root 100 Sep 5 11:45 Contrib
drwxr-xr-x 20 root root 4096 Sep 5 11:45 Docs
drwxr-xr-x 16 root root 4096 Sep 5 11:45 Examples
drwxr-xr-x 2 root root 4096 Sep 5 11:45 Include
drwxr-xr-x 3 root root 36 Sep 5 11:45 Menu
-rw-rw-rw- 1 root root 347464 Aug 16 23:25 NSIS.chm
-rw-r--r-- 1 root root 699392 Aug 16 23:25 NSIS.exe
drwxr-xr-x 2 root root 4096 Sep 5 11:45 Plugins
drwxr-xr-x 2 root root 105 Sep 5 11:45 Stubs
-rw-r--r-- 1 root root 492544 Aug 16 23:25 makensis.exe
-rw-r--r-- 1 root root 136192 Aug 16 23:25 makensisw.exe
-rw-rw-rw- 1 root root 1726 Dec 1 2007 nsisconf.nsh


Still the same. I don't know, shouldn't the build output include some lines about the makensis binary, not just the archive libraries?

It should and it does for me. Try replacing `install-compiler` with `/root/nsis-2.39/makensis`.


Still not working
Whoa, this starts to feel like a chatroom. :)

Originally posted by kichik
It should and it does for me. Try replacing `install-compiler` with `/root/nsis-2.39/makensis`.
Doing that just produces:
...
scons: *** Do not know how to make target `/root/nsis-2.39/makensis'. Stop.
...

Using only 'makensis' as a target gives:
intern:~/nsis-2.39-src # scons  SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all \
SKIPMISC=all NSIS_CONFIG_CONST_DATA=no PREFIX=/root/nsis-2.39 makensis
scons: Reading SConscript files ...
Delete("nsis-05-Sep-2008.cvs")
Delete(".instdist")
Delete(".test")
Using GNU tools configuration
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag $MAP_FLAG... no
Checking for linker flag -s... no
Checking for linker flag $MAP_FLAG... yes
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for linker flag -s... no
Checking for compiler flag -m32... yes
Checking for linker flag -m32... no
Checking for memcpy requirement... yes
Checking for memset requirement... yes
Checking for linker flag -pthread... no
Checking for __BIG_ENDIAN__... no
Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library dl... no
Checking for C library gdi32... no
Checking for C library iconv... no
Checking for C library pthread... no
Checking for C library user32... no
Checking for C++ library cppunit... no
scons: done reading SConscript files.
scons: Building targets ...
gcc -o build/release/makensis/crc32.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/crc32.c
gcc -o build/release/makensis/bzip2/blocksort.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/blocksort.c
gcc -o build/release/makensis/bzip2/bzlib.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/bzlib.c
gcc -o build/release/makensis/bzip2/compress.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/compress.c
gcc -o build/release/makensis/bzip2/huffman.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/bzip2/huffman.c
gcc -o build/release/makensis/zlib/deflate.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/deflate.c
gcc -o build/release/makensis/zlib/trees.o -c -O2 -Wall -m32 -D_WIN32_IE=0x0500 Source/zlib/trees.c
scons: done building targets.

Sadly, no surprises here. The build and compiler directories look the same as above.

Anything else I should try?

What happens when you don't specify a target? Try also running scons with --tree=all and attach the output here.


Thanks for your patience, kichik!

Originally posted by kichik
What happens when you don't specify a target?
Still no makensis binary. :(
Originally posted by kichik
Try also running scons with --tree=all and attach the output here.
Exactly the same output. Please see the attached file. I really wish I knew more about scons.

--tree=all is for debugging, but it was ignored in your case. You're probably using an old version of scons where it's still --debug=dtree or --debug=tree. The output should be huge with that one. Make sure to still pass `install-compiler` along with it.


now we're getting somewhere

Originally posted by kichik
--tree=all is for debugging, but it was ignored in your case. You're probably using an old version of scons where it's still --debug=dtree or --debug=tree. The output should be huge with that one. Make sure to still pass `install-compiler` along with it.
I was using scons 0.98.3.r2928; it supports the --tree=all option, so the output above seemed to be correct. :weird:

BUT: I compiled scons 1.0.0 anyway and tried it again. Now we're getting somewhere: long logfile attached. Not working, but it's a completely different problem.

Looks like the OpenSuSE 10.3 packaged scons is not working for NSIS - it doesn't detect/use/whatever the g++ compiler?

Here's the result of
intern:~/nsis-2.39-src # scons --tree=all SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \
NSIS_CONFIG_CONST_DATA=no PREFIX=/root/nsis-2.39 install-compiler &> ../tree-all-scons100.log

What does config.log show after running scons once on a clean source tree?


I really appreciate your dedication. :) Isn't it getting late at your whereabouts?

Originally posted by kichik
What does config.log show after running scons once on a clean source tree?
Here it is.

I'll be headed to bed soon myself, so my response times will be delayed for about the next 10 hours. :D

It successfully discovered there's no need for stdc++ on your system. Is the build log still the same after a clean build? It shouldn't have passed -lstdc++ with this config.log.