[SCIP] linker error when building soplex

Ziye Tang ziyet at andrew.cmu.edu
Fri Jun 12 09:24:46 CEST 2020


Dear Franziska,

Thank you for your reply. However I double checked with cmake instructions,
it seems the flags are -DCPLEX_INCLUDE_DIRS and -DCPLEX_LIBRARY. And I was
able to compile successfully using those flags on my local PC. Is it
possible that the flag you mentioned is for older versions?

Anyhow I had no problem during the cmake build process. And the linker
error (shown in my first email) only pops up during the make process. I
googled for this error and found a solution (to a similar problem) on
stackoverflow
<https://stackoverflow.com/questions/5083047/linker-problem-with-libstdc-so-6-in-connection-with-cuda>,
which seems a rather straightforward fix: just tell linker where to find
libstdc++.so explicitly. But I am fairly new to CMake as well as SCIP cmake
system and I do not know where is the appropriate place to add such a
linker flag. Do you think the solution is reasonable and if so, could you
advise where to add the linker flag?

Thanks,
Ziye

On Thu, Jun 11, 2020 at 4:46 PM Franziska Schloesser <schloesser at zib.de>
wrote:

> Dear Ziye,
>
> To only build scip you can run make in the scip folder that is generated
> by cmake. For using cplex as LP solver you seem to have used the wrong
> flags, you need the CPLEX_DIR.
>
> That would make your commands look something like this:
>
> mkdir build
> cd build
> cmake .. -DLPS=cpx -DCPLEX_DIR=</path/to/cplex/install>
> cd scip
> make
>
> I hope this helps,
>
> Best,
> Franziska
> On 6/5/20 11:33 AM, Ziye Tang wrote:
>
> Dear SCIP team,
>
> I am compiling scipoptsuite on a rhel8 server via cmake. I am using cplex
> as my LP solver and have specified LPS, INCLUDE_DIRS and LIB flags. When
> cmake finishes, I tried to run make. Here's the error I got:
>
> [  3%] Linking CXX executable ../../bin/soplex
> /usr/bin/ld: CMakeFiles/soplex.dir/soplexmain.cpp.o: undefined reference
> to symbol '_ZNSo9_M_insertIdEERSoT_@@GLIBCXX_3.4.9'
> //usr/lib64/libstdc++.so.6: error adding symbols: DSO missing from command
> line
> collect2: error: ld returned 1 exit status
> make[2]: *** [soplex/src/CMakeFiles/soplex.dir/build.make:86: bin/soplex]
> Error 1
> make[1]: *** [CMakeFiles/Makefile2:182:
> soplex/src/CMakeFiles/soplex.dir/all] Error 2
> make: *** [Makefile:163: all] Error 2
>
> I don't understand this linker error. It would be great if someone could
> point me in the right direction. Also, if I am only using scip (with cplex
> as LP solver), is there a make target I could build? A while ago I tried
> make scip but I've got some other errors when using scip.
>
> _______________________________________________
> Scip mailing listScip at zib.dehttps://listserv.zib.de/mailman/listinfo/scip
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20200612/73a1e8da/attachment.html>


More information about the Scip mailing list