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

Meta-ticket: Support Xcode 12 #30494

Closed
mkoeppe opened this issue Sep 2, 2020 · 148 comments
Closed

Meta-ticket: Support Xcode 12 #30494

mkoeppe opened this issue Sep 2, 2020 · 148 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 2, 2020

Xcode 12 was publicly released on 2020-09-16.

Sage does not build from source using Xcode 12.2 beta, released 2020.09.17, clang version 12.0.0 (clang-1200.0.32.4)

Failing packages (blockers):

Failing packages with replacements available via homebrew:

Failing optional packages:

Failing experimental packages:

Tickets:

Follow-up:

CC: @jhpalmieri @dimpase @slel @vbraun

Component: porting

Keywords: macOS, Xcode

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/30494

@mkoeppe mkoeppe added this to the sage-9.2 milestone Sep 2, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:4

For what it's worth, I was trying to build without setting MACOSX_DEPLOYMENT_TARGET at all: I removed those lines from src/bin/sage-env.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 2, 2020

comment:5

Note that these lines are only executed when using python3 installed from spkg, not system python

@dimpase
Copy link
Member

dimpase commented Sep 5, 2020

comment:6

looks like this should wait till 9.3

@jhpalmieri
Copy link
Member

comment:7

Sure, Big Sur is still in beta.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Sep 5, 2020
@jhpalmieri
Copy link
Member

comment:9

Xcode 12 has been released, and it causes breakage with Catalina, so perhaps this should be a blocker for 9.2. (For example I now cannot build Sage: I upgraded a laptop to a beta release of Big Sur, and on my main machine Xcode updated itself to version 12 overnight.)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 17, 2020

comment:10

I agree. It would be good to figure out if the upstream maintainers of these packages are already aware of these issues.

@dimpase
Copy link
Member

dimpase commented Sep 17, 2020

comment:11

Can we score an https://en.wikipedia.org/wiki/Developer_Transition_Kit_(2020) - and Apple ARM prototype for developers somehow?
It might be very useful for testing. Probably a Raspberry Pi with a 64-bit OS comes close, but not as much.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 17, 2020

comment:12

This is unrelated to this ticket.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 17, 2020

comment:13

I have opened #30592 (Meta-ticket: Port to Apple silicon) for that. Let's keep the present ticket focused please. No new hardware is required.

@jhpalmieri
Copy link
Member

comment:14

It seems that when configuring gf2x and ecl, at least, something like -Wall is being used. I see this kind of thing in the config.log files for those:

conftest.c:4:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit(0);
  ^
conftest.c:4:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 error generated.

Is there some setting in Xcode's command-line tools that has changed, causing these errors?

@jhpalmieri
Copy link
Member

comment:15

Similar with ecm:

configure:13286: clang -O2 -pedantic -fomit-frame-pointer -m64 -mtune=nehalem -march=nehalem  -c conftes1.c >&5 && clang -O2 -pedantic -fomit-frame-pointer -m64 -mtune=nehalem -march=nehalem -c conftes2.s >&5 && clang -O2 -pedantic -fomit-frame-pointer -m64 -mtune=nehalem -march=nehalem  conftes1.o conftes2.o >&5
conftes1.c:4:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main () { underscore_test(); }
^
conftes1.c:4:11: error: implicit declaration of function 'underscore_test' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
main () { underscore_test(); }
          ^
1 warning and 1 error generated.

@emmanuelthome
Copy link

comment:16

Hi,

I just learned about this ticket. (me = upstream gf2x)

I don't have access to a box of this kind, so I can't test. (all I have is macOS 10.15.5 + XCode 11.6).

It looks like latest xcode doesn't like the tests that are generated by autotools, right ? If yes, does a autoreconf with fresh autotools fix the problem ?

E.

@jhpalmieri
Copy link
Member

comment:17

The Sage build log for symmetrica contains:

hiccup.c:478:3: error: implicit declaration of function 'set_multiplier' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                set_multiplier(S_MO_K(S_L_S(a)));
                ^

@jhpalmieri
Copy link
Member

comment:18

Replying to @emmanuelthome:

Hi,

I just learned about this ticket. (me = upstream gf2x)

I don't have access to a box of this kind, so I can't test. (all I have is macOS 10.15.5 + XCode 11.6).

I'm seeing this on OS X 10.15.6 after an upgrade to Xcode 12. You could try upgrading to Xcode 12, if you're willing to take that risk.

It looks like latest xcode doesn't like the tests that are generated by autotools, right ? If yes, does a autoreconf with fresh autotools fix the problem ?

I'm not an expert in this sort of thing, but I don't think this will work. autoreconf would help if Sage's top-level configure script were running into problems, but the problems are coming from Sage packages. Those are just tarballs, and running autoreconf once won't help with those. For what it's worth, I unpacked the gf2x tarball and ran autoreconf on it, but I got the same error.

(This is with autoreconf 2.69 installed via homebrew. I did brew upgrade first. I'm not sure how to get a "fresh autotools".)

@jhpalmieri
Copy link
Member

Attachment: config.log

gf2x config.log

@jhpalmieri
Copy link
Member

comment:19

Here is the config.log for gf2x, in case it helps.

@jhpalmieri
Copy link
Member

comment:20

I'm happy to run some experiments, if you have suggestions.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 17, 2020

comment:21

Replying to @jhpalmieri:

It seems that when configuring gf2x and ecl, at least, something like -Wall is being used. I see this kind of thing in the config.log files for those:

conftest.c:4:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit(0);
  ^
conftest.c:4:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 error generated.

Is there some setting in Xcode's command-line tools that has changed, causing these errors?

I think errors like this are usually from code incorrectly assuming that some header pulls in some other header. Adding the correct includes should fix this.

@emmanuelthome
Copy link

comment:22

Replying to @jhpalmieri:

I don't have access to a box of this kind, so I can't test. (all I have is macOS 10.15.5 + XCode 11.6).

I'm seeing this on OS X 10.15.6 after an upgrade to Xcode 12. You could try upgrading to Xcode 12, if you're willing to take that risk.

Not light-heartedly for sure. It's a mac mini that has been living in an office of (very) mac-averse researchers for years and years, crawling under the ram demands of the latest macOS (and actually last it can support).

It looks like latest xcode doesn't like the tests that are generated by autotools, right ? If yes, does a autoreconf with fresh autotools fix the problem ?

I'm not an expert in this sort of thing, but I don't think this will work. autoreconf would help if Sage's top-level configure script were running into problems, but the problems are coming from Sage packages.

I didn't make myself clear. Of course I mean autoreconf for gf2x.

Those are just tarballs, and running autoreconf once won't help with those. For what it's worth, I unpacked the gf2x tarball and ran autoreconf on it, but I got the same error.

ok.

(This is with autoreconf 2.69 installed via homebrew. I did brew upgrade first. I'm not sure how to get a "fresh autotools".)

doesn't say much. 2.69 is the banner under which all autoconf version have been presenting themselves for 8 years. IDK about the others, but I suspect autoconf is at fault here anyway.

@jhpalmieri
Copy link
Member

comment:118

For what it's worth, I tried building rubiks and it seemed to hang. I'm trying again with a fresh Sage install, and also trying a few other packages at the same time.

@jhpalmieri

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:120

deformation succeeded for me, so I removed it from the ticket description. polylib fails on two different machines with the old familiar message error: implicit declaration of function. The rubiks build hangs on two different machines shortly after starting:

Building Rubiks cube solvers
Installing rubiks-20070912.p21
for dir in dietz/cu2 dietz/mcube dietz/solver dik reid; do \
		(cd ${dir} && make all)\
	done
g++ -std=gnu++11 -g -O2  -c cu2.cpp
g++ -std=gnu++11 -g -O2  -c main.cpp
g++ -std=gnu++11 -g -O2   -o cu2  cu2.o main.o  -L/Users/jpalmier/Desktop/Sage/sage_builds/TESTING/sage-9.6.rc1/local/lib -Wl,-rpath,/Users/jpalmier/Desktop/Sage/sage_builds/TESTING/sage-9.6.rc1/local/lib 
g++ -std=gnu++11 -g -O2  -c mcube.cpp
g++ -std=gnu++11 -g -O2  -c main.cpp
mcube.cpp:1966:38: warning: if statement has empty body [-Wempty-body]
        else if (fy == 3 && fz == 3) ;
                                     ^
mcube.cpp:1966:38: note: put the semicolon on a separate line to silence this warning
mcube.cpp:1977:38: warning: if statement has empty body [-Wempty-body]
        else if (fx == 3 && fy == 3) ;
                                     ^
mcube.cpp:1977:38: note: put the semicolon on a separate line to silence this warning

@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:122

boost is no longer a package, and fricas, e_antic, and csdp all work for me.

@jhpalmieri
Copy link
Member

comment:123

The experimental packages don't matter much (since they're experimental), but lrslib works for me. The others don't. scipoptsuite is broken because the tarball can't be found.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 25, 2022

comment:124

I see the hanging build for rubiks now too. This must be a very recent regression. I built it quite recently (before upgrading to macOS Monterey)

@jhpalmieri
Copy link
Member

comment:125

Replying to @jhpalmieri:

scipoptsuite is broken because the tarball can't be found.

Maybe this is intentional, given SPKG.rst:

We do not have permission to redistribute SCIP or SoPlex. Hence, you
must download it yourself from http://scip.zib.de and put the tarball
``scipoptsuite-VERSION.tgz`` in ``$SAGE_ROOT/upstream``, renaming
it to ``scipoptsuite-VERSION-do-not-distribute.tgz``.

If anyone cares about this package, they should create a better error message: maybe create spkg-preinst.in that tests for the presence of the tarball in upstream and exit with an appropriate message if it's not there. I don't know if that would actually work, or if the tarball is attempted to be downloaded before anything else happens. Anyway, I don't care about this package, so I am not likely to work on it.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 25, 2022

comment:126

Yes, it is intentional that there is no upstream_url and no tarball on our mirror.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 25, 2022

comment:127

There appears to be an effort to provide a version of scipoptsuite under a free software license. I'll wait for that before putting more effort into packaging it

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 25, 2022

comment:128

Replying to @jhpalmieri:

boost is no longer a package, and fricas, e_antic, and csdp all work for me.

OK, I've removed them (and lrslib) from the ticket description

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@jhpalmieri
Copy link
Member

comment:131

Keep this open for polylib? Or close it?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 24, 2022

comment:132

Let's close it.

@mkoeppe mkoeppe removed this from the sage-9.8 milestone Nov 24, 2022
@dimpase
Copy link
Member

dimpase commented Nov 25, 2022

Reviewer: Dima Pasechnik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants