- NSIS Discussion
- Building CVS with scons
Archive: Building CVS with scons
WebMatze
29th April 2005 07:54 UTC
Problem compiling with Scons
Hello,
I tried to compile NSIS with Scons and the MS Toolkit, but it fails, the command prompt tells me that the sdk path could not be found in the registry, i tried to use CPPPATH and LIBPATH to set the path manually but it did not help.
Can someone please help me?
D:\Downloads\nsis\NSIS>scons -j4 MSTOOLKIT=YES
scons: Reading SConscript files ...
scons: *** Path does not exist for option CPPPATH:
File "SConstruct", line 61, in ?
D:\Downloads\nsis\NSIS>scons -j4 MSTOOLKIT=YES CPPPATH="C:\Program Files\Microso
ft Visual C++ Toolkit 2003\Bin"
scons: Reading SConscript files ...
scons: *** Path does not exist for option LIBPATH:
File "SConstruct", line 61, in ?
D:\Downloads\nsis\NSIS>scons -j4 MSTOOLKIT=YES CPPPATH="C:\Program Files\Microso
ft Visual C++ Toolkit 2003\Bin" LIBPATH="C:\Program Files\Microsoft Visual C++ T
oolkit 2003\lib"
scons: Reading SConscript files ...
internal error
Traceback (most recent call last):
File "C:\Program Files\Python24\scons\SCons\Script\__init__.py", line 1103, in
main
_exec_main()
File "C:\Program Files\Python24\scons\SCons\Script\__init__.py", line 1097, in
_exec_main
_main(args, parser)
File "C:\Program Files\Python24\scons\SCons\Script\__init__.py", line 903, in
_main
SCons.Script.SConscript._SConscript(fs, script)
File "C:\Program Files\Python24\scons\SCons\Script\SConscript.py", line 239, i
n _SConscript
exec _file_ in stack[-1].globals
File "SConstruct", line 71, in ?
defenv.Tool('mstoolkit', toolpath = ['SCons/Tools'])
File "C:\Program Files\Python24\scons\SCons\Environment.py", line 906, in Tool
return SCons.Tool.Tool(tool, map(self.subst, toolpath))(self)
File "C:\Program Files\Python24\scons\SCons\Tool\__init__.py", line 53, in __c
all__
apply(self.generate, ( env, ) + args, kw)
File "SCons/Tools\mstoolkit.py", line 283, in generate
include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
File "SCons/Tools\mstoolkit.py", line 82, in get_msvctoolkit_paths
raise SCons.Errors.InternalError, "The Platform SDK directory was not found
in the registry."
InternalError: The Platform SDK directory was not found in the registry.
D:\Downloads\nsis\NSIS>
LIGHTNING UK!
29th April 2005 08:51 UTC
Did you install the Windows SDK?
WebMatze
29th April 2005 13:08 UTC
Yes I installed it, one time without to register the environment variables and one time with these variables and the problem still occurs.
Any idea???
kichik
29th April 2005 16:22 UTC
The error "The Platform SDK directory was not found in the registry" shows if there was an error reading the HKLM\SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir registry key. Make sure the key exists and contains a valid value. If it doesn't, either create it or reinstall the Platform SDK.
WebMatze
29th April 2005 17:28 UTC
Thanks Kichik,
I created the registry values and it worked, but i still get errors:
D:\Downloads\NSIS>scons -j4 MSTOOLKIT=Yes
scons: Reading SConscript files ...
scons: *** Path does not exist for option CPPPATH:
File "SConstruct", line 61, in ?
D:\Downloads\NSIS>scons -j4 MSTOOLKIT=Yes CPPPATH="C:\program files\Microsoft Vi
sual C++ Toolkit 2003\bin"
scons: Reading SConscript files ...
scons: *** Path does not exist for option LIBPATH:
File "SConstruct", line 61, in ?
D:\Downloads\NSIS>scons -j4 MSTOOLKIT=Yes CPPPATH="C:\program files\Microsoft Vi
sual C++ Toolkit 2003\bin" LIBPATH="C:\Program Files\Microsoft Visual C++ Toolki
t 2003\Lib"
scons: Reading SConscript files ...
Using Microsoft tools configuration
Checking for main() in C library gdi32... no
Checking for main() in C library user32... no
Checking for main() in C library version... no
Checking for main() in C library pthread... no
Checking for main() in C library stdc++... no
Checking for main() in C library iconv... no
Checking for main() in C library libiconv... no
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /O1 /W3 /GX /TP "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003
\bin" /c Contrib\Library\LibraryLocal\LibraryLocal.cpp /Fobuild\release\Library\
LibraryLocal\LibraryLocal.obj
cl /nologo /O1 /W3 /TP "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin
" /c Contrib\MakeLangId\MakeLangId.cpp /Fobuild\release\MakeLangId\MakeLangId.ob
j
rc "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /fobuild\release\M
akeLangId\resource.res Contrib\MakeLangId\resource.rc
cl /nologo /O1 /W3 /TP "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin
" /c Contrib\zip2exe\main.cpp /Fobuild\release\zip2exe\main.obj
MakeLangId.cpp
LibraryLocal.cpp
main.cpp
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\adler32.c /Fobuild\release\zip2exe\zlib\adler32.obj
adler32.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\crc32.c /Fobuild\release\zip2exe\zlib\crc32.obj
crc32.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\inffast.c /Fobuild\release\zip2exe\zlib\inffast.obj
inffast.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\inflate.c /Fobuild\release\zip2exe\zlib\inflate.obj
inflate.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\inftrees.c /Fobuild\release\zip2exe\zlib\inftrees.obj
inftrees.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\ioapi.c /Fobuild\release\zip2exe\zlib\ioapi.obj
ioapi.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\unzip.c /Fobuild\release\zip2exe\zlib\unzip.obj
unzip.c
cl /nologo /O1 /W3 "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /c
Contrib\zip2exe\zlib\zutil.c /Fobuild\release\zip2exe\zlib\zutil.obj
zutil.c
rc "/IC:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" /fobuild\release\z
ip2exe\res.res Contrib\zip2exe\res.rc
"C:\Program Files\Microsoft Platform SDK for Windows XP SP2\\bin\Win64\link.exe"
/nologo /opt:nowin98 /entry:WinMain /map /OUT:build\release\MakeLangId\MakeLang
Id.exe "/LIBPATH:C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib" kernel3
2.lib user32.lib build\release\MakeLangId\MakeLangId.obj build\release\MakeLangI
d\resource.res
"C:\Program Files\Microsoft Platform SDK for Windows XP SP2\\bin\Win64\link.exe"
/nologo /opt:nowin98 /map /OUT:build\release\zip2exe\zip2exe.exe "/LIBPATH:C:\P
rogram Files\Microsoft Visual C++ Toolkit 2003\Lib" user32.lib gdi32.lib comctl3
2.lib comdlg32.lib advapi32.lib shell32.lib build\release\zip2exe\main.obj build
\release\zip2exe\zlib\adler32.obj build\release\zip2exe\zlib\crc32.obj build\rel
ease\zip2exe\zlib\inffast.obj build\release\zip2exe\zlib\inflate.obj build\relea
se\zip2exe\zlib\inftrees.obj build\release\zip2exe\zlib\ioapi.obj build\release\
zip2exe\zlib\unzip.obj build\release\zip2exe\zlib\zutil.obj build\release\zip2ex
e\res.res
Le chemin d'accès spécifié est introuvable.
scons: *** [build\release\MakeLangId\MakeLangId.exe] Error 1
Le chemin d'accès spécifié est introuvable.
scons: *** [build\release\zip2exe\zip2exe.exe] Error 1
scons: building terminated because of errors.
D:\Downloads\NSIS>
Thanks a lot for your help
kichik
29th April 2005 22:25 UTC
To get rid of the CPPPATH and LIBPATH errors, upgrade to SCons 0.96.90.
As for the second error, build without -j4 to get an ordered output and post that instead. I can't tell which file it couldn't find by the log you've posted above.
WebMatze
30th April 2005 06:13 UTC
Thanks Kichik,
i did what you said and still get the errors:
Setting environment for using Microsoft Visual C++ 2003 Toolkit.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)
Thank you for choosing the Visual C++ Toolkit 2003! Get started quickly by
building the code samples included in the "Samples" directory. Each sample
includes a short whitepaper discussing the Visual C++ features, and a batch
file for building the code.
Type "cl /?" for brief documentation on compiler options.
Visit http://msdn.microsoft.com/visualc/us...n/default.aspx for
complete compiler documentation.
C:\Program Files\Microsoft Visual C++ Toolkit 2003>d:
D:\>cd downloads\nsis
D:\Downloads\NSIS>scons MSTOOLKIT=YES
scons: Reading SConscript files ...
Using Microsoft tools configuration
Checking for main() in C library gdi32... no
Checking for main() in C library user32... no
Checking for main() in C library version... no
Checking for main() in C library pthread... no
Checking for main() in C library stdc++... no
Checking for main() in C library iconv... no
Checking for main() in C library libiconv... no
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /O1 /W3 /GX /TP /c Contrib\Library\LibraryLocal\LibraryLocal.cpp /Fob
uild\release\Library\LibraryLocal\LibraryLocal.obj
LibraryLocal.cpp
"C:\Program Files\Microsoft Platform SDK for Windows XP SP2\bin\Win64\link.exe"
/nologo /opt:nowin98 /map /OUT:build\release\Library\LibraryLocal\LibraryLocal.e
xe kernel32.lib oleaut32.lib version.lib build\release\Library\LibraryLocal\Libr
aryLocal.obj
Le chemin d'accès spécifié est introuvable.
scons: *** [build\release\Library\LibraryLocal\LibraryLocal.exe] Error 1
scons: building terminated because of errors.
D:\Downloads\NSIS>
I use pythons 2.41, scons 0.96.90, platform sdk for Winxp sp2, visual c++ toolkit 2003 and i work on Windows XP MCE 2005.
Hope you can help me
Bye
kichik
30th April 2005 13:21 UTC
Looks like the Platform SDK is improperly detected. It doesn't find link.exe or the libraries. Does "C:\Program Files\Microsoft Platform SDK for Windows XP SP2\bin\Win64\link.exe" really exists? What about "C:\Program Files\Microsoft Platform SDK for Windows XP SP2\lib\gdi32.lib"?
WebMatze
1st May 2005 17:07 UTC
Kichik, there is probably a problem with my install of the platform, because i dont find the files you mentionned in your message... But i tried to reinstall the platform and it didnt help there is no Win64 folder, no link.exe...
I dont know why???
Can someone help me.
WebMatze
1st May 2005 17:57 UTC
Ok I tried with another SDK for Windows Server 2003 SP1 and it seems to work correctly, previously i used the sdk for Windows XP SP2... I dont understand why it didnt work???
But once again thanks a lot for your help.
WebMatze
2nd May 2005 10:04 UTC
Hello,
I tried to compile NSIS source with SCONS and it worked, but when i tried to test the file makensis.exe, i got an error message
D:\Downloads\NSIS\build\release\makensis>makensis
Error: opening stub "D:\Downloads\NSIS\build\release\makensis\Stubs\zlib"
Error initalizing CEXEBuild: error setting default stub
D:\Downloads\NSIS\build\release\makensis>
What did i wrong?
kichik
3rd May 2005 18:35 UTC
You're not supposed to run it from the build directory. Get the latest CVS version and run:
scons PREFIX="C:\Program Files\NSIS" install
to install it to C:\Program Files\NSIS, or[/code]scons dist[/code]to get a zip file.