Archive: EnvironmentError: No module named _md5


EnvironmentError: No module named _md5
Hello,

I am trying to build the makensis for Solaris, so that I could include it in our nightly build process and after I had our server admin install python and scons in it, I downloaded the latest nsis source (and zipped binary) and kicked off the scons build.

in not too long, I got an error message stating the _md5 library is missing:


scons: Reading SConscript files ...
EnvironmentError: No module named _md5:
File "/home/luolong/nsis-2.36-src/SConstruct", line 1:
EnsurePythonVersion(1,6)
File "/usr/local/lib/scons-0.98.2/SCons/Script/SConscript.py", line 594:
env = self.factory()
File "/usr/local/lib/scons-0.98.2/SCons/Script/SConscript.py", line 574:
default_env = SCons.Defaults.DefaultEnvironment()
File "/usr/local/lib/scons-0.98.2/SCons/Defaults.py", line 90:
_default_env = apply(SCons.Environment.Environment, args, kw)
File "/usr/local/lib/scons-0.98.2/SCons/Environment.py", line 933:
apply_tools(self, tools, toolpath)
File "/usr/local/lib/scons-0.98.2/SCons/Environment.py", line 106:
env.Tool(tool)
File "/usr/local/lib/scons-0.98.2/SCons/Environment.py", line 1583:
tool(self)
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 175:
apply(self.generate, ( env, ) + args, kw)
File "/usr/local/lib/scons-0.98.2/SCons/Tool/default.py", line 40:
for t in SCons.Tool.tool_list(env['PLATFORM'], env):
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 655:
env)
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 543:
return filter (ToolExists, tools)
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 542:
return Tool(tool).exists(env)
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 89:
module = self._tool_module()
File "/usr/local/lib/scons-0.98.2/SCons/Tool/__init__.py", line 140:
raise SCons.Errors.EnvironmentError, e


Has anyone else been hit by this?

I am a complete newb when it comes to building nsis from source and/or using scons, so at least some assistance would be greatly appreciated :)

Thanks

Do you have md5 module installed for Python? It should come with the default configuration, but maybe Solaris played with it a bit.

Maybe adding the following to SConsctruct will do the trick as they'll cause scons not to use md5.

SourceSignatures('timestamp')
TargetSignatures('timestamp')

The problem was actually in python installation that had some trouble ith openSSH libraries.

now that this has been resolved, scons gets much further, but still gets stuck at the point it is supposed to start compiling.

It seems scons expects CC compiler whereas we have gcc instead:


-bash-3.00$ scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all\
NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/home/luolong/nsis-2.36 install-compiler
scons: Reading SConscript files ...
Delete("nsis-23-Apr-2008.cvs")
Delete(".instdist")
Delete(".test")
Using default tools configuration
Checking for C library gdi32... (cached) no
Checking for C library user32... (cached) no
Checking for C library pthread... (cached) no
Checking for C library iconv... (cached) no
Checking for C library dl... (cached) no
Checking for C library gdi32... (cached) no
Checking for C library iconv... (cached) no
Checking for C library pthread... (cached) no
Checking for C library user32... (cached) no
Checking for C++ library cppunit... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
CC/CC -o build/release/makensis/build.o -c -D_WIN32_IE=0x0500 Source/build.cpp
sh: CC/CC: not found
scons: *** [build/release/makensis/build.o] Error 1
scons: building terminated because of errors.

That's scons being unable to find your C compiler. Try helping it a bit by specifying PATH=/path/to/CC.


Originally posted by kichik
That's scons being unable to find your C compiler. Try helping it a bit by specifying PATH=/path/to/CC.
I can easily access gcc from my command line, so it is already on the PATH

(the system i am trying to build makensis on, does not have CC)

scons doesn't use your PATH, it builds its own.


thanks, that seemed to help, but now I get "Error 127":


-bash-3.00$ scons PATH=/usr/sfw/bin SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all\
NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/home/luolong/nsis-2.36 install-compiler
scons: Reading SConscript files ...
Delete("nsis-23-Apr-2008.cvs")
Delete(".instdist")
Delete(".test")
Using GNU tools configuration
Checking for compiler flag -m32... (cached) no
...
...
Checking for C++ library cppunit... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/release/makensis/build.o -c -Wno-non-virtual-dtor -O2 -Wall -D__BIG_ENDIAN__ -D_WIN32_IE=0x0500 Source/build.cpp
scons: *** [build/release/makensis/build.o] Error 127
scons: building terminated because of errors.


Searching this forum and googing around, gives me no clue what "Error 127" means

When dealing with scons issues the forum will not help you much. If you want to search, you should search the scons mailing list and Wiki.

A quick Google search on "solaris error 127" suggests it means g++ can't be found.