![]() |
#1 |
Junior Member
Join Date: Mar 2015
Posts: 1
|
![]()
I'm trying to build NSIS, but I'm having problems. There are three different errors depending on which version of Visual Studio I specify.
Downloaded
I build it by cleaning the directory and then using a command line of scons. I tried this using various versions of Visual Studio. By default, it is 12.0. I set MSVS_VERSION to build with other versions. The results:
MSSDK=C:\Program Files\Microsoft SDKs\Windows\version MSSDK=C:\Program Files (x86)\Microsoft SDKs\Windows\version #1 I have not researched this error yet. #2 I found a few posts about this, but none provided a solution. I've checked that zlib.h, zdll.lib and zlib1.lib are where they are expected. #3 The unresolved __hypot is because of a change in the library starting with VS 2010. I suspect that __fltused is a similar problem. I have tried this on a second computer with a similar setup. The results are the same. Output #1 scons: Reading SConscript files ... Delete("nsis-29-Mar-2015.cvs") Delete(".instdist") Delete(".test") Using Microsoft tools configuration (7.1) *** Couldn't find a good version of libcp.lib Output #2 scons: Reading SConscript files ... Delete("nsis-29-Mar-2015.cvs") Delete(".instdist") Delete(".test") Using Microsoft tools configuration (9.0) Checking for memset requirement... yes Checking for memcpy requirement... yes 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 shlwapi... no Checking for C library version... no Checking for C library zdll... no Checking for C library z... no zlib (win32) is missing! Output for #3 scons: Reading SConscript files ... Delete("nsis-29-Mar-2015.cvs") Delete(".instdist") Delete(".test") Using Microsoft tools configuration (12.0) Checking for memset requirement... yes Checking for memcpy requirement... no Checking for C library gdi32... yes Checking for C library user32... yes Checking for C library pthread... no Checking for C library iconv... no Checking for C library shlwapi... yes Checking for C library version... yes Checking for C library zdll... yes Checking for C library zdll... yes Checking for C library zdll... yes Checking for C library dl... no Checking for C library gdi32... yes Checking for C library iconv... no Checking for C library pthread... no Checking for C library user32... yes Checking for C library version... yes Checking for C library zdll... yes Checking for C++ library cppunit... no scons: done reading SConscript files. scons: Building targets ... Install file: "Contrib\ExDLL\pluginapi.h" as "build\urelease\api\nsis\pluginapi.h" Install file: "Source\exehead\api.h" as "build\urelease\api\nsis\api.h" Install file: "Contrib\ExDLL\nsis_tchar.h" as "build\urelease\api\nsis\nsis_tchar.h" <lots of cl commands> link /nologo /map /subsystem:windows,5.01 /entry:NSISWinMainNOCRT /NODEFAULTLIB /OUT:build\urelease\MakeLangId\MakeLangId.exe kernel32.lib user32.lib comctl32.lib build\urelease\MakeLangId\MakeLangId.obj build\urelease\MakeLangId\resource-rc.res build\urelease\MakeLangId\memset.obj MakeLangId.obj : error LNK2019: unresolved external symbol __hypot referenced in function _hypot MakeLangId.obj : error LNK2001: unresolved external symbol __fltused build\urelease\MakeLangId\MakeLangId.exe : fatal error LNK1120: 2 unresolved externals scons: building terminated because of errors. |
![]() |
![]() |
![]() |
#2 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Showing us the exact scons command used would help.
Which SDK are you using with VC toolkit 2003? Platform SDK 2003 Feb. is probably your best bet. 1) SCons is probably not able to find the lib? 2) Are you sure ZLIB_W32 is set correctly? Use File Monitor/Process Monitor to make sure SCons is actually looking in the right place. 3) Newer versions of VS are probably doing something stupid. MakeLangId does not use floating point numbers nor any other CRT function. I can build with VCTK2003 but I'm using a backdoor to override the Scons VS detection: Quote:
When using MSVC_USE_SCRIPT=None the PATH, INCLUDE and LIB environment variables have to be set correctly (Use the shortcuts created by the Platform SDK: Windows 2000/XP Release 32-bit etc). Specifically it needs to be able to find cl.exe, link.exe and lib.exe in %PATH% and Windows.h in %INCLUDE%. I'm using SKIPPLUGINS=System because I did not have the MASM assembler (ml.exe) in %PATH%. The contents of my zlib folder: Quote:
I would generally not recommend that people use MSVC_USE_SCRIPT but it can be helpful if you cannot get SCons to operate correctly. It seems to be a rather undocumented parameter and depends on your SCons version. If you also use MSTOOLKIT=yes then it will use our custom implementation of this feature (YMMV). It is important that you delete .sconsign.dblite and the .sconf_temp directory when trying to fix the libcp.lib and zlib errors because SCons caches config data. Checking config.log might also provide some clues... IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Nov 2015
Posts: 96
|
im in the same alley struggling to get NSIS to compile without errors,
assuming i have nothing installed; can someone please sort these out for me, which of these do i want to use to get a successful build? TIA, Chris ![]() |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
You have the service pack and processor pack for Visual Studio 6 but not Visual Studio itself which is rather strange.
First install python, then scons. Then you need to choose between 2003TK and 2005. When you try to build scons is going to complain about missing zlib and wxwidgets so set those variables and then report back if you get errors... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Nov 2015
Posts: 96
|
![]()
Thank you Andres,
I am actually trying again on a new virgin PC because I was getting errors on my other machine, I do use it for other development; I already have VS2012; I have all path in place on both machines; with Python installed scones v1.20 and wxMSW v2.8; I am getting a warring on both machines, and on both compilation stops due to fatal errors, the one machine W7 has VS2012 with latest scones build and newer wxMSW I got similar errors as OP described; on my other box its xp, I’m setting up now VS6 with SP5 and proc pack with older scones and wxMSW to see if this helps, No switches were initially used; though I have tried several with no joy, TIA Chris (log attached) |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Try adding SKIPUTILS=MakeLangId as a scons parameter. (MakeLangId is a simple program and does not use floats but as you can see, it is rather hard to keep all visual studio versions happy at the same time)
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Nov 2015
Posts: 96
|
![]()
Thank you very much Andres,
i did as instructed; something kept going; but ended up again not completing again, log attached TIA Chris |
![]() |
![]() |
![]() |
#8 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
Also add nsis menu to the scons list, so: SKIPUTILS="MakeLangId","NSIS Menu". The Menu is the thing you see when you click the NSIS icon on the desktop or in the start menu.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#9 |
Member
Join Date: Nov 2015
Posts: 96
|
kept going again; only this time i got... allot of windows popup VS pages as well as url's
this is one nutty process to figure out ![]() thank you for all you help guys; i do appreciate this, (log attached) ATB Chris |
![]() |
![]() |
![]() |
#10 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
What's the directory you are running scons in? And what's the command line you are using?
I've compiled nsis multiple times on windows and linux, and I've never seen a log like that last one. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#11 |
Member
Join Date: Nov 2015
Posts: 96
|
i think the buffer was enough to hold all the log;
the first line should have the command i run as well i run from -> d:\dev\nsis\ in this last run i had -> scons SKIPUTILS="MakeLangId","NSIS Menu" other directories needed are here and referenced in path d:\dev\wxWidgets\ d:\dev\zlib-1.2.7\ C:\Python27\ in this last run i had im not sure yet if im doing something to add to this odd behavior; scons doesn't like to work nicely on my Win7 pc for some odd reason, i run it few times from a normal command window; until it just refused to be recognized; jut like that! no changes made other then close and open a new command window; it didn't matter that i removed and installed it back; python is in path as needed, i added direct path reference to \site packages\scons\ i did just about everything i can think of to make sure everything is visible; yet scons remained un recognized; i had to pull VS command and work through it, ATB Chris |
![]() |
![]() |
![]() |
#12 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
You installed python in it's default directory right? Which would be C:\Python27? Add C:\Python27\scripts into the environment's system path. Then in a command window all you have to do is change to the nsis directory and run your scons command.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#13 |
Member
Join Date: Nov 2015
Posts: 96
|
C:\Python27\scripts is already in there; python is in its default path C:\Python27\
(i see scones files in scripts folder but with no extensions) scones doesn't let you change install path anyway, |
![]() |
![]() |
![]() |
#14 |
Member
Join Date: Nov 2015
Posts: 96
|
this is what i have in path
PHP Code:
![]() |
![]() |
![]() |
![]() |
#15 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
So from a new command window are you doing this:
D: (enter) cd dev\nsis (enter) scons (enter) If not, do it this way and let me know what happens. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#16 |
Member
Join Date: Nov 2015
Posts: 96
|
i cant explain why; as you see a standard run cmd shell is working now,
PHP Code:
no changes made since! PHP Code:
|
![]() |
![]() |
![]() |
#17 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Why do you even need to build NSIS? If you cannot piece together the information you have already gotten to get past the MakeLangId problem then I don't understand how you are going to be able to make any meaningful changes to the source...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#18 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
Alright, close that window that failed. Now use your original scons command line on the new window.
Because the command window doesn't pickup changes in the environment, it's advised to only have one command window open at any time, and close and open a new window after each change. On ubuntu it doesn't matter, I can have one command window open and I can add and remove path variables and programs, and the command window can still pick them up, and it remembers every command you type into it ![]() [edit] Just saw Ander's reply, that's a good point, I didn't have this much trouble compiling NSIS, I use VS2008 and I skip the help file and NSIS Menu. I've done this on windows 7 and windows 10. I noticed VS version 12 in the scons output, do you have VS2013/VS2015 installed by any chance? "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#19 |
Member
Join Date: Nov 2015
Posts: 96
|
![]()
W00T -> scons: done building targets.
what a silly thing to cause this odd behavior; good catch there Jason! trying a fresh build now ![]() ATB Chris |
![]() |
![]() |
![]() |
#20 |
Member
Join Date: Nov 2015
Posts: 96
|
why am i getting ->
File: "..\NSIS.exe" -> no files found. when trying to compile an exe or archive? scons dist-installer SKIPUTILS="MakeLangId","NSIS Menu"? TIA Chris |
![]() |
![]() |
![]() |
#21 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Because you skipped NSIS menu when you built NSIS. You will not be able to compile the official NSIS installer without it but you can compile all other scripts...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#22 |
Member
Join Date: Nov 2015
Posts: 96
|
without makensis.exe, how?
|
![]() |
![]() |
![]() |
#23 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
makensis.exe is the compiler, NSIS.exe is the menu.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#24 |
Member
Join Date: Nov 2015
Posts: 96
|
Thank you Jason, i end up with no exe after compiling,
any idea why im getting these errors to start with; is it the src files or my environment? TIA Chris |
![]() |
![]() |
![]() |
#25 |
Member
Join Date: Nov 2015
Posts: 96
|
im curious now about this 2GB limit,
have you stumbled on this before? why isnt this implemented in NSIS standard builds today? https://github.com/ywjheart/Nsis64 (blog https://ywjheart.wordpress.com/2012/...-the-2gb-limit) ATB Chris |
![]() |
![]() |
![]() |
#26 |
Member
Join Date: Nov 2015
Posts: 96
|
![]()
trying to get this compiled with a private key
|
![]() |
![]() |
![]() |
#27 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
That code is a bit old now, mine is based on 3.0b2.
The devs have talked about it, but nothing has been set in concrete. I've been experimenting with it over the last year or two, and I have a working prototype right now. PHP Code:
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#28 |
Member
Join Date: Nov 2015
Posts: 96
|
SWEET!
![]() can you share the build? |
![]() |
![]() |
![]() |
#29 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
I've been thinking about it, but really I don't want to. The trunk build has had some major changes done to it since my fork, and I don't really want to maintain a fork that's probably going to be discarded in the future anyway (because technology keeps moving on).
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#30 |
Member
Join Date: Nov 2015
Posts: 96
|
![]()
why would it be discard in future releases; this is crucial today!
if anything this should be further enhanced and supported, im shocked to find out this 2GB limit, everyone moving towards 64bit more ram; more speeds; while NSIS is stuck with FAT16 limits? shocked, stunned, extremely disappointed; i will likely be looking for another solution ![]() did you manage to fix the few loss end he originally left with compression and such? |
![]() |
![]() |
![]() |
#31 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
The limit has been in place for a good ten years now, and there have been people over the years that have requested this limit be removed (myself included). The devs are a bit reluctant to add support, the patches shown so far aren't really 'nice' enough to be integrated.
My fork just adds to what's already there, I haven't removed anything from the original source. The only downside is that solid compression isn't supported, which is no biggie as it would just make the install slower. "Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#32 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
![]()
If you want to build the system plugin you also need MASM. If you want to build the NSIS menu you need to download wxwidgets. I'm building everything here. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#33 |
Member
Join Date: Nov 2015
Posts: 96
|
Thank you very much Andres
followed your instructions verbatim any idea why im getting this now? PHP Code:
|
![]() |
![]() |
![]() |
#34 |
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 922
|
Which version of the source files are you using?
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
![]() |
![]() |
![]() |
#35 |
Member
Join Date: Nov 2015
Posts: 96
|
trunk r6644
|
![]() |
![]() |
![]() |
#36 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Quote:
To fix it you need to play around with the STD_MIN/STD_MAX defines in platform.h IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#37 |
Member
Join Date: Nov 2015
Posts: 96
|
![]() |
![]() |
![]() |
![]() |
#38 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
Which Microsoft tools configuration version is reported at the start of the scons output/log?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#39 |
Member
Join Date: Nov 2015
Posts: 96
|
Using Microsoft tools configuration (3.5)
|
![]() |
![]() |
![]() |
#40 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,483
|
It should say 7.1 so something is clearly not right with the compiler detection. You could try adding MSVS_VERSION=7.1 to the scons command but I doubt that is going to help.
Unless you want to try on a clean machine I think you will have to debug our scons toolkit detection script. (somewhere under trunk\scons\) IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Tags |
build, error, nsis, scons, zlib |
Thread Tools | Search this Thread |
Display Modes | |
|
|