New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error: /usr/bin/ld: cannot find -lz, -lstdc++ #12
Comments
It looks like you are missing zlib and libstdc. It depends on your system how to install those, e.g., on a current Ubuntu (20.04), you could try
|
I am a non-root user of our HPC. Can I install them via conda?
I tried Thank you. |
ah, good to know that you are working in a Conda env... so the linker is not finding these libraries assuming they are properly installed in the environment. With the environment being active, can you run the following...
and add the output here. |
Thanks for the instant response. Following are the outputs:
|
Hm, looks like there is a lot going on in your env that should enable you to compile new tools, but since I don't know the system you are working on, let's try to stick to the Conda environment; the Conda environment does not seem to show up in these lists, so try the following:
I also created a Conda env with these two packages (
which should also be the case for your Conda env. |
It works! I also received a bunch of warnings:
Do I need to do anything about them? Thanks, |
A rough google search suggests to me that this could be a result of your build env not being entirely encapsulated. Are you using a system compiler, or does your environment include one? To make things faster, I tested the source build with the following minimal environment:
Set |
Here's what I tried:
Looks like it is still using the system gcc. Is that an easy way to hard code the gcc path in the makefile? |
Two remarks:
For my test setup, this gives |
Yes, this is how I am moving forward. I am currently using the version compiled with warning messages and see if it works. I will let you know. Thanks! Shujun |
It does not work and gives new errors. Not sure if it's related to the compilation:
1-buildGraph/buildGraph.err
|
Not sure if it's relevant, the HPC is using CentOs 8. I notice the compilation was using Check the default Also export their path to
Try to remake but with fatal error:
As you previously suggested, zlib is installed via conda. Any ideas? |
ok, first of all, it would be helpful to keep distinct problems in distinct github issues to avoid confusion about what is being discussed. With that in mind, reading the log messages you posted strongly suggests that your problem is this assertion failure:
That does not look like it would be related to the warnings during the compilation process. However, to hopefully bring closure to this compilation discussion, please follow these steps precisely from scratch:
Does that result in a build process w/o the above warnings? |
I thought this is the same compilation issue, so I didn't open a new issue. I am sorry if the assertion failure is a different problem. I followed your commands precisely, and below is the STDOUT:
I notice the compilation was not calling the conda |
What about this line - what is the output of this call (inside the active conda env):
So, I guess then it's reasonable to assume that the mismatch between (system) compiler and the libs in the Conda env lead to these warnings. To confirm, we can fix the Conda compiler in the makefile... |
It points to the conda env:
The first line of the makefile is
|
Ok, it seems that is hard-wired in your default environment. Then simply replace the first entry in the makefile to read as follows:
and try again (after make clean) |
Yeah, I tried that. I had the first error:
So I install the conda g++ with
|
Could you try creating a conda environment, installing |
@maickrau Thank you for your suggestions. I followed them and successfully compiled MBG without errors. There are a few warnings and I'll see if they create problems when I get the servers to test it out. I'll keep you posted. Shujun |
Issue resolved. Thanks! |
Hello @maickrau,
I am trying to compile MBG from source. I followed the readme and encounter two errors:
Am I missing any prerequisites? Thanks!
Shujun
The text was updated successfully, but these errors were encountered: