Prepare juliainterface for GAP 4.15 - #1239
Conversation
| #include "sync.h" | ||
|
|
||
| #include <julia_gc.h> // GAP header | ||
| #include <gap/julia_gc.h> // GAP header |
There was a problem hiding this comment.
Note that this will only work with an "installed" GAP, not with an uninstalled GAP. This shouldn't currently be a problem because of course when using the JLLs, GAP is installed; and also etc/setup_override_dir.jl does make install.
So, no objection here.
| gap_include = joinpath(gap_prefix, "include", "gap") | ||
| sysinfo["GAP_CPPFLAGS"] = "-I$(gap_include) -DUSE_JULIA_GC=1" | ||
| gap_include = joinpath(gap_prefix, "include", "gap", "extra") | ||
| sysinfo["GAP_CPPFLAGS"] = "-I$(gap_include) -DUSE_JULIA_GC=1 -DUSE_GAP_INSIDE_JULIA=1" |
There was a problem hiding this comment.
USE_GAP_INSIDE_JULIA is only used in src/julia_gc.c, so it should not be necessary to add it here. Is there something this is meant to fix?
There was a problem hiding this comment.
Ah, you are trying to collect patches in GAP_jll here? But this patch reallys for the GAP_jll only. If you want to get rid of this one, that would require adding a new configure option to GAP which then ends up adding #define USE_GAP_INSIDE_JULIA to GAP's config.h... but then the GAP_jll recipe does not get easier at all ; just the entire setup gets more complex.
What we could do is to improve the comment in GAP's src/julia_gc.c to explicitly state that USE_GAP_INSIDE_JULIA is set by the GAP_jll recipe
There was a problem hiding this comment.
(oh and of course etc/setup_override_dir.jl also sets it)
There was a problem hiding this comment.
I was applying the changes to the gap make process to the build instructions here, e.g. change the includedir. And while doing that I also noticed the $(GAP_DEFINES) in https://github.com/gap-system/gap/blob/90820b6dbb2a1bbde5b541f3ff6db9c442e59041/Makefile.rules#L673, which (if I understand correctly) should correspond to -DUSE_GAP_INSIDE_JULIA=1. So I am just trying to replicate the make script as accurately as possible here. This should not make any difference here, so I am open to removing the flag again
26e001a to
6ebc767
Compare
|
The patches from this branch don't seem to work on macos. At least on munk (with julia 1.11.6), I get the following error: julia> ENV["FORCE_JULIAINTERFACE_COMPILATION"]=true; using GAP
[ Info: Compiling JuliaInterface ...
In file included from In file included from src/sync.csrc/JuliaInterface.c::1413:
:
src/sync.hsrc/JuliaInterface.h::1816::1010:: In file included from src/calls.cfatal error: :'gap_all.h' file not found13:
fatal error: src/calls.h:16:10: In file included from 18 | 'gap_all.h' file not foundfatal error:
'gap_all.h' file not found
src/convert.c 16: | 12:
#isrc/convert.hn#:c15l:u10idn16ce <ga | p#_inc:lalull.h> /u/d deGA P< ghaepea_ da<elgrls.h
>a p|
_ a ^~~~~~~~~~~
| ^~~~~~~~~~~
ll.h> // GAP hfatal error: eaders
| ^~~~~~~~~~~
'gap_all.h' file not found
15 | #include <gap_all.h> // GAP headers
| ^~~~~~~~~~~
1 error generated.
make: *** [gen/src/sync.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
1 error generated.
make: *** [gen/src/calls.o] Error 1
make: *** [gen/src/convert.o] Error 1
make: *** [gen/src/JuliaInterface.o] Error 1
ERROR: InitError: failed process: Process(`make V=1 -j4`, ProcessExited(2)) [2]
Stacktrace:
[1] pipeline_error
@ ./process.jl:598 [inlined]
[2] run(::Base.CmdRedirect; wait::Bool)
@ Base ./process.jl:513
[3] run
@ ./process.jl:510 [inlined]
[4] (::GAP.Setup.var"#19#24"{String})()
@ GAP.Setup ~/julia/GAP.jl/src/setup.jl:210
[...]This is either due to gap-system/gap#6007 or some macos weirdness (or both). @fingolfin do you have any idea on where this comes from and how to solve it? |
|
Try changing |
|
The above was of course me being stupid and expecting that the build patches from this branch work with gap 4.14 (which they obviously don't, not even on linux). The real build issue (after dev'ing all new jlls etc.) is: julia> ENV["FORCE_JULIAINTERFACE_COMPILATION"]=true; using GAP
[ Info: Compiling JuliaInterface ...
src/JuliaInterface.c:19:10: fatal error: 'gap/julia_gc.h' file not found
19 | #include <gap/julia_gc.h> // GAP header
| ^~~~~~~~~~~~~~~~
1 error generated.
make: *** [gen/src/JuliaInterface.o] Error 1
make: *** Waiting for unfinished jobs....but just on macos |
|
And for reference, changing the |
|
To reproduce (e.g. on munk): then force a rebuild with |
|
The macos build failures no longer happen with the newest commit in |
|
Closing in favor of #1248 |
This collects changes and patches needed to update to GAP v4.15.0.
For the meantime, I use this branch to collect all patches needed to get v4.15.0-beta1 running with Oscar.