Opened 2 years ago
Closed 2 years ago
#30729 closed defect (fixed)
Fix gap_packages for Xcode 12
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | sage-9.3 |
Component: | packages: optional | Keywords: | |
Cc: | dimpase, jhpalmieri, soehms | Merged in: | |
Authors: | Matthias Koeppe, John Palmieri | Reviewers: | Dima Pasechnik |
Report Upstream: | Reported upstream. No feedback yet. | Work issues: | |
Branch: | d8f07f9 (Commits, GitHub, GitLab) | Commit: | d8f07f93630c5bac197f3b525a5cbb2ab3fa096e |
Dependencies: | #30720 | Stopgaps: |
Description (last modified by )
Follow-up from #30720. Building gap_packages
(version 4.10.2) using Xcode 12 fails:
gcc -c -O -fno-builtin gpd.c gpd.c:37:7: error: implicit declaration of function 'gpprog' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (gpprog()== -1) exit(1); ^ 1 error generated.
Change History (33)
comment:1 Changed 2 years ago by
Dependencies: | → #30720 |
---|
comment:2 Changed 2 years ago by
Report Upstream: | N/A → Reported upstream. No feedback yet. |
---|
comment:4 Changed 2 years ago by
it might be I didn't test the whole of gap_packages. I thought I did.
comment:5 follow-up: 6 Changed 2 years ago by
I don't think #29314 upgrades gap_packages
, but the new gap
and libsemigroups
build for me.
comment:6 Changed 2 years ago by
Replying to jhpalmieri:
I don't think #29314 upgrades
gap_packages
It does because it uses the same tarball as gap
, via symlinks in build/pkgs/gap_packages
comment:7 Changed 2 years ago by
As suggested in #29314, patching the failing packages using the diff to the GAP 4.11 distribution would be a way forward.
comment:8 Changed 2 years ago by
Reviewers: | → https://github.com/mkoeppe/sage/actions/runs/289319582 |
---|
comment:9 Changed 2 years ago by
The failure is now also reproduced on GH Actions in local-homebrew-usrlocal-macos-maximal-xcode12
, https://github.com/mkoeppe/sage/runs/1208931537
comment:10 Changed 2 years ago by
Branch: | → u/mkoeppe/fix_gap_packages_for_xcode_12 |
---|
comment:11 follow-up: 12 Changed 2 years ago by
Commit: | → 8693dc75891529b7e7e349c8ac4e1ac4076ea785 |
---|---|
Description: | modified (diff) |
I see the same error with this branch.
New commits:
c26eb00 | fix cohomolo pkg code to allow build with gcc10
|
102946d | build/pkgs/gap_packages/patches/cohomolo-gcc10.patch: Backport
|
2c30b34 | clang 12 (macOS XCode 12) needs extra includes
|
f89dc20 | build/pkgs/gap_packages/patches/guava_leon_includes.patch: Backport
|
1b62f42 | Merge branch 'u/mkoeppe/fix_gap_packages_for_gcc_10__xcode_12' of git://trac.sagemath.org/sage into t/30729/fix_gap_packages_for_xcode_12
|
a98639e | .github/workflows/tox.yml: Test homebrew-usrlocal in addition to homebrew
|
8693dc7 | .github/workflows/tox-{optional,experimental}.yml: Test homebrew-usrlocal instead of homebrew
|
comment:12 Changed 2 years ago by
Replying to jhpalmieri:
I see the same error with this branch.
in GAP 4.10 the cohomolo's Makefile.in does not have a line
EXTRA_CFLAGS += -Wno-implicit-function-declaration
which is present in GAP 4.11 - so probably the quickest patch would be to add it in GAP 4.10. (I started on fixing the code itself, but it's a nontrivial amount of changes).
comment:13 Changed 2 years ago by
Even quicker should be to do
-
build/pkgs/gap_packages/spkg-install.in
diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 10b444b5c6..cc094ad40c 100644
a b PKG_DIR="$GAP_ROOT/pkg" 3 3 4 4 PKG_SRC_DIR="$(pwd)/src/pkg" 5 5 cd "$PKG_SRC_DIR" 6 CFLAGS = "$CFLAGS -Wno-implicit-function-declaration" 7 export CFLAGS 6 8 7 9 # directly install pure GAP packages 8 10 #
comment:14 follow-up: 15 Changed 2 years ago by
I tried this, and it doesn't work for me: same error as before.
comment:15 Changed 2 years ago by
Replying to jhpalmieri:
I tried this, and it doesn't work for me: same error as before.
Could we see the full error, with the corresponding compiler call?
comment:16 Changed 2 years ago by
the old Makefile.in there needs a patch, in fact, that's why it does not work
comment:17 follow-up: 18 Changed 2 years ago by
This works for me, instead:
-
build/pkgs/gap_packages/spkg-install.in
diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 10b444b5c6..56c444e11f 100644
a b install_compiled_pkg() 68 68 for pkg in cohomolo-* crypting-* grape-* guava-* orb-* 69 69 do 70 70 echo "Building GAP package $pkg" 71 CFLAGS="$CFLAGS -Wno-implicit-function-declaration" 72 export CFLAGS 71 73 cd "$PKG_SRC_DIR/$pkg" 72 74 ./configure "$GAP_ROOT" 73 75 sdh_make -j1
comment:18 Changed 2 years ago by
Replying to jhpalmieri:
This works for me, instead:
build/pkgs/gap_packages/spkg-install.in
diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 10b444b5c6..56c444e11f 100644
a b install_compiled_pkg() 68 68 for pkg in cohomolo-* crypting-* grape-* guava-* orb-* 69 69 do 70 70 echo "Building GAP package $pkg" 71 CFLAGS="$CFLAGS -Wno-implicit-function-declaration" 72 export CFLAGS 71 73 cd "$PKG_SRC_DIR/$pkg" 72 74 ./configure "$GAP_ROOT" 73 75 sdh_make -j1
yes, I'm testing essentially the same branch, will post it soon.
comment:19 Changed 2 years ago by
Authors: | → Dima Pasechnik, Matthias Koeppe |
---|---|
Branch: | u/mkoeppe/fix_gap_packages_for_xcode_12 → u/dimpase/fix_gap_packages_for_xcode_12 |
Commit: | 8693dc75891529b7e7e349c8ac4e1ac4076ea785 → 46e868eb824b4d6bb40b763fc7df186504df4aad |
Status: | new → needs_review |
OK, this should be it
comment:20 Changed 2 years ago by
Reviewers: | https://github.com/mkoeppe/sage/actions/runs/289319582 → https://github.com/mkoeppe/sage/actions/runs/296478189 |
---|
comment:21 Changed 2 years ago by
This isn't working for me. First, one of the patches is wrong:
-
build/pkgs/gap_packages/patches/cohomolo_makefile.patch
diff --git a/build/pkgs/gap_packages/patches/cohomolo_makefile.patch b/build/pkgs/gap_packages/patches/cohomolo_makefile.patch index 401deba09d..01f0e85587 100644
a b 1 diff --git a/ Makefile.in b/Makefile.in1 diff --git a/pkg/cohomolo-1.6.7/Makefile.in b/pkg/cohomolo-1.6.7/Makefile.in 2 2 index 96a6c75..ab8b8c3 100644 3 --- a/ Makefile.in4 +++ b/ Makefile.in3 --- a/pkg/cohomolo-1.6.7/Makefile.in 4 +++ b/pkg/cohomolo-1.6.7/Makefile.in 5 5 @@ -2,13 +2,18 @@ 6 6 # all executables are put into the bin directory. 7 7 BIN = bin/@GAPARCH@
Even after fixing that, I get an error building gap_packages:
gcc -c -O2 -g -Wno-implicit-function-declaration -Wno-return-type -Wno-dangling-else -Wno-unused-result pcd.c pcd.c:22:8: error: redefinition of 'conj' as different kind of symbol conj[NPT],conjinv[NPT],facord[MEXP],pinv[NPT/2],rel[2*MEXP], ^ pcd.c:22:8: note: unguarded header; consider using #ifdef guards or #pragma once pcd.c:22:8: note: previous definition is here 1 error generated.
Using only the change in comment:17 worked, but I'm not getting this new branch to work. Is anyone else having better luck?
comment:22 Changed 2 years ago by
Please make a branch that works for you and post it here. We'll review it for other systems.
comment:23 Changed 2 years ago by
I can't push a branch, but these are the changes:
-
build/pkgs/gap_packages/spkg-install.in
diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 10b444b5c6..56c444e11f 100644
a b install_compiled_pkg() 68 68 for pkg in cohomolo-* crypting-* grape-* guava-* orb-* 69 69 do 70 70 echo "Building GAP package $pkg" 71 CFLAGS="$CFLAGS -Wno-implicit-function-declaration" 72 export CFLAGS 71 73 cd "$PKG_SRC_DIR/$pkg" 72 74 ./configure "$GAP_ROOT" 73 75 sdh_make -j1 -
src/sage/tests/gap_packages.py
diff --git a/src/sage/tests/gap_packages.py b/src/sage/tests/gap_packages.py index 340ceb8c29..cf9a68cec2 100644
a b TESTS:: 6 6 sage: from sage.tests.gap_packages import all_installed_packages, test_packages 7 7 sage: pkgs = all_installed_packages(ignore_dot_gap=True) 8 8 sage: test_packages(pkgs, only_failures=True) # optional - gap_packages 9 ... 9 10 Status Package GAP Output 10 11 +--------+---------+------------+ 11 12
comment:25 Changed 2 years ago by
I get an error like some of the ones reported earlier today:
% git trac push 30729 Pushing to Trac #30729... Guessed remote branch: u/jhpalmieri/fix_gap_packages_for_xcode_12 Traceback (most recent call last): File "/usr/local/bin/git-trac", line 17, in <module> cmdline.launch() File "/usr/local/lib/python3.8/site-packages/git_trac/cmdline.py", line 247, in launch app.push(ticket_number, remote=args.remote, force=args.force) File "/usr/local/lib/python3.8/site-packages/git_trac/app.py", line 218, in push self.repo.push(remote, force) File "/usr/local/lib/python3.8/site-packages/git_trac/git_repository.py", line 196, in push self.git.echo.push('trac', refspec) File "/usr/local/lib/python3.8/site-packages/git_trac/git_interface.py", line 340, in meth return self.execute(git_cmd, *args, **kwds) File "/usr/local/lib/python3.8/site-packages/git_trac/git_interface.py", line 95, in execute result = self._interface._run(cmd, args, kwds, File "/usr/local/lib/python3.8/site-packages/git_trac/git_interface.py", line 262, in _run raise GitError(result) git_trac.git_error.GitError: git returned with non-zero exit code (1) when executing "git push trac HEAD:refs/heads/u/jhpalmieri/fix_gap_packages_for_xcode_12" STDERR: remote: error: insufficient permission for adding an object to repository database ./objects STDERR: remote: fatal: failed to write object STDERR: error: remote unpack failed: unpack-objects abnormal exit STDERR: To trac.sagemath.org:sage.git STDERR: ! [remote rejected] HEAD -> u/jhpalmieri/fix_gap_packages_for_xcode_12 (unpacker error) STDERR: error: failed to push some refs to 'git@trac.sagemath.org:sage.git'
(Same with with git trac push ... --force
)
comment:26 Changed 2 years ago by
could you try pushing now?
comment:27 Changed 2 years ago by
Branch: | u/dimpase/fix_gap_packages_for_xcode_12 → u/jhpalmieri/fix_gap_packages_for_xcode_12 |
---|
comment:28 Changed 2 years ago by
Commit: | 46e868eb824b4d6bb40b763fc7df186504df4aad → d8f07f93630c5bac197f3b525a5cbb2ab3fa096e |
---|
Success! Thank you.
New commits:
d8f07f9 | trac 30729: allow gap_packages to build with Xcode 12 by passing
|
comment:29 Changed 2 years ago by
Authors: | Dima Pasechnik, Matthias Koeppe → Matthias Koeppe |
---|---|
Reviewers: | https://github.com/mkoeppe/sage/actions/runs/296478189 → Dima Pasechnik, https://github.com/mkoeppe/sage/actions/runs/296478189 |
Status: | needs_review → positive_review |
ok, this works on Debian.
comment:30 Changed 2 years ago by
Reviewers: | Dima Pasechnik, https://github.com/mkoeppe/sage/actions/runs/296478189 → Dima Pasechnik |
---|
comment:31 Changed 2 years ago by
Authors: | Matthias Koeppe → Matthias Koeppe, John Palmieri |
---|
comment:32 Changed 2 years ago by
Milestone: | sage-9.2 → sage-9.3 |
---|
comment:33 Changed 2 years ago by
Branch: | u/jhpalmieri/fix_gap_packages_for_xcode_12 → d8f07f93630c5bac197f3b525a5cbb2ab3fa096e |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
I've opened https://github.com/gap-packages/cohomolo/issues/27