Skip to content

Linker error during build #1

@peitl

Description

@peitl

I get this linker error during building (Ubuntu 18.04 Linux 4.15.0-33 CMake 3.10.2 GNU Make 4.1 GCC 7.3.0)

[ 40%] Built target cmsat
[ 42%] Built target sat_cryptominisat
[ 44%] Linking CXX executable quabs
libsolve/src/cmsat-prefix/src/cmsat-build/lib/libcryptominisat5.a(toplevelgauss.cpp.o): In function `CMSat::TopLevelGauss::TopLevelGauss(CMSat::Solver*)':
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:41: undefined reference to `m4ri_build_all_codes'
libsolve/src/cmsat-prefix/src/cmsat-build/lib/libcryptominisat5.a(toplevelgauss.cpp.o): In function `CMSat::TopLevelGauss::extractInfoFromBlock(std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned long)':
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:199: undefined reference to `mzd_init'
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:200: undefined reference to `mzd_is_zero'
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:224: undefined reference to `mzd_echelonize_pluq'
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:278: undefined reference to `mzd_free'
/home/peitl/quabs/build/libsolve/src/cmsat-prefix/src/cmsat/src/toplevelgauss.cpp:224: undefined reference to `mzd_echelonize_pluq'
collect2: error: ld returned 1 exit status
CMakeFiles/quabs.dir/build.make:98: recipe for target 'quabs' failed
make[2]: *** [quabs] Error 1
CMakeFiles/Makefile2:146: recipe for target 'CMakeFiles/quabs.dir/all' failed
make[1]: *** [CMakeFiles/quabs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

From some limited searching, I suspect the problem might be that CryptoMiniSat is linked dynamically, but QuAbS is trying to link statically against it, although I do not know whether that's really the case or how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions