You are here

Linker problems when building mini

7 posts / 0 new
Last post
Linker problems when building mini
#1

Hi,

I'm trying to build mini (revision 33356) on my machine, using 'scons.py bin mode=release'. I get all sorts of compiler warnings along the way, and for a grand finale - a fatal linker error. Can anyone help me figure it out?
I'm running ubuntu 9.04, with python 2.6.2.

You can check out the scons stderr output at this link:
http://dl.getdropbox.com/u/1728180/mini_r33356_build_stderr.log.txt
standard output is at:
http://dl.getdropbox.com/u/1728180/mini_r33356_build.log.txt

Mon, 2009-10-12 01:07
assaff

The linker error that breaks the build is: (last lines of the stderr file I attached)

/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
scons: *** [build/src/release/linux/2.6/32/x86/gcc/libutility.so] Error 1

> Hi,
>
> I'm trying to build mini (revision 33356) on my machine, using 'scons.py bin mode=release'. I get all sorts of compiler warnings along the way, and for a grand finale - a fatal linker error. Can anyone help me figure it out?
> I'm running ubuntu 9.04, with python 2.6.2.
>
> You can check out the scons stderr output at this link:
> http://dl.getdropbox.com/u/1728180/mini_r33356_build_stderr.log.txt
> standard output is at:
> http://dl.getdropbox.com/u/1728180/mini_r33356_build.log.txt

Mon, 2009-10-12 01:10
assaff

The error itself seems to be that the system can't find zlib (the library for gzipped IO.) The library ought to be in external/lib/z.lib, but it ships binary, and maybe it's not compatible with your system.

The warnings at the top of the file are indicative of using python 2.6. I don't think we "officially support" 2.6. I know that the developers downgrade recent OS X installations back to python 2.5 to avoid this problem.

So, you might need to get scons + python compatible again, or you might need to figure out why it can't find zlib. Here are some suggestions:

A) Install zlib developer libraries. I know these are in the package repository (you know, synaptic, or apt-get install whatever). I'd try this first.

B) install scons 1.2. It's probably in the package repository. It's compatible with python 2.6; this will make the warnings go away and maybe/maybe not fix linker errors. (You'd need to use the locally installed scons, not the included-with-rosetta scons). You could also tweak the scons files (SConstruct or Sconscript or something) to look for python 2.5 instead of just "python"; I don't know where this change would be but it's likely to be simple (SCons documentation may help here.)

Mon, 2009-10-12 06:57
smlewis

I'm already covered with scons 1.2.0, and I've also installed zlib1g-dev.
I restarted the machine, and run scons again (the locally installed scons). It's running as I type this. The python-version-related warnings still came, by the way.

Do you think the linker error may have anything to do with the linux kernel version? 'uname -r' yields 2.6.28-15-generic.

Thanks.

Mon, 2009-10-12 08:06
assaff

I don't recall any kernel version dependencies. (We do get g++ version dependencies all the time). My work desktop is 2.6.27-11-generic (python 2.5.2). I'll check what kernel my laptop is tonight (assuming I remember...).

Mon, 2009-10-12 10:37
smlewis

No worries, dude. It was the zlib. I had to disable compilation for some pilot_apps, because they were causing some errors, but it worked.

Thanks a lot! :)

Tue, 2009-10-13 02:01
assaff

It only just occurred to me when you mentioned pilot_apps that you have a revision number - not a release copy! I see you in the wiki SVN repository page. You're in the developers list, you should totally feel free to post questions like this directly to the developers' mailing list. This forum is generally meant for academic user support (not that it's a problem to ask here - but these questions all pertain to releases, not SVN revisions...)

Tue, 2009-10-13 06:49
smlewis