Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

I'm trying to build from source and getting an error. I've included the error log first, and then the results of cmake in case that's useful.

Error log:

cat /home/nathan/cadabra2/build/CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/nathan/cadabra2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC6a5d8/fast"
/usr/bin/make -f CMakeFiles/cmTC
6a5d8.dir/build.make CMakeFiles/cmTC6a5d8.dir/build
make[1]: Entering directory '/home/nathan/cadabra2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC
6a5d8.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC6a5d8.dir/CheckSymbolExists.c.o -c /home/nathan/cadabra2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC
6a5d8
/usr/bin/cmake -E cmakelinkscript CMakeFiles/cmTC6a5d8.dir/link.txt --verbose=1
/usr/bin/cc -rdynamic CMakeFiles/cmTC
6a5d8.dir/CheckSymbolExists.c.o -o cmTC6a5d8
CMakeFiles/cmTC
6a5d8.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x1b): undefined reference topthreadcreate'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC
6a5d8.dir/build.make:97: recipe for target 'cmTC6a5d8' failed
make[1]: *** [cmTC
6a5d8] Error 1
make[1]: Leaving directory '/home/nathan/cadabra2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC6a5d8/fast' failed
make: *** [cmTC
6a5d8/fast] Error 2

File /home/nathan/cadabra2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */

include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;

ifndef pthread_create

return ((int*)(&pthread_create))[argc];

else

(void)argc;
return 0;

endif

}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/nathan/cadabra2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC40720/fast"
/usr/bin/make -f CMakeFiles/cmTC
40720.dir/build.make CMakeFiles/cmTC40720.dir/build
make[1]: Entering directory '/home/nathan/cadabra2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC
40720.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECKFUNCTIONEXISTS=pthreadcreate -o CMakeFiles/cmTC40720.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC40720
/usr/bin/cmake -E cmake
linkscript CMakeFiles/cmTC40720.dir/link.txt --verbose=1
/usr/bin/cc -DCHECKFUNCTIONEXISTS=pthreadcreate -rdynamic CMakeFiles/cmTC40720.dir/CheckFunctionExists.c.o -o cmTC40720 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC
40720.dir/build.make:97: recipe for target 'cmTC40720' failed
make[1]: *** [cmTC
40720] Error 1
make[1]: Leaving directory '/home/nathan/cadabra2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC40720/fast' failed
make: *** [cmTC
40720/fast] Error 2

Cmake:

cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Git found: /usr/bin/git


Building Cadabra version 2.3.6.5 (64-bit)

-- Build id '2690.508b5e9f8b' dated 2021-01-23
-- Build mode is set to ''
-- Install directory set to /usr/local
-- This is an Ubuntu 18.04 system
-- Building tweak version
-- Building in user mode
-- Building tests


Configuring Mathematica

CMake Error at CMakeLists.txt:225 (cmake_policy):
Policy "CMP0077" is not known to this version of CMake.

-- Could NOT find MathematicaWSTP (missing: MathematicaWSTPLIBRARY MathematicaWSTPINCLUDEDIR) (found version "")
-- Could NOT find Mathematica (missing: MathematicaROOTDIR MathematicaKERNELEXECUTABLE MathematicaFRONTENDEXECUTABLE MathematicaWSTPLIBRARY MathematicaWSTPINCLUDE_DIR) (found version "")


Configuring Python

-- Building for use with Python 3 (good!)
-- pybind11 v2.6.1 dev1
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
-- Found PythonLibs: /usr/lib/x8664-linux-gnu/libpython3.6m.so
-- Performing Test HAS
FLTO
-- Performing Test HASFLTO - Success
-- Found python /usr/lib/x86
64-linux-gnu/libpython3.6m.so
-- Python version is 3.6.
-- Installing Python module in /usr/local/lib/python3.6/site-packages
-- Python abi name cpython-36m-x86_64-linux-gnu


Configuring Jupyter kernel

-- Building the default Jupyter kernel


Configuring client-server

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'glibmm-2.4'
-- Found glibmm-2.4, version 2.56.0
-- Found glibmm; include path /usr/include/glibmm-2.4;/usr/lib/x8664-linux-gnu/glibmm-2.4/include;/usr/include/glib-2.0;/usr/lib/x8664-linux-gnu/glib-2.0/include;/usr/include/sigc++-2.0;/usr/lib/x8664-linux-gnu/sigc++-2.0/include
-- Found glibmm; lib glibmm-2.4;gobject-2.0;glib-2.0;sigc-2.0
-- Checking for module 'sqlite3'
-- Found sqlite3, version 3.22.0
-- Found sqlite3 library path sqlite3
-- Found sqlite3 include path
-- Found SQLITE3: sqlite3
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread
create
-- Looking for pthreadcreate - not found
-- Looking for pthread
create in pthreads
-- Looking for pthreadcreate in pthreads - not found
-- Looking for pthread
create in pthread
-- Looking for pthreadcreate in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- program
options
-- date_time
-- filesystem
-- Not building Xeus Jupyter kernel


Configuring core

-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- Found glibmm; include path /usr/include/glibmm-2.4;/usr/lib/x8664-linux-gnu/glibmm-2.4/include;/usr/include/glib-2.0;/usr/lib/x8664-linux-gnu/glib-2.0/include;/usr/include/sigc++-2.0;/usr/lib/x8664-linux-gnu/sigc++-2.0/include
-- Found glibmm; lib glibmm-2.4;gobject-2.0;glib-2.0;sigc-2.0
-- Found gmp header at /usr/include/x86
64-linux-gnu
-- Found gmp library at /usr/lib/x86_64-linux-gnu/libgmp.so
-- Found gmp
-- Found gmpxx
-- Building without Mathematica support


Configuring packages

-- Packages built in /home/nathan/cadabra2/build/core/packages/cdb
-- gaugetheory_init
-- gauge
theory_instantons


Configuring native notebook frontend

-- Checking for module 'gtkmm-3.0'
-- Found gtkmm-3.0, version 3.22.2
-- Found gtkmm
-- Using GTKMM frontend
-- Found sqlite3 library path sqlite3
-- Found sqlite3 include path
-- Found glibmm; include path /usr/include/glibmm-2.4;/usr/lib/x8664-linux-gnu/glibmm-2.4/include;/usr/include/glib-2.0;/usr/lib/x8664-linux-gnu/glib-2.0/include;/usr/include/sigc++-2.0;/usr/lib/x86_64-linux-gnu/sigc++-2.0/include
-- Found glibmm; lib glibmm-2.4;gobject-2.0;glib-2.0;sigc-2.0
-- Found gtkmm
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- Installing LaTeX style files in /usr/local/share/cadabra2/latex


Configuring tests

-- Set PYTHONPATH for testing to :/home/nathan/cadabra2/libs/appdirs:/home/nathan/cadabra2/core/packages:/home/nathan/cadabra2/core:/home/nathan/cadabra2/build/core/packages:/home/nathan/cadabra2/build/core/:/home/nathan/cadabra2/build/core/:/home/nathan/cadabra2/tests


Configuring documentation

-- Book will be created in /home/nathan/cadabra2/build/book


All scripts completed

-- Configuring incomplete, errors occurred!
See also "/home/nathan/cadabra2/build/CMakeFiles/CMakeOutput.log".
See also "/home/nathan/cadabra2/build/CMakeFiles/CMakeError.log".

asked in Installation trouble by (180 points)

FYI, I tried it on Ubuntu 20 and it works fine. Maybe just a quirk of my system....

1 Answer

0 votes

Configure with

 cmake -DENABLE_MATHEMATICA=OFF ..

For some reason the script which tries to locate Mathematica messes up other parts of the CMake procedure.

answered by (61.8k points)
...