Skip to content

Undefined Reference Error During Make #8

@OwenTC

Description

@OwenTC

I am installing gtfold using cmake in Ubuntu 18.04. I am getting the following undefined reference error during linking when I run make. I have GMP installed not sure what else would be causing this issue. I've checked that gmp is in $PKG_CONFIG_PATH.

/usr/bin/cmake -Hgtfold -Bgtfold --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start gtfold/CMakeFiles gtfold/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory 'gtfold'
make -f CMakeFiles/gtfold.dir/build.make CMakeFiles/gtfold.dir/depend
make[2]: Entering directory 'gtfold'
cd gtfold && /usr/bin/cmake -E cmake_depends "Unix Makefiles" gtfold gtfold gtfold gtfold gtfold/CMakeFiles/gtfold.dir/DependInfo.cmake --color=
make[2]: Leaving directory 'gtfold'
make -f CMakeFiles/gtfold.dir/build.make CMakeFiles/gtfold.dir/build
make[2]: Entering directory 'gtfold'
[  3%] Linking CXX executable bin/gtfold
/usr/bin/cmake -E cmake_link_script CMakeFiles/gtfold.dir/link.txt --verbose=1
/usr/bin/c++   -g   -DNDEBUG            -rdynamic -fvisibility=default            -I/usr/local/include -I/usr/local/include -Igtfold-mfe/include            -D_GNU_SOURCE -DGNU_SOURCE -D__USE_GNU            -DGTFOLD_PACKAGE_VERSION="1.0.0"   -g   -DNDEBUG            -rdynamic -fvisibility=default            -I/usr/local/include -I/usr/local/include -Igtfold-mfe/include            -D_GNU_SOURCE -DGNU_SOURCE -D__USE_GNU            -DGTFOLD_PACKAGE_VERSION="1.0.0"    -lpthread -flto -fno-fat-lto-objects   -g   -DNDEBUG            -rdynamic -fvisibility=default            -I/usr/local/include -I/usr/local/include -Igtfold-mfe/include            -D_GNU_SOURCE -DGNU_SOURCE -D__USE_GNU            -DGTFOLD_PACKAGE_VERSION="1.0.0"    -lpthread CMakeFiles/gtfold.dir/gtfold-mfe/src/binexe-utils/main.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/AdvancedDouble.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/boltzmann_main.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/constraints.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/global.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/key.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/loader.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/mfe_main.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/options.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/partition-func-d2.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/pf-shel-check.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/random-sample.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/shapereader.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/stochastic-sampling-d2.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/stochastic-sampling.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/subopt_main.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/subopt_traceback.cc.o CMakeFiles/gtfold.dir/gtfold-mfe/src/utils.cc.o  -o bin/gtfold 
/tmp/ccUlVZWy.ltrans0.ltrans.o: In function `rnd_u1(int, int, int*)':
gtfold/gtfold-mfe/src/stochastic-sampling.cc:435: undefined reference to `EC_new'
gtfold/gtfold-mfe/src/stochastic-sampling.cc:435: undefined reference to `EB_new'
...
/tmp/ccUlVZWy.ltrans5.ltrans.o: In function `batch_sample_and_dump':
gtfold/gtfold-mfe/include/stochastic-sampling-d2.h:1576: undefined reference to `RT'
collect2: error: ld returned 1 exit status
CMakeFiles/gtfold.dir/build.make:544: recipe for target 'bin/gtfold' failed
make[2]: *** [bin/gtfold] Error 1
make[2]: Leaving directory 'gtfold'
CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/gtfold.dir/all' failed
make[1]: *** [CMakeFiles/gtfold.dir/all] Error 2
make[1]: Leaving directory 'gtfold'
Makefile:132: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions