Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried building Sparforte with FSF GCC 13 recently? #27

Closed
jrmarino opened this issue Aug 10, 2023 · 11 comments
Closed

Tried building Sparforte with FSF GCC 13 recently? #27

jrmarino opened this issue Aug 10, 2023 · 11 comments

Comments

@jrmarino
Copy link

Sparforte currently doesn't build for me since switching from GCC 11.2 to GCC 13.2

The first issue was stopped on a treat-warnings-as-errors here:

parser_memcache.adb:105:01: warning: type "aMemcacheClusterEntry" is frozen by body [enabled by default]
parser_memcache.adb:105:01: warning: an equality operator cannot be declared after this point [enabled by default]
parser_memcache.adb:110:10: warning: equality operator must be declared before type "aMemcacheClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) [enabled by default]
parser_memcache.adb:110:10: warning: equality operation may not compose [enabled by default]
parser_memcache.adb:154:01: warning: type "aMemcacheDualClusterEntry" is frozen by body [enabled by default]
parser_memcache.adb:154:01: warning: an equality operator cannot be declared after this point [enabled by default]
parser_memcache.adb:159:10: warning: equality operator must be declared before type "aMemcacheDualClusterEntry" is frozen (RM 4.5.2 (9.8)) (Ada 2012) [enabled by default]
parser_memcache.adb:159:10: warning: equality operation may not compose [enabled by default]

I got past that by adding the "-gnatd.E" flag.

But a bit further it crashed again due to a compiler ICE:

+===========================GNAT BUG DETECTED==============================+
| 13.2.0 (x86_64-raven-freebsd13) GCC error:                               |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:475                  |
| 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.                                       |
+==========================================================================+

The ICE isn't the code's fault but there might be during coding choice that works around it.

In any case I would be interested to hear if these issues can be reproduced by others.

@kburtch
Copy link
Owner

kburtch commented Aug 15, 2023

I have not heard of anyone else reporting these issues.
I plan to return to work on SparForte in the fall, anticipating another spring release.

@jrmarino
Copy link
Author

Well, until proven otherwise, I'm going to assume that this is reproducible and that nobody with the latest release of GCC (aka FSF gnat) can build sparforte.

@jrmarino
Copy link
Author

For the record, the new release 2.6.2 also cannot be built by GCC 13 - due to the same GNAT Bug ICE

@bluebat
Copy link

bluebat commented Apr 20, 2024

Same on Fedora Linux with GCC 13.
After removing all lines with 'param_ptr :=' in src/parser_pen.adb and adding '-gnatwv' flag, 'make' passed.

@kburtch
Copy link
Owner

kburtch commented Apr 20, 2024

This is one of the top items in the TODO file.

The database and graphics packages are two of the largest and oldest components in SparForte and both need to be rebuilt.
As GCC 13 starts entering stable Linux distributions, both of these packages will be come harder to maintain. Raspberry Pi Bookworm is only the first stable distribution with this problem. At least now I can reproduce it.

I understand the issue but I have a full-time job and am a caretaker in my family. I'm limited to about 30 minutes work per week on SparForte right now. Unless some volunteers can assist, the best I can do is temporarily remove the pen package until the issues can be resolved. That will break some of my own projects that use the pen package but it will keep SparForte compiling.

@jrmarino
Copy link
Author

I just want to point out that a GNAT BUG is a defect in the compiler (Internal Compiler Error).
Technically there is probably nothing wrong with the code since it compiled with previous versions of GNAT.
In my opinion, the first step is to make a small, compat test case that invokes the ICE, and then open a bug report at GNU/GCC so the bug can be fixed for later releases.

After that, then sure, if alternate code avoids the ICE, then a patch can be provided if not outright change the code.

@kburtch
Copy link
Owner

kburtch commented May 6, 2024

Bug report has been submitted.

@kburtch
Copy link
Owner

kburtch commented May 7, 2024

Bug report rejected because I have not created a small example.
GCC recommends using newer compilers when they become available.

@jrmarino
Copy link
Author

GCC will fix ICEs quickly if they they can be reproduced easily, but them saying to "try newer compilers" is not good advice. In my experience, once they introduce a gnat bug, it persist to newer releases.

@kburtch
Copy link
Owner

kburtch commented Jun 27, 2024

I have update the --without-sdl option to not compile any SDL dependencies and have removed the "nosdl" files. The language is passing tests. However, when I try a clean virtual machine with no SDL C libraries present, it builds but when I run it the language is raising exceptions for unknown reasons when running commands. I will continue to investigate.

@kburtch
Copy link
Owner

kburtch commented Jul 2, 2024

I wasn't able to duplicate the exceptions when performing the same build on Rocky Linux. I've released a new version 2.6.3 with the ability to disable SDL through the gnat preprocessor as a workaround for the GCC 13 issues.

@kburtch kburtch closed this as completed Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants