Menu

#1242 makensis.exe is built instead of makensis on Ubuntu 18.04

3.0 Series
open
nobody
None
5
2021-09-28
2020-03-01
No

I have always built NSIS on Ubuntu 16.04 successfully using the command line

scons XGCC_W32_PREFIX=i686-w64-mingw32- PREFIX=$prefix NSIS_MAX_STRLEN=8192 ZLIB_W32=$zlib128_dll_dir install

Now, with the very same command line, but on Ubuntu 18.04, makensis.exe is build instead of makensis. The config.log files generated on the two machines are identical. The builds are identical until the point where uninst.ico is installed. After that, the Ubuntu 16.04 build proceeds with

g++ -o build/urelease/makensis/build.o -c -Wno-non-virtual-dtor -Wall -O2 -DNSISCALL= -D_UNICODE -DUNICODE -DMAKENSIS -D_WIN32_IE=0x0500 -Ibuild/urelease/config Source/build.cpp

leading to

Install file: "build/urelease/makensis/makensis" as "/home/roberto/pdevelop-x86_64-windows/deps/bin/makensis"

whereas the Ubuntu 18.04 build continues with

i686-w64-mingw32-gcc -o build/urelease/SubStart/substart.o -c -O2 -Wall -fno-strict-aliasing -DNSISCALL="attribute((stdcall))" -D_UNICODE -DUNICODE -Ibuild/urelease/config Contrib/SubStart/substart.c
i686-w64-mingw32-g++ -o build/urelease/SubStart/substart.exe -mwindows -Wl,--file-alignment,512 -s -Wl,--subsystem,console -nostdlib -Wl,--exclude-libs,msvcrt.a build/urelease/SubStart/substart.o -lkernel32 -luser32
Install file: "build/urelease/SubStart/substart.exe" as "/space/roberto/pdevelop-x86_64-windows/deps/bin/makensis.exe"

I am using nsis-3.05 patched as indicated in https://sourceforge.net/p/nsis/bugs/1241/#d28b

Discussion

  • Roberto Bagnara

    Roberto Bagnara - 2020-03-01

    I attach the config.log generated on the Ubuntu 18.04 machine, which is identical, modulo the substitution of "/space/" with "/home/" to the one generated on the Ubuntu 16.04 machine.

    Apart from the compiler versions, both builds begin with the following (below is what is obtained on the Ubuntu 18.04 machine):

    scons: Reading SConscript files ...
    Mkdir("build/urelease/config")
    WARNING: VER_PACKED not set, defaulting to 0x03004666!
    Delete("nsis-01-Mar-2020.cvs")
    Delete(".instdist")
    Delete(".test")
    Using GNU tools configuration
    Checking for linker flag $MAP_FLAG... yes
    Checking for linker flag -s... yes
    Checking for linker flag $MAP_FLAG... yes
    Checking for linker flag -s... yes
    Checking for memcpy requirement... no
    Checking for memset requirement... no
    Checking for linker flag -pthread... yes
    Checking for BIG_ENDIAN... no
    i686-w64-mingw32-gcc --version
    i686-w64-mingw32-gcc (GCC) 7.3-win32 20180312
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    g++ --version
    g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Checking for C library gdi32... no
    Checking for C library user32... no
    Checking for C library pthread... yes
    Checking for C library iconv... no
    Checking for C library shlwapi... no
    Checking for C library oleaut32... no
    Checking for C library z... yes
    Checking for C library z... yes
    Checking for C library zdll... yes
    Checking for C library dl... yes
    Checking for C library gdi32... no
    Checking for C library iconv... no
    Checking for C library pthread... yes
    Checking for C library user32... no
    Checking for C library oleaut32... no
    Checking for C library z... yes
    Checking for C++ library cppunit... no
    scons: done reading SConscript files.
    scons: Building targets ...

     
  • Roberto Bagnara

    Roberto Bagnara - 2020-03-03

    It turned out to be an incompatibility of the build system for nsis-3.05 with Python 3. The problem goes away if one invokes "python2 $(which scons)" instead of just "scons".

     
  • Amir Szekely

    Amir Szekely - 2020-03-03

    When I tried and it used Python 2, it built both makensis and makensis.exe. Just need to add if env['PLATFORM'] == 'win32': before the last line of Contrib/SubStart/SConscript.

     
    • Markus Mützel

      Markus Mützel - 2020-07-18

      I am running into the same issue. See also: https://savannah.gnu.org/bugs/index.php?58689#comment28

      Making the mentioned change in Contrib/SubStart/SConscript doesn't make a difference.
      The reason for the error is probably that with python2 two versions of the nsis executables are built:

      1. One version that runs on the build system (Linux) and builds installers that run on the target (win32).
      2. Another version that runs on the target (win32) and builds installers that run on the target (also win32).
        With python3, only the latter version (win32 executable) is built. SCons fails when it tries to install the former version (that it hasn't built).
       
  • Roberto Bagnara

    Roberto Bagnara - 2020-03-04

    Yes, as I said the problem is that nsis-3.05 is not compatible with Python 3.

     
  • Amir Szekely

    Amir Szekely - 2020-03-04

    Could you try that fix (also in SVN now) with your Python 3 setup? It should work there too.

     
  • Markus Mützel

    Markus Mützel - 2021-09-28

    After upgrading to NSIS 3.07, it is working correctly for me now. NSIS 3.08 also compiles correctly on Ubuntu 21.04 for me.

     

Log in to post a comment.

MongoDB Logo MongoDB