ibex-team / ibex-lib

IBEX is a C++ library for constraint processing over real numbers.
http://ibex-team.github.io/ibex-lib/
GNU Lesser General Public License v3.0
69 stars 51 forks source link

[cmake] pkg config does not include gaol/soplex directories #493

Closed gchabert closed 3 years ago

gchabert commented 3 years ago

If I run pkg-config --libs ibex, the librairies are present but not their directories:

-L/.../ibex/lib -L/.../ibex/lib/3rd -libex -lgaol -lgdtoa -lultim -lsoplex

Note that goal, gdtoa and ultim libraries are under .../ibex/lib/ibex/3rd but the soplex library is only in the build folder (seems to be not installed)

So when I install ibex in a local folder (-DCMAKE_INSTALL_PREFIX=...) the 3rd libraries are not found at link time.

cyrilbouvier commented 3 years ago

What version did you use ? Can you try with the latest commit on the develop branch.

With the following cmake command:

cmake -DCMAKE_INSTALL_PREFIX=/home/cyril/work/ibex-lib/install/ibex6 -DINTERVAL_LIB=gaol -DLP_LIB=soplex ..

I obtain the following ibex.pc file

prefix=/home/cyril/work/ibex-lib/install/ibex6
includedir=${prefix}/include
libdir=${prefix}/lib

Name: ibex
Description: A C++ library for interval-based algorithm design
Url: http://www.ibex-lib.org/
Version: 2.8.9.1
Cflags: -I${includedir} -I${includedir}/ibex -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd/soplex
Libs: -L${libdir} -libex -L${libdir}/3rd -lgaol -lgdtoa -lultim -lsoplex

Edit: A bug regarding the installation of soplex library remains. After make install I have the following tree for the lib directory:

lib/
├── ibex
│   └── 3rd
│       ├── libgaol.a
│       ├── libgdtoa.a
│       └── libultim.a
└── libibex.a

libsoplex.a is missing. I will look into that.

gchabert commented 3 years ago

I still have the same problem with your latest commit. I made: cmake .. -DCMAKE_INSTALL_PREFIX=/home/gilles/ibex -DLP_LIB=soplex -DINTERVAL_LIB=gaol And my ibex.pc file is now:

prefix=/home/gilles/ibex
includedir=${prefix}/include
libdir=${prefix}/lib

Name: ibex
Description: A C++ library for interval-based algorithm design
Url: http://www.ibex-lib.org/
Version: 2.8.9.1
Cflags: -I${includedir} -I${includedir}/ibex -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd -I${includedir}/ibex/3rd/soplex
Libs: -L${libdir} -libex -L${libdir}/3rd -lgaol -lgdtoa -lultim -lsoplex

When I compile an example, I have the following errors:

/usr/bin/ld: cannot find -lgaol
/usr/bin/ld: cannot find -lgdtoa
/usr/bin/ld: cannot find -lultim
/usr/bin/ld: cannot find -lsoplex

But now, the missing libraries have moved to different folders. For example, gaol is only located here: /home/gilles/ibex/ibex-lib/build/interval_lib_wrapper/gaol/gaol-4.2.0-build/libgaol.a

cyrilbouvier commented 3 years ago

First I fixed the problem with soplex in commit 1615bd10.

What is the output of pkg-config --libs ibex ? I think I see the problem: in the ibex.pc file, there is -L${libdir}/3rd but it should be -L${libdir}/ibex/3rd. I will look into that.

cyrilbouvier commented 3 years ago

Can you try with commit 14ddf884 ?

gchabert commented 3 years ago

Tout fonctionne bien désormais. Merci !