Closed vsht closed 6 years ago
Hi Vladyslav,
there seems to be something wrong with your GiNaC installation.
The message ERRORheader version differs from the library one, please check your installation. indicates that the C++ compiler finds both a header file ginac.h and a library file (something like libginac.so) on your system but they belong to different GiNaC versions. Did you install multiple GiNaC versions on your system (maybe from the package manager AND from some source packages on www.ginac.de)? You can try to locate both the header file and the library file, then uninstall GiNaC (if you installed it with the package manager) and then check if the two files are really gone. If not, also remove these files from your system. Then try to reinstall GiNaC again. (I usually compile GiNaC myself from the source packages on www.ginac.de).
Cheers, Mario
Hi Mario,
thanks for your prompt reply. Actually I only installed ginac
and ginac-devel
from the official Fedora repository, no multiple versions etc.
$ sudo dnf info ginac
Installed Packages
Name : ginac
Version : 1.7.2
Release : 4.fc26
Arch : x86_64
Size : 2.6 M
Source : ginac-1.7.2-4.fc26.src.rpm
Repo : @System
From repo : fedora
Summary : C++ library for symbolic calculations
URL : http://www.ginac.de/
License : GPLv2+
Description : GiNaC (which stands for "GiNaC is Not a CAS (Computer Algebra System)") is an
: open framework for symbolic computation within the C++ programming language.
Name : ginac-devel
Version : 1.7.2
Release : 4.fc26
Arch : x86_64
Size : 963 k
Source : ginac-1.7.2-4.fc26.src.rpm
Repo : @System
From repo : fedora
Summary : Development files for ginac
URL : http://www.ginac.de/
License : GPLv2+
Description : This package contains libraries and header files for
: developing applications that use ginac.
Name : ginac-utils
Version : 1.7.2
Release : 4.fc26
Arch : x86_64
Size : 216 k
Source : ginac-1.7.2-4.fc26.src.rpm
Repo : @System
From repo : fedora
Summary : GiNaC-related utilities
URL : http://www.ginac.de/
License : GPLv2+
Description : This package includes ginsh ("GiNaC interactive shell") which provides a
: simple and easy-to-use CAS-like interface to GiNaC for non-programmers, and
: the tool "viewgar" which displays the contents of GiNaC archives.
$sudo dnf repoquery -l ginac
/usr/lib/libginac.so.6
/usr/lib/libginac.so.6.0.2
/usr/libexec/ginac-excompiler
/usr/share/licenses/ginac
/usr/share/licenses/ginac/COPYING
/usr/lib64/libginac.so.6
/usr/lib64/libginac.so.6.0.2
/usr/libexec/ginac-excompiler
/usr/share/licenses/ginac
/usr/share/licenses/ginac/COPYING
$sudo dnf repoquery -l ginac-devel
/usr/include/ginac
/usr/include/ginac/add.h
/usr/include/ginac/archive.h
/usr/include/ginac/assertion.h
/usr/include/ginac/basic.h
/usr/include/ginac/class_info.h
/usr/include/ginac/clifford.h
/usr/include/ginac/color.h
/usr/include/ginac/compiler.h
/usr/include/ginac/constant.h
/usr/include/ginac/container.h
/usr/include/ginac/ex.h
/usr/include/ginac/excompiler.h
/usr/include/ginac/expair.h
/usr/include/ginac/expairseq.h
/usr/include/ginac/exprseq.h
/usr/include/ginac/factor.h
/usr/include/ginac/fail.h
/usr/include/ginac/fderivative.h
/usr/include/ginac/flags.h
/usr/include/ginac/function.h
/usr/include/ginac/ginac.h
/usr/include/ginac/hash_map.h
/usr/include/ginac/idx.h
/usr/include/ginac/indexed.h
/usr/include/ginac/inifcns.h
/usr/include/ginac/integral.h
/usr/include/ginac/lst.h
/usr/include/ginac/matrix.h
/usr/include/ginac/mul.h
/usr/include/ginac/ncmul.h
/usr/include/ginac/normal.h
/usr/include/ginac/numeric.h
/usr/include/ginac/operators.h
/usr/include/ginac/parse_context.h
/usr/include/ginac/parser.h
/usr/include/ginac/power.h
/usr/include/ginac/print.h
/usr/include/ginac/pseries.h
/usr/include/ginac/ptr.h
/usr/include/ginac/registrar.h
/usr/include/ginac/relational.h
/usr/include/ginac/structure.h
/usr/include/ginac/symbol.h
/usr/include/ginac/symmetry.h
/usr/include/ginac/tensor.h
/usr/include/ginac/version.h
/usr/include/ginac/wildcard.h
/usr/lib/libginac.so
/usr/lib/pkgconfig/ginac.pc
/usr/share/doc/ginac-devel
/usr/share/doc/ginac-devel/AUTHORS
/usr/share/doc/ginac-devel/NEWS
/usr/share/doc/ginac-devel/README
/usr/share/doc/ginac-devel/ginac.html
/usr/share/info/ginac-examples.info.gz
/usr/share/info/ginac.info.gz
/usr/include/ginac
/usr/include/ginac/add.h
/usr/include/ginac/archive.h
/usr/include/ginac/assertion.h
/usr/include/ginac/basic.h
/usr/include/ginac/class_info.h
/usr/include/ginac/clifford.h
/usr/include/ginac/color.h
/usr/include/ginac/compiler.h
/usr/include/ginac/constant.h
/usr/include/ginac/container.h
/usr/include/ginac/ex.h
/usr/include/ginac/excompiler.h
/usr/include/ginac/expair.h
/usr/include/ginac/expairseq.h
/usr/include/ginac/exprseq.h
/usr/include/ginac/factor.h
/usr/include/ginac/fail.h
/usr/include/ginac/fderivative.h
/usr/include/ginac/flags.h
/usr/include/ginac/function.h
/usr/include/ginac/ginac.h
/usr/include/ginac/hash_map.h
/usr/include/ginac/idx.h
/usr/include/ginac/indexed.h
/usr/include/ginac/inifcns.h
/usr/include/ginac/integral.h
/usr/include/ginac/lst.h
/usr/include/ginac/matrix.h
/usr/include/ginac/mul.h
/usr/include/ginac/ncmul.h
/usr/include/ginac/normal.h
/usr/include/ginac/numeric.h
/usr/include/ginac/operators.h
/usr/include/ginac/parse_context.h
/usr/include/ginac/parser.h
/usr/include/ginac/power.h
/usr/include/ginac/print.h
/usr/include/ginac/pseries.h
/usr/include/ginac/ptr.h
/usr/include/ginac/registrar.h
/usr/include/ginac/relational.h
/usr/include/ginac/structure.h
/usr/include/ginac/symbol.h
/usr/include/ginac/symmetry.h
/usr/include/ginac/tensor.h
/usr/include/ginac/version.h
/usr/include/ginac/wildcard.h
/usr/lib64/libginac.so
/usr/lib64/pkgconfig/ginac.pc
/usr/share/doc/ginac-devel
/usr/share/doc/ginac-devel/AUTHORS
/usr/share/doc/ginac-devel/NEWS
/usr/share/doc/ginac-devel/README
/usr/share/doc/ginac-devel/ginac.html
/usr/share/info/ginac-examples.info.gz
/usr/share/info/ginac.info.gz
Nevertheless, I removed everything and tried to follow your advice, i.e. downloaded GiNaC from the official site (ginac-1.7.2.tar.bz2
) and compiled it in the standard way
./configure && make && make install
Now the library is located in
$ls -al /usr/local/lib
drwxr-xr-x. 4 root root 4,0K 7. Sep 19:49 .
drwxr-xr-x. 13 root root 4,0K 9. Aug 04:21 ..
drwxr-xr-x. 3 root root 4,0K 6. Sep 19:59 cmake
-rwxr-xr-x. 1 root root 323K 6. Sep 19:59 libFermat.so
-rw-r--r--. 1 root root 92M 7. Sep 19:49 libginac.a
-rwxr-xr-x. 1 root root 949 7. Sep 19:49 libginac.la
lrwxrwxrwx. 1 root root 17 7. Sep 19:49 libginac.so -> libginac.so.6.0.2
lrwxrwxrwx. 1 root root 17 7. Sep 19:49 libginac.so.6 -> libginac.so.6.0.2
-rwxr-xr-x. 1 root root 33M 7. Sep 19:49 libginac.so.6.0.2
drwxr-xr-x. 2 root root 4,0K 7. Sep 19:49 pkgconfig
and the headers are at
$ls -al /usr/local/include/ginac
drwxr-xr-x. 2 root root 4,0K 7. Sep 19:49 .
drwxr-xr-x. 3 root root 4,0K 7. Sep 19:35 ..
-rw-r--r--. 1 root root 3,5K 7. Sep 19:49 add.h
-rw-r--r--. 1 root root 12K 7. Sep 19:49 archive.h
-rw-r--r--. 1 root root 1,2K 7. Sep 19:49 assertion.h
-rw-r--r--. 1 root root 11K 7. Sep 19:49 basic.h
-rw-r--r--. 1 root root 5,4K 7. Sep 19:49 class_info.h
-rw-r--r--. 1 root root 15K 7. Sep 19:49 clifford.h
-rw-r--r--. 1 root root 6,6K 7. Sep 19:49 color.h
-rw-r--r--. 1 root root 1,3K 7. Sep 19:49 compiler.h
-rw-r--r--. 1 root root 3,2K 7. Sep 19:49 constant.h
-rw-r--r--. 1 root root 24K 7. Sep 19:49 container.h
-rw-r--r--. 1 root root 4,3K 7. Sep 19:49 excompiler.h
-rw-r--r--. 1 root root 26K 7. Sep 19:49 ex.h
-rw-r--r--. 1 root root 3,5K 7. Sep 19:49 expair.h
-rw-r--r--. 1 root root 7,3K 7. Sep 19:49 expairseq.h
-rw-r--r--. 1 root root 1,2K 7. Sep 19:49 exprseq.h
-rw-r--r--. 1 root root 1,7K 7. Sep 19:49 factor.h
-rw-r--r--. 1 root root 1,5K 7. Sep 19:49 fail.h
-rw-r--r--. 1 root root 3,3K 7. Sep 19:49 fderivative.h
-rw-r--r--. 1 root root 11K 7. Sep 19:49 flags.h
-rw-r--r--. 1 root root 52K 7. Sep 19:49 function.h
-rw-r--r--. 1 root root 1,8K 7. Sep 19:49 ginac.h
-rw-r--r--. 1 root root 16K 7. Sep 19:49 hash_map.h
-rw-r--r--. 1 root root 9,7K 7. Sep 19:49 idx.h
-rw-r--r--. 1 root root 11K 7. Sep 19:49 indexed.h
-rw-r--r--. 1 root root 6,1K 7. Sep 19:49 inifcns.h
-rw-r--r--. 1 root root 2,9K 7. Sep 19:49 integral.h
-rw-r--r--. 1 root root 1,6K 7. Sep 19:49 lst.h
-rw-r--r--. 1 root root 8,0K 7. Sep 19:49 matrix.h
-rw-r--r--. 1 root root 4,1K 7. Sep 19:49 mul.h
-rw-r--r--. 1 root root 3,1K 7. Sep 19:49 ncmul.h
-rw-r--r--. 1 root root 3,9K 7. Sep 19:49 normal.h
-rw-r--r--. 1 root root 11K 7. Sep 19:49 numeric.h
-rw-r--r--. 1 root root 3,7K 7. Sep 19:49 operators.h
-rw-r--r--. 1 root root 3,8K 7. Sep 19:49 parse_context.h
-rw-r--r--. 1 root root 3,6K 7. Sep 19:49 parser.h
-rw-r--r--. 1 root root 4,5K 7. Sep 19:49 power.h
-rw-r--r--. 1 root root 9,0K 7. Sep 19:49 print.h
-rw-r--r--. 1 root root 5,0K 7. Sep 19:49 pseries.h
-rw-r--r--. 1 root root 4,8K 7. Sep 19:49 ptr.h
-rw-r--r--. 1 root root 7,6K 7. Sep 19:49 registrar.h
-rw-r--r--. 1 root root 3,4K 7. Sep 19:49 relational.h
-rw-r--r--. 1 root root 8,2K 7. Sep 19:49 structure.h
-rw-r--r--. 1 root root 4,6K 7. Sep 19:49 symbol.h
-rw-r--r--. 1 root root 7,3K 7. Sep 19:49 symmetry.h
-rw-r--r--. 1 root root 9,5K 7. Sep 19:49 tensor.h
-rw-r--r--. 1 root root 3,2K 7. Sep 19:49 version.h
-rw-r--r--. 1 root root 2,5K 7. Sep 19:49 wildcard.h
Still, cmake fails
$cmake -DCMAKE_INSTALL_PREFIX=/usr/local
-- The C compiler identification is GNU 7.1.1
-- The CXX compiler identification is GNU 7.1.1
-- 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
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.3.8")
-- Checking for module 'cln'
-- Found cln, version 1.3.4
-- found CLN [/usr/include/cln/version.h], version 1.3.4
-- Performing Test _cl_version_matches
-- Performing Test _cl_version_matches - Success
-- Found CLN: /lib64/libcln.so (found suitable version "1.3.4", minimum required is "1.2.2")
-- Checking for module 'ginac'
-- Package 'ginac', required by 'virtual:world', not found
ERRORpkg-config and version.h disagree, vs 1.7.2, please check your installation
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GiNaC (missing: GINAC_LIBRARIES GINAC_INCLUDE_DIRS)
(Required is at least version "1.6.2")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindGiNaC.cmake:155 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
epsilon-prepare/CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also "/media/Data/Projects/Other/epsilon/CMakeFiles/CMakeOutput.log".
As I already wrote, I have a pretty standard Fedora installation, everything (compilers, libraries etc.) are from the official package repository, no multiple versions installed or self-compiled exras. This is why I thought that everything should somehow work out of the box.
The content of CMakeOutput.log is available here
Cheers, Vladyslav
Hi Vladyslav,
at least we have a different message now: ERRORpkg-config and version.h disagree, vs 1.7.2, please check your installation
The cmake module FindGiNaC.cmake uses pkg-config to locate ginac. Try running pkg-config --modversion ginac which should print 1.7.2 in your case. If not, pkg-config didn't find ginac.pc which should be installed at /usr/local/lib/pkgconfig. It might be that pkg-config only looks at /usr/lib/pkgconfig. If this is so, you can add /usr/local/lib/pkgconfig to the environment variable PKG_CONFIG_PATH. You could also try installing ginac into /usr/lib and /usr/include. This can be done with ./configure --prefix=/usr.
Cheers, Mario
Hi Mario,
many thanks, using
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
cmake -DCMAKE_INSTALL_PREFIX=/usr/local
did the trick and epsilon
finally compiled. After that the binaries could not find libFermat.so
and libginac.so.6
, but that was easy to fix via
sudo ln -s /usr/local/lib/libFermat.so /lib64/libFermat.so
sudo ln -s /usr/local/lib/libginac.so.6 /lib64/libginac.so.6
I tried epsilon.sh
in the example
directory and it finished successfully, so I assume that everything
is now working as it should.
Thanks a lot for your help!
Cheers, Vladyslav
Hi Vladyslav,
I am glad to hear that.
Still one remark: Instead of the symlinks, you can add /usr/local/lib permanently to the environment variables LD_LIBRARY_PATH and LIBRARY_PATH. I would recommend this if you are using /usr/local/lib more often.
Cheers, Mario
I had the same problem and I'm also using Fedora 26. Is GiNac package for Fedora 26 is broken?
Hi,
I tried to compile
epsilon
on Fedora Linux 26 (64-bit version) but faced some difficulties that I'm unable to resolve. GiNaC and CLN are installed, libFermat also compiled just fine. However, forepsilon
when I runall I get is
I tried to modify
CMakeLists.txt
by replacingwith
which changed the error output to
Unfortunately, I don't know where to get the corresponding cmake files for GiNaC. Any help would be highly appreciated!
Cheers, Vladyslav