Git Product home page Git Product logo

Comments (10)

bunelr avatar bunelr commented on July 28, 2024 1

What problems do you encounter?

The following worked for me (copy pasted from the instructions in my repository

cd planet/src
# sudo apt install valgrind qt5-qmake libglpk-dev # if necessary 
qmake
make
# if you encounter linker issues, move -lsuitesparseconfig to the end of the flag list

(the last comment is because I was sometimes seeing some linker error. Moving the flag "-lsuitesparseconfig" to the end of the list in the src/Tool.pro file solved it (after rerunning the makefile generation)

from planet.

bunelr avatar bunelr commented on July 28, 2024 1

Have you tried installing the library that seems to be missing? (libltdl-dev)

from planet.

edwardxu0 avatar edwardxu0 commented on July 28, 2024

Thank you so much for the quick response, Rudy.


On Ubuntu 18.04
When it says,
/usr/bin/x86_64-linux-gnu-ld: cannot find -lltdl'.
install the missing library, libltdl-dev.

On Ubuntu 16.04,
Move -lsuitesparseconfig to the end of the flag list when you have some linker issues.

from planet.

progirep avatar progirep commented on July 28, 2024

Hi @edwardxu0 and @bunelr.

Sorry for forgetting to add the command to actually build the tool to the README file. It has not been added. The "libltdl-dev" package was indeed an additional dependency that is now also listed as such in the README file. That package is needed by the GNU linear programming toolkit, and it's a bit weird that it is not listed as a dependency of it in the package manager (perhaps because it is only needed for static builds).

from planet.

tianshubao1 avatar tianshubao1 commented on July 28, 2024

I got the error

collect2: error: ld returned 1 exit status
Makefile:167: recipe for target 'planet' failed
make: *** [planet] Error 1

when I typed make in terminal

from planet.

progirep avatar progirep commented on July 28, 2024

Hi @tianshubao1 - Could you copy&paste a bit more of the error messages that you get? The "ld returned 1 exit status" line informs you that a linker error happened earlier. Seeing the actual linker error would be helpful.

Also, could you add which type of system you are using (type of Linux, Mac, etc.)? For compilation/linking errors, this information is typically helpful.

from planet.

tianshubao1 avatar tianshubao1 commented on July 28, 2024

Thanks for the prompt reply. I am using ubuntu 16.04, Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz.

I typed make in src directory.

g++ -m64 -Wl,-O1 -o planet Options.o Solver.o System.o main.o verifierContext.o supersetdatabase.o -static -lglpk -lgmp -lumfpack -lsuitesparseconfig -lcholmod -lamd -lcolamd -lccolamd -lcamd -lz -lltdl -ldl
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libltdl.a(dlopen.o): In function vm_open': (.text+0x5e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0xfe): undefined reference to SuiteSparse_malloc' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x110): undefined reference to SuiteSparse_malloc' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x21a): undefined reference to SuiteSparse_malloc' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x279): undefined reference to SuiteSparse_free' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x283): undefined reference to SuiteSparse_free' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x28d): undefined reference to SuiteSparse_free' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x297): undefined reference to SuiteSparse_free' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order':
(.text+0x29f): undefined reference to SuiteSparse_free' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o):(.text+0x2fb): more undefined references to SuiteSparse_free' follow
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x389): undefined reference to SuiteSparse_malloc'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x3a1): undefined reference to SuiteSparse_malloc'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x46b): undefined reference to SuiteSparse_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x475): undefined reference to SuiteSparse_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x47f): undefined reference to SuiteSparse_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x487): undefined reference to SuiteSparse_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libamd.a(amd_i_order.o): In function amd_order': (.text+0x48f): undefined reference to SuiteSparse_free'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o): In function print_report': (.text+0x3): undefined reference to SuiteSparse_config'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o): In function print_report': (.text+0x4a): undefined reference to SuiteSparse_config'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o): In function print_report': (.text+0xab): undefined reference to SuiteSparse_config'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o): In function print_report': (.text+0xd3): undefined reference to SuiteSparse_config'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o): In function print_report': (.text+0xed): undefined reference to SuiteSparse_config'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcolamd.a(colamd.o):(.text+0x10c): more undefined references to `SuiteSparse_config' follow
collect2: error: ld returned 1 exit status
Makefile:167: recipe for target 'planet' failed
make: *** [planet] Error 1

from planet.

progirep avatar progirep commented on July 28, 2024

I unfortunately do not have access to a Ubuntu 16.04 machine (any more).

Could you try running the following command (in the "src" folder)?

g++ -m64 -Wl,-O1 -o planet Options.o Solver.o System.o main.o verifierContext.o supersetdatabase.o -static -lglpk -lgmp -lumfpack -lcholmod -lamd -lcolamd -lccolamd -lcamd -lsuitesparseconfig -lz -lltdl -ldl

It's the same as the one that did not work, except that the order of the libraries is now different.

from planet.

tianshubao1 avatar tianshubao1 commented on July 28, 2024

It seems it works now. I got an extra file in the folder after tying the command you gave me.

Then I type make again. It said nothing to make.

from planet.

progirep avatar progirep commented on July 28, 2024

The extra file should be the executable (if "make" says that there is nothing to make).

I do not know why Ubuntu 16.04 vs. Ubuntu 18.04 makes a difference here. Either the way linking works has slightly changed, or it is because of a change in the GLPK libraries.

I'm closing this issue for now. Please let me/us know if you have further questions.

from planet.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.