Open evanescente-ondine opened 1 month ago
This error indicates the Perl Compatible Regular Expression (PCRE) library or its header files (.h) are missing on your computer.
You may install them with your Linux's installation tool using the name libpcre-dev, libpcre-devel or a similar name then type gmake again. You can also turn off PCRE support with configure --without-pcre and SparForte will disable this feature and build without including it.
But I want PCREs. I have both libpcre2-dev (10.42-4+b1) and libpcre3-dev (2:8.39-15) installed. But I get the same:
gcc -I./adacgi-1.6/ -I./apq-2.1/ -I./pegasock/ -I/usr/include/SDL -D_GNU_SOURCE=1 -I./bdb/ -I./areadline/ -lpcre -I/usr/include/SDL -D_GNU_SOURCE=1 -Wall -Werror -fstack-protector -O1 -D_FORTIFY_SOURCE=2 -c c_rl.c c_rl.c:4:10: fatal error: readline/readline.h: No such file or directory 4 | #include <readline/readline.h> | ^
~~~~
As before, you are missing the GNU Readline library header (.h) files.
The C header files are equivalent to the Ada ".ads" package specification files. As you cannot build an Ada program without the specifications, you cannot compile C programs without the specifications in the headers. These are needed for building any project from sources, not just SparForte.
When you see an "include" error like this, it is because you are missing these C header files needed to compile sources, or in rare cases, the header file may be in an unusual location.
The provision.sh script installs all the necessary files if you don't already have them, if it is a version of Linux it recognizes. If you have none of the C specification files, you may also have to install them for mysql, postgres, libsdl and a few other standard C libraries.
You may install the missing specifications with your Linux's installation tool using the name libreadline-dev, libreadline-devel or similar. You may also disable readline with the configure script, although I wouldn't recommend that as the old command line has many missing features.
Sorry I had missed provision.sh. I ran it and now the only missing dependency is libmariadbclient-dev. On internet I can read:
The package
libmariadbclient-dev
has been removed in latest MariaDB 10.5 in Debian and Ubuntu, and installing libmariadbclient-dev will plain fail in the future. Thus in future you should start using the packagelibmariadb-dev
instead to achieve the same thing.
Putting that aside, the configure script succeeds. Then gmake fails here:
/usr/include/mariadb/errmsg.h:40:31: error: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
So it doesn't seem something I can do without.
This issue seems to be a bug in MariaDB, where they assign text to an integer variable. Newer versions of C do not allow this. I mention this issue on the website on the release announcement.
I don't have a workaround for this. You can use configure --without-mysql to disable MariaDB/MySQL support.
Understood, I did that and the error went away. The newer, later one is :
gcc -c -O1 -march=athlon64 -gnat12 -gnatfaoN -gnatVaep -gnateEeEeF -fstack-protector -I./adacgi-1.6/ -I./apq-2.1/ -I./pegasock/ -I/usr/include/SDL -D_GNU_SOURCE=1 -I./bdb/ -I./areadline/ -lpcre parser_pragmas.adb parser_memcache.adb:103:01: warning: type "aMemcacheClusterEntry" is frozen by body [enabled by default] parser_memcache.adb:103:01: warning: an equality operator cannot be declared after this point [enabled by default] parser_memcache.adb:108:10: error: equality operator must be declared before type "aMemcacheClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) parser_memcache.adb:152:01: warning: type "aMemcacheDualClusterEntry" is frozen by body [enabled by default] parser_memcache.adb:152:01: warning: an equality operator cannot be declared after this point [enabled by default] parser_memcache.adb:157:10: error: equality operator must be declared before type "aMemcacheDualClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) +===========================GNAT BUG DETECTED==============================+ | 14.2.0 (x86_64-pc-linux-gnu) GCC error: | | in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:464 | | Error detected at parser_pen.adb:4017:61 | | Compiling parser_pen.adb | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+
My version of gnat is 14.2.1, if that helps, but I doubt it would. Those are a LOT of things not working from the get go. sparforte being on alire would help. Though I don't know how difficult the porting would be.
I understand and share your frustration.
SparForte is tested and successfully built on Linux Mint (Ubuntu) 19, 20, 21, Red Hat 9, OpenSuse Linux 15 and Raspberry Pi (based on Debian 11)--successful except for the MariaDB issue. It is occasionally tested on FreeBSD and Windows, as I have time.
Most current stable versions of Linux use Gnat 12 and this is the version SparForte has been tested against. Gnat 14.2 is an advanced version of Ada that is is not yet generally available on stable releases of Linux. SparForte has not been tested on Gnat 14.
We reported this GCC Ada bug to the GCC Ada team, but they have indicated their intake process cannot handle a project as large as SparForte. The GCC Ada team have had bug reports opened for similar issues in recent versions of GCC Ada and they are working to resolve them. The "GNAT BUG DETECTED" message comes from the Ada compiler, not SparForte.
There have been attempts to add SparForte to Alire. SparForte is a mix of Ada and C which has been difficult to migrate to Alire.
To review:
Do not try to run the pre-built version of SparForte on a version of Linux it was built for. Remember to install dependencies before trying to compile SparForte from sources. There is a MariaDB bug that is not released to SparForte. There is a bug in an unstable/advanced version of Ada compiler, and this bug is not related to SparForte. This bug is affecting other projects as well.
There's no known solution for the GCC 14 issue. See https://github.com/kburtch/SparForte/issues/27.
I've added a warning to the website download page.
My only suggestion is to try building SparForte on an older version of Linux using GCC 12.
Hello, the prebuilt binary fails because the version of libmysqlclient-dev you use is outdated. It's not possible to get on debian it seems. I get
I try to build from source, but I get, after
gmake
: