Open freedxmgxd opened 1 week ago
What is the output from the following two commands?
pkg-config --cflags --libs cantera
g++ -E -x c++ - -v < /dev/null
And can you attach a copy of the cantera.pc
file, which I think will have been installed in /usr/lib/pkgconfig/
or some similar directory?
pkg-config --cflags --libs cantera
-isystem /usr/include/eigen3 -isystem /usr/include/sundials -std=c++17 -pthread -isystem /usr/include -Wl,-rpath,/usr/lib -lcantera_shared -lfmt -lpthread
g++ -E -x c++ - -v < /dev/null
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20240910 (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/cc1plus -E -quiet -v -D_GNU_SOURCE - -mtune=generic -march=x86-64 -dumpbase -
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/backward
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include
/usr/local/include
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include-fixed
/usr/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "<stdin>"
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../:/lib/:/usr/lib/
I ascrescented .txt in the end of the cantera/pc file so I can attach it here.
Can you share the contents of your cantera.conf
file? If you're using packages installed in the system default locations, you shouldn't need to specify those locations (for example, /usr/include
) to SCons when building Cantera. I think this may be part of the problem here, judging from this StackOverflow post.
In general, I believe it to be preferable to post about installation question on Cantera's user group.
This the cantera.conf
I tried to build without locations, don't works However, manually changing -isystem /usr/include -I /usr/include works fine, but I would like to persist this in pkg-config if possible.
Also remove -isystem /usr/include at all seems works too, running g++ main/main.cpp -o myProgram -std=c++17 -pthread -Wl,-rpath,/usr/lib -lcantera_shared -lfmt -lpthread
Cantera Version 3.0.0
When I tried to run the example of C++ program get error in math.h g++ main/main.cpp -o myProgram -std=c++17 $(pkg-config --cflags --libs cantera)
I get the error:
The math.h is installed and seems works fine in another projects.