You are here

build error in linux-centos

5 posts / 0 new
Last post
build error in linux-centos
#1

Hello everyone!

 I recently upgraded to CentOS7. So, I had to do a fresh installation of Rosetta. I am trying to build the latest version of rosetta with this command:-

$ sudo ./scons.py -j10 bin mode=release extras=static

The building terminates with an error like this:-

I think the same type of error is popping up while trying to compile different applications. Could someone help me with this?

g++ -o build/src/release/linux/3.10/64/x86/gcc/4.8/static/backrub.static.linuxgccrelease -static build/src/release/linux/3.10/64/x86/gcc/4.8/static/apps/public/backrub.o -Lexternal/lib -Lbuild/src/release/linux/3.10/64/x86/gcc/4.8/static -Lsrc -Lbuild/external/release/linux/3.10/64/x86/gcc/4.8/static -Lexternal -L/usr/lib -L/usr/local/lib -ldevel -lprotocols.7 -lprotocols.6 -lprotocols_e.5 -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5 -lprotocols_h.4 -lprotocols_g.4 -lprotocols_f.4 -lprotocols_e.4 -lprotocols_d.4 -lprotocols_c.4 -lprotocols_b.4 -lprotocols_a.4 -lprotocols.3 -lprotocols_b.2 -lprotocols_a.2 -lprotocols.1 -lcore.5 -lcore.4 -lcore.3 -lcore.2 -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL -lz -lcppdb -lsqlite3 -lcifparse -lxml2
/bin/ld: cannot find -lz
/bin/ld: cannot find -lstdc++
/bin/ld: cannot find -lm
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
scons: *** [build/src/release/linux/3.10/64/x86/gcc/4.8/static/UBQ_Gp_LYX-Cterm.static.linuxgccrelease] Error 1
/bin/ld: cannot find -lz
/bin/ld: cannot find -lstdc++
/bin/ld: cannot find -lm
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
scons: *** [build/src/release/linux/3.10/64/x86/gcc/4.8/static/antibody_graft.static.linuxgccrelease] Error 1
....

....
scons: building terminated because of errors.

Category: 
Post Situation: 
Wed, 2017-06-28 18:59
Vedasheersh

It definitely looks like it's an issue with the installation of the build system. (Rather than anything with Rosetta, per se.)

While the "cannot find -lz" is a common error that means you don't have the zlib development package installed (I'm not sure exactly what the name of the package for CentOS7 would be called - it varies based on distribution), the "cannot find -lstdc++"/"cannot find -lm"/"cannot find -lc" all indicate there are issues with the build system. These libraries are pretty basic libraries which should normally be installed with any functioning installation of a build system.

I'd recommend asking around on a CentOS-specific forum to see what the issue might be. It could be that those libraries aren't installed on your system, but I'd personally lean away from that. I'm thinking it's more likely that there's a mis-configuration of your compiler such that it can't find the locations where these libraries are. But as I mentioned, someone with more CentOS-specific knowledge would be a better judge of that.

Actually ... I just noticed you're compiling with extras=static. One possiblity is that you only have the dynamic versions of those libraries installed. There's different library requirements for dynamically linked (the regular Rosetta compile) and statically linked libraries. Depending on your distribution, installing one might not install the other. I might suggest trying the compile without the extras=static, and see if that works. If it does, that means you need to install the statically-linked versions of the libraries -- presuming you need the static version and can't get away with using the dynamic version. (Again, contact a CentOS-specific forum to see which particular packages you would need to install.)

 

Thu, 2017-06-29 07:15
rmoretti

I would also point out that "sudo" is a bad sign.  You shouldn't need sudo to compile in your own user space.  I'm guessing it means you're either trying to write the compiled code somewhere central for all users (which I don't think is a good idea, but would need sudo) or you don't have read access to either your compiler or your building location (in which case the system is misconfigured).

Thu, 2017-06-29 08:33
smlewis

Thank you for the answers. I tried to build without the extras and it showed only one error '/bin/ld cannot find -lz'.

As you suggested I tried to install zlib-devel package and build without the extras. There were no build errors this time though.

Thank you.

Veda

Sat, 2017-07-01 03:40
Vedasheersh

with extras=static

 

you need to have also static version of the libraries

you need to havestatic zlib (aka zlib.a) and so on

Tue, 2017-07-04 08:08
eric