Adacore GNATCOLL library not installing on CentOS 8 - linux

I have recently been using the gnatcoll library on CentOS 7 and Debian 9, the installation process for both operating systems has been the same.
When I attempt this install on CentOS 8, I recieve the following error msg:
[lloyd#localhost sql]$ PATH=/home/lloyd/opt/GNAT/2020/bin:$PATH
[lloyd#localhost sql]$ make setup
[lloyd#localhost sql]$ make
gprbuild -p -m --target=x86_64-linux -j0 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
gnatcoll_sql.gpr
Compile
[Ada] gnatcoll-sql_impl.adb
[Ada] gnatcoll-sql_fields.adb
[Ada] gnatcoll-sql.adb
[Ada] gnatcoll-sql-orm.adb
gnatcoll-sql_impl.adb:1679:44: "UTC_Time_Offset" is not visible (more references follow)
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-catizo.ads:28
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-calend.ads:403
gnatcoll-sql_impl.adb:1679:44: "UTC_Time_Offset" is not visible (more references follow)
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-catizo.ads:28
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-calend.ads:403
gnatcoll-sql_impl.adb:1679:44: "UTC_Time_Offset" is not visible (more references follow)
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-catizo.ads:28
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-calend.ads:403
compilation of gnatcoll-sql.adb failed
compilation of gnatcoll-sql_fields.adb failed
compilation of gnatcoll-sql_impl.adb failed
gprbuild: *** compilation phase failed
make: *** [Makefile:116: build-static] Error 4
[lloyd#localhost sql]$ gcc --version
gcc (GCC) 9.3.1 20200430 (for GNAT Community 2020 20200818)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
See your AdaCore support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Any advice on how to resolve this issue and install the library would be much appreciated.
Thanks,
Lloyd

My former answer was slightly off: so you can't build it with GNAT CE 2020 out-of-the-box as the version of GNATCOLL-core that ships with GNAT CE 2020 is behind. GNATCOLL-db depends on GNATCOLL-core, and the latter has been updated.
So, you first have to build and install the updated GNATCOLL-core and then build GNATCOLL-db. However still, if you're in a hurry, you can also checkout and build a slightly older branch (e.g. 20.2).

Related

Downgrading MSYS2 to a specific Mingw / gcc version

I have MSYS2 64 bit installed in my system.
When I try to check the gcc version, I am getting the following output.
$ gcc --version
gcc.exe (Rev9, Built by MSYS2 project) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
But I want to use a specific mingw version for my project which uses qt library.
When I check my build log and installation folder of my qt project I found this.
|Project name: DataManager
|Project version: undefined
|C++ compiler for the host machine: ccache c++ (gcc 4.9.2 "c++ (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2")
|C++ linker for the host machine: c++ ld.bfd 2.24
|Program python3 found: YES
|Found qmake: C:\Qt\5.6.3\mingw49_32\bin\qmake.EXE (5.6.3)
I am assuming that it uses mingw49_32 version and gcc version 4.9.2.
I would like to use the same gcc version (4.9.2) in MSYS2.
How can I achieve it ?
You can't do that with MSYS2. Old packages are eventually removed from MSYS2 repos, so even if it had GCC 4.9 at some point in the past, it no longer does. The earliest available version is GCC 9.3.
Even if it was in the repo, you'd have to manually download and install it and all its dependencies, since there's no way to download outdated packages directly from pacman.
But, I suspect that:
You already have GCC 4.9 installed in C:\Qt\5.6.3\mingw49_32\bin.
Even if you don't, you might be able to get away with using an up-to-date GCC.

GLIBC_2.17 have been installed but still got "`GLIBC_2.14' not found " error

I am a green hand about linux and I am using a server to run my R code through qsub xx.pbs. When I library "Rcpp" package, I got this error:
Error: package or namespace load failed for ‘Rcpp’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/data/user77/Rlib/Rcpp/libs/Rcpp.so':
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /data/user77/Rlib/Rcpp/libs/Rcpp.so)
However, when I used ldd --version to find out what is the current version of glibc, I got this:
ldd (GNU libc) 2.17
When I ran /lib64/libc.so.6, I got this:
GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.7 20120313 (Red Hat 4.4.7-23).
Compiled on a Linux 2.6.32 system on 2021-01-02.
How can I fix this problem? Thanks a lot for your providing solutions!
(PS: I am not allowed to use sudo.)

Changing default compiler from clang to gnu gcc in termux

I want to set default compiler from clang to gcc in termux (android application).
gcc isn't available in official repo so I used pointless community repo. But now I can't configure the termux to use gcc instead of clang.
usr/bin/ contain g++, gcc, gcc-8, g++8.
But gcc --version command shows default clang.
gcc-8 --version shows:
"CANNOT LINK EXECUTABLE "gcc-8" : library "libc++_shared.so" not found
linker: CANNOT LINK EXECUTABLE "gcc-8": library "libc++_shared.so" not found.
I had this problem as well. The question that is asked by #Andy J is unfortunately less than helpful because there is not even ldconfig in this environment and I saw on Reddit that one of the developers said it's not even needed. (I doubt they are correct but it's not needed to fix this problem.
Do:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib
export PATH=$PATH:$PREFIX/lib
Then finally you should be able to use GCC version 8.0.
~/gccbuild $ gcc-8 --version gcc-8 (GCC) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for
copying conditions. There is NO
warranty; not even for MERCHANTABILITY or F
FITNESS FOR A PARTICULAR PURPOSE.
Personally I'm trying to install it so that I can compile GCC 12, wish me luck with that lol.

gcov not showing any coverage data

I am trying to use gcov on Linux(Ubuntu) to see frequency of execution for each line of source.
I have added following flags to my gcc compiler and linker flags,
CCFLAGS = -fprofile-arcs -ftest-coverage
LDFLAGS = -fprofile-arcs -lgcov
but after compiling and running the program, i see no *.gcda file created. As a result of which when i run
gcov --object-directory <path to the *.gcno/*.gcda files> myfile.cpp
Shows error:
myfile.gcda:cannot open data file, assuming not executed
File '../../../../../code/myfile.cpp'
Lines executed:0.00% of 2625
Am i missing something. How to fix this?
You can use __gcov_flush() method inside your code.
You will need to invoke this from registered signal handler.
See:
https://www.osadl.org/fileadmin/dam/interface/docbook/howtos/coverage.pdf
Using this, you can keep your service running and issue "kill" whenever you need to dump coverage data.
Hope that helps....
make sure the gcov and gcc are of the same version :), this where many of the people fail to check.
$gcc --version
gcc (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ find /usr/lib/gcc -name libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/32/libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/libgcov.a
so the gcc version you have loaded should be atleast in the available list of libgcov.a

Trying to run faac's bootstrap script but running into errors

I'm trying to install faac and am running into errors. Here are the errors I get when trying to build it:
[root#test faac]# ./bootstrap
configure.in:11: warning: underquoted definition of MY_DEFINE
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
aclocal:configure.in:17: warning: macro `AM_PROG_LIBTOOL' not found in library
common/mp4v2/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
common/mp4v2/Makefile.am:5:
common/mp4v2/Makefile.am:5: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
common/mp4v2/Makefile.am:5: to `configure.in' and run `aclocal' and `autoconf' again.
libfaac/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
libfaac/Makefile.am:1:
libfaac/Makefile.am:1: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
libfaac/Makefile.am:1: to `configure.in' and run `aclocal' and `autoconf' again.
configure.in:17: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Does anyone know what this means? I was unable to find anything about this so I figured I'd ask you guys. Thank you for your help.
EDIT:
Here's my versions of linux, libtool, automake and autoconf:
[root#test faac]# libtool --version
ltmain.sh (GNU libtool) 2.2
Written by Gordon Matzigkeit <gord#gnu.ai.mit.edu>, 1996
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root#test faac]# autoconf --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root#test faac]# automake --version
automake (GNU automake) 1.9.2
Written by Tom Tromey <tromey#redhat.com>.
Copyright 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root#test faac]# cat /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant)
I think the first thing to check is that you have libtool installed.
Edit:
This is what I get on Ubuntu 8.04:
$ ./bootstrap
configure.in:11: warning: underquoted definition of MY_DEFINE
configure.in:11: run info '(automake)Extending aclocal'
configure.in:11: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:4: installing `./install-sh'
configure.in:4: installing `./missing'
common/mp4v2/Makefile.am: installing `./depcomp'
$ libtool --version
ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-1ubuntu1 (1.1220.2.493 2008/02/01 16:58:18)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ autoconf --version
autoconf (GNU Autoconf) 2.61
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
$ automake --version
automake (GNU automake) 1.10.1
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey#redhat.com>
and Alexandre Duret-Lutz <adl#gnu.org>.
So your problem is that automake/conf don't know about libtool.
You need to reinstall all of them. Either from all from source, or all from binary packages.
If installing from source, ensure they are all installed to the same location.
Maybe your automake doesn't know about your libtool for some reason. It looks like you've got two copies of libtool installed, which might be confusing it.
Maybe you should remove both copies, plus all automake, autoconf installs, and reinstall them (possibly from source?).
I guess the first step is to find out the locations of the active copies of the tools:
which libtool
which automake
which autoconf
It sounds like autoconf/automake cannot find libtool.m4, and therefore cannot resolve the macro AM_PROG_LIBTOOL. Look for this file under your libtool installation and copy/link it under /usr/share/aclocal/.

Resources