Closed francesco-ballarin closed 1 year ago
Hi @minrk, I bump this issue, since we just had the same report at https://github.com/multiphenics/multiphenicsx/discussions/12.
Thanks!
Hi @francesco-ballarin and @minrk ,
I ran into the same problem, and figured out that it can be easily solved with just installing pkg-config
in the conda environment.
More precisely, in the environment with dolfinx run
conda install -c conda-forge pkg-config
Before the installation I had
$ pkg-config dolfinx --cflags
Package dolfinx was not found in the pkg-config search path.
Perhaps you should add the directory containing `dolfinx.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dolfinx' found
After installation:
$ pkg-config dolfinx --cflags
-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/fenics-dolfinx-split_1676643338970/work=/usr/local/src/conda/fenics-libdolfinx-0.6.0 -fdebug-prefix-map=/home/user/mambaforge/envs/fenicsx-env=/usr/local/src/conda-prefix -DDOLFINX_VERSION=\"0.6.0\" -DDOLFINX_VERSION=0.6.0 -DHAS_ADIOS2 -DHAS_SLEPC -DHAS_PARMETIS -DPKG_BASIX_DEFINITIONS-NOTFOUND -isystem /home/user/mambaforge/envs/fenicsx-env/include -I/home/user/mambaforge/envs/fenicsx-env/include -IPKGCONFIG_DOLFINX_INCLUDE_DIRECTORIES-NOTFOUND
Hope it helps
Nice, sounds like pkg-config should be a dependency of the dolfinx package.
Great, thanks @EvgeniyAzarov and @minrk
Hi, I am moving here the discussion from https://github.com/multiphenics/multiphenicsx/commit/b80f047c74827497ad6d1a689173d24e2e506974
It seems that conda packages do not ship
pkgconfig
info for dolfinx:When building from source, I get instead
The file responsible for the compilation of the C++ backend in the
multiphenicsx
repo is https://github.com/multiphenics/multiphenicsx/blob/b80f047c74827497ad6d1a689173d24e2e506974/multiphenicsx/cpp/compile_code.py and I am actually surprised howmultiphenicsx
ever worked withdolfinx
from conda, considering that withoutpkgconfig
infomultiphenicsx
e.g. never links topetsc
! (my gut feeling is that, sincemultiphenicsx
importsdolfinx
anddolfinx
importsdolfinx.cpp
, thenpetsc
and all other shared libraries are getting loaded bydolfinx.cpp
in the python process, and this somehow defines symbols to be used afterwards also formultiphenicsx.cpp
)Please ping @hermanmakhm if tests on the actual conda environment need to be run, since I don't have access to it.