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

Fedora 40 and gcc 14 #37698

Open
2 tasks done
enriqueartal opened this issue Mar 30, 2024 · 35 comments · Fixed by #37537
Open
2 tasks done

Fedora 40 and gcc 14 #37698

enriqueartal opened this issue Mar 30, 2024 · 35 comments · Fixed by #37537
Assignees

Comments

@enriqueartal
Copy link
Contributor

enriqueartal commented Mar 30, 2024

Environment

- **OS**: Fedora 40beta
- **Sage Version**: 10-4beta0

Steps To Reproduce

Fedora 40beta has just arrived, I wanted to check if sage can be built. The first problem is that Fedora 40 is using gcc 14. Instead of using gcc package, I changed spkg-configure.m4 in build/pkgs/gcc and build/pkgs/gfortran to allow gcc 14.

The compilation gave an error for givaro; the patch in linbox-team/givaro#226 works for this. Next problem was with linbox. As a bypass, I used the changed files in #35148. The three packages have been successfully built.

But I stuck at the compilation of sagelib, apparently with ginac but not sure, see the package log

Config log

config.log

Package logs

sagelib-10.4.beta0.log

Additional Information

No response

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Dependencies

@mkoeppe
Copy link
Member

mkoeppe commented Mar 30, 2024

compilation of sagelib, apparently with ginac

That is fixed in #37646

I don't think it's ginac, that's just the last gcc command that shows up in the log.

There are a bunch of errors (look for : error: in the log). Some are fixed already in #37646

@mkoeppe
Copy link
Member

mkoeppe commented Mar 30, 2024

I changed spkg-configure.m4 in build/pkgs/gcc and build/pkgs/gfortran to allow gcc 14.

I have that change on #37537

@erentar
Copy link

erentar commented May 3, 2024

I have replicated this too

@mkoeppe mkoeppe added this to the sage-10.4 milestone May 3, 2024
@enriqueartal
Copy link
Contributor Author

I have tried in Fedora 40 with gcc package; ppl needs the gmp spkg. Documentation does not build, symbol issues with libharfbuzz.

@vbraun
Copy link
Member

vbraun commented May 5, 2024

The sagelib compile errors are cython/cython#2747 and possibly fixed in cython-3.10

@enriqueartal
Copy link
Contributor Author

The sagelib compile errors are cython/cython#2747 and possibly fixed in cython-3.10

Following @vbraun's comment, I have tried with cython-3.0.10. Some errors pointed out in #37537 have disappeared but the ones concerning plot didn't. I attach config.log and sagelib-10.4.beta5.log

Probably the errors are there:

[spkg-install]     sage/plot/plot3d/implicit_surface.c:11800:21: error: assignment to 'PyObject *' {aka 'struct _object *'} from incompatible pointer type 'struct __pyx_obj_4sage_4plot_6plot3d_16implicit_surface_VertexInfo *' [-Wincompatible-pointer-types]
[spkg-install]     11800 |         *__pyx_t_22 = __pyx_v_v;
[spkg-install]           |                     ^
[spkg-install]     sage/plot/plot3d/implicit_surface.c:12357:21: error: assignment to 'PyObject *' {aka 'struct _object *'} from incompatible pointer type 'struct __pyx_obj_4sage_4plot_6plot3d_16implicit_surface_VertexInfo *' [-Wincompatible-pointer-types]
[spkg-install]     12357 |         *__pyx_t_22 = __pyx_v_v;
[spkg-install]           |                     ^
[spkg-install]     sage/plot/plot3d/implicit_surface.c: In function '__pyx_f_4sage_4plot_6plot3d_16implicit_surface_22MarchingCubesTriangles__update_x_vertices':
[spkg-install]     sage/plot/plot3d/implicit_surface.c:13610:21: error: assignment to 'PyObject *' {aka 'struct _object *'} from incompatible pointer type 'struct __pyx_obj_4sage_4plot_6plot3d_16implicit_surface_VertexInfo *' [-Wincompatible-pointer-types]
[spkg-install]     13610 |         *__pyx_t_18 = __pyx_v_v;
[spkg-install]           |                     ^

@vbraun
Copy link
Member

vbraun commented May 5, 2024

I've created #37939, with that I can at least build Sage on Fedora 40

vbraun pushed a commit to vbraun/sage that referenced this issue May 5, 2024
…14.x

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fedora 40 already ships GCC 14

Fixes sagemath#37698

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37646
    
URL: sagemath#37537
Reported by: Matthias Köppe
Reviewer(s):
@enriqueartal
Copy link
Contributor Author

I can confirm that in Fedora 40 Sagemath can be built with #37939, #37537, #37938, and #37584

@erentar
Copy link

erentar commented May 6, 2024

I can confirm that in Fedora 40 Sagemath can be built with #37939, #37537, #37938, and #37584

How do you apply all of those patches at once?

@enriqueartal
Copy link
Contributor Author

If you put in the address line of the browser https://github.com/sagemath/sage/issues/xxxxx.patch you get the patchfile of the PR to be saved in SAGE_ROOT where you run patch -i xxxxx.patch -p 1; a simpler approach would be welcome

@erentar
Copy link

erentar commented May 6, 2024

arr=(37939 37537 37938 37584); for i in $arr; do wget https://github.com/sagemath/sage/pull/$i.patch; patch -i $i.patch -p 1; done

@erentar
Copy link

erentar commented May 6, 2024

Still doesnt work for me, givaro and ppl fails.

@enriqueartal
Copy link
Contributor Author

Which version of givaro? The package ppl is taken from the system in my case. Maybe make clean-maintainer for a fresh start?

@erentar
Copy link

erentar commented May 7, 2024

i ran

make clean-maintainer
make clean
./configure
sudo dnf install fflas-ffpack-devel libfplll libfplll-devel linbox-devel maxima-runtime-ecl maxima ppl ppl-devel zeromq zeromq-devel 4ti2 gnupg2 openssh igraph igraph-devel isl-devel graphviz lrslib polymake sbcl
make -j4

output:

Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         givaro-4.1.1
  last build time: May 3 22:54
  log file:        /home/user/git/sage/logs/pkgs/givaro-4.1.1.log

* package:         fflas_ffpack-2.5.0
  last build time: May 7 21:20
  log file:        /home/user/git/sage/logs/pkgs/fflas_ffpack-2.5.0.log
  build directory: /home/user/git/sage/local/var/tmp/sage/build/fflas_ffpack-2.5.0

* package:         ppl-1.2.p1
  last build time: May 7 21:20
  log file:        /home/user/git/sage/logs/pkgs/ppl-1.2.p1.log
  build directory: /home/user/git/sage/local/var/tmp/sage/build/ppl-1.2.p1

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
make[1]: *** [Makefile:40: all-start] Error 1
make[1]: Leaving directory '/home/user/git/sage'
make: *** [Makefile:13: all] Error 2

givaro-4.2.0.log
fflas_ffpack-2.5.0.log
ppl-1.2.p1.log

@erentar
Copy link

erentar commented May 7, 2024

Whoops, wrong logfile for givaro.
givaro-4.1.1.log

@erentar
Copy link

erentar commented May 7, 2024

to be absolutely sure, i ran

git checkout upstream/develop

git reset --hard

make clean

git clean -f

arr=(37939 37537 37938 37584) ; for i in $arr ; do wget https://github.com/sagemath/sage/pull/$i.patch ; patch -i $i.patch -p 1 ; done

make bootstrap

make configure

./configure

sudo dnf install fflas-ffpack-devel libfplll libfplll-devel linbox-devel ppl ppl-devel 4ti2 gnupg2 openssh igraph igraph-devel isl-devel graphviz lrslib polymake

make -j4

and i can still reproduce the same problem

@enriqueartal
Copy link
Contributor Author

Why do you have givaro 4.1.1? It should be 4.2.0. This causes the error for fflas_ffpack. I did not have the error with ppl since the system package is used.

@erentar
Copy link

erentar commented May 7, 2024

In my system, I have givaro 4.2.0 installed. I do not know why it is building 4.1.1 again, as i have applied the patch to upgrade it, as you mentioned

@enriqueartal
Copy link
Contributor Author

Have you checked if the patch is really applied looking at build/pkgs/givaro. I get a running system in Fedora 40 but there are strange things. In config.log I get

## ------------------------------------------------------- ##
## Checking whether SageMath should install SPKG givaro... ##
## ------------------------------------------------------- ##
configure:26026: checking for givaro >= 4.2.0
configure:26033: $PKG_CONFIG --exists --print-errors "givaro >= 4.2.0"
configure:26036: $? = 0
configure:26050: $PKG_CONFIG --exists --print-errors "givaro >= 4.2.0"
configure:26053: $? = 0
configure:26091: result: yes
configure:26100: will use system package and not install SPKG givaro

and then

configure:125316: result: givaro:                         no suitable system package; standard, SPKG version 4.2.0 will be installed

Something similar for fflas-ffpack. The difference with your case is that I can build. I share the config.log in case it is useful:
config40-2.log

@erentar
Copy link

erentar commented May 8, 2024

I believe i have the same result.

Even though givaro-4.2.0 is installed from dnf, sage decides that SPKG should be installed

@erentar
Copy link

erentar commented May 8, 2024

I nuked the local cloned folder and got a fresh copy, it built; however it still gets givaro et al from source even though system packages are available

@vbraun
Copy link
Member

vbraun commented May 9, 2024

I'm building with the Fedora libgmp for the record:

release@zen:~/Sage$ rpm -qa | grep ^gmp-
gmp-6.2.1-8.fc40.x86_64
gmp-c++-6.2.1-8.fc40.x86_64
gmp-devel-6.2.1-8.fc40.x86_64

with that, I can build ppl just fine.

vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2024
…14.x

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fedora 40 already ships GCC 14

Fixes sagemath#37698

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37646
    
URL: sagemath#37537
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 11, 2024
…14.x

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fedora 40 already ships GCC 14

Fixes sagemath#37698

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37646
    
URL: sagemath#37537
Reported by: Matthias Köppe
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 12, 2024
…14.x

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fedora 40 already ships GCC 14

Fixes sagemath#37698

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37646
    
URL: sagemath#37537
Reported by: Matthias Köppe
Reviewer(s):
@vbraun vbraun closed this as completed in d347729 May 12, 2024
@vbraun
Copy link
Member

vbraun commented May 12, 2024

This is now in Sage 10.4.beta6, so testing should be easier

@vbraun
Copy link
Member

vbraun commented May 13, 2024

I've created #38002 for the macOS/linbox/givaro issue

@dimpase
Copy link
Member

dimpase commented Jun 21, 2024

I am having problems with system-wide flint (3.1.2),and gcc 14, as

clpc177[/tmp]$ cat t.c 
#include <complex.h>
void foo(int I, int);
clpc177[/tmp]$ gcc -c t.c
In file included from t.c:1:
t.c:2:14: error: expected ‘)’ before ‘__extension__’
    2 | void foo(int I, int);
      |              ^
t.c:2:17: error: expected ‘;’, ‘,’ or ‘)’ before ‘int’
    2 | void foo(int I, int);
      |                 ^~~
clpc177[/tmp]$ 

or, similarly, replacing void ... above with #include <flint/mpoly.h> leads to the same errors.

It's fixed in flint's main branch now (cf flintlib/flint#2027), though, but will linger for a while.

@dimpase dimpase reopened this Jun 21, 2024
@dimpase dimpase self-assigned this Jun 21, 2024
@mkoeppe
Copy link
Member

mkoeppe commented Jun 21, 2024

I've fixed this one in #38227

@dimpase
Copy link
Member

dimpase commented Jun 21, 2024

I've fixed this one in #38227

I don't see how this can fix this - to fix this, you need to test that system flint can be used (but it cannot - at least not with numpy 2.0 - I didn't check other ones).

So one needs a test in flint/spkg-configure.m4

@mkoeppe
Copy link
Member

mkoeppe commented Jun 21, 2024

No.

@dimpase
Copy link
Member

dimpase commented Jun 21, 2024

No.

could you point out how your PR is fixing this ?

@mkoeppe
Copy link
Member

mkoeppe commented Jun 21, 2024

You mean you didn't look?
1fe2d7c

@dimpase
Copy link
Member

dimpase commented Jun 21, 2024

I didn't know where to look in the diff, as I apparently never knew about #pragma push/pop.
Without this knowledge, I haven't even looked at src/.

It's got to be in the PR description, too, by the way.

@mkoeppe
Copy link
Member

mkoeppe commented Jun 21, 2024

Also, this has nothing to do with gcc 14.

@mkoeppe mkoeppe closed this as completed Jun 21, 2024
@dimpase
Copy link
Member

dimpase commented Jul 10, 2024

This must be kept open until #38227 (or the specific flint fix in 1fe2d7c) is merged.

@dimpase dimpase reopened this Jul 10, 2024
@mkoeppe
Copy link
Member

mkoeppe commented Jul 10, 2024

Like I said, this has absolutely nothing to do with gcc 14.

@mkoeppe
Copy link
Member

mkoeppe commented Jul 10, 2024

(Do you read what's written?)

@mkoeppe mkoeppe removed this from the sage-10.4 milestone Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants