1

I've just start using GNU make because of a software package I'm trying to install. The tutorial is really good, but for some reason I'm not able to do it properly. I downloaded the files, extracted them to a folder, and did the installation. I think it's all correct, but I can't use it as the tutorial explains.

I created a directory with a c++ tutorial file and its Makefile in the same folder, but when I ran make, I received a message:

$ make
g++ -c -o vlasov2d.o vlasov2d.cpp -Wall -g `pkg-config --cflags ibsimu-1.0.6dev`
Package ibsimu-1.0.6dev was not found in the pkg-config search path.
Perhaps you should add the directory containing 'ibsimu-1.0.6dev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ibsimu-1.0.6dev' found
vlasov2d.cpp:1:10: fatal error: epot_bicgstabsolver.hpp: No such file or directory
    1 | #include "epot_bicgstabsolver.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:9: vlasov2d.o] Error 1

As this explains, I tried to insert the path to the .pc files in the pkg-config using PKG_CONFIG_PATH but, for some reason, it doesn't work. The pkg-config still doesn't have the specific path:

$ export PKG_CONFIG_PATH=/home/tanusszabo/Softwares/lib/pkgconfig

$ echo $PKG_CONFIG_PATH /home/tanusszabo/Softwares/lib/pkgconfig

$ pkg-config --variable pc_path pkg-config /usr/local/lib/x86_64-linux-gnu/pkgconfig: /usr/local/lib/pkgconfig: /usr/local/share/pkgconfig: /usr/lib/x86_64-linux-gnu/pkgconfig: /usr/lib/pkgconfig:/usr/share/pkgconfig

Is it possible to add some other path in pkg-config? Or do I need to install the software and its .pc file in a folder that is already in pkg-config?

In case it matters, my Ubuntu version is 20.04.4 LTS, g++ is 9.4.0, and pkg-config is 0.29.1.

The relevant structure of my directories after installation is:

home/tanusszabo/Softwares/    
    include/
        ibsimu-1.0.6/
            many .hpp files (including the epot_bicgstabsolver.hpp)
    lib/
        pkgconfig/
            ibsimu-1.0.6.pc
    Simu/
        test/
            Makefile
            vlasov2d.cpp

The only directory I created was Simu with its files. The include and the lib were created with the installation.

MDeBusk
  • 1,386

0 Answers0