Problem installing sage on High Sierra (Mac OS 10.13)

577 views
Skip to first unread message

Arvind Ayyer

unread,
Oct 8, 2017, 7:06:20 AM10/8/17
to sage-support
Dear all,


I recently upgraded my Mac OS to HighSierra and have installed the latest version of XCode. Strangely enough, the gcc version is still 4.2.1.

I'm trying to install the latest version of sage using my git account (userid: ayyer) using the guidelines from the TentativeConventions file.


I have a 2013 MacBook Pro Retina 13-inch. The processor is a 2.6 GHz Intel Core i5. The error has occurred in the very beginning while installing patch-2.7.5.


I have tried to find out what the error is and it may be related to the conflict between these lines starting at 281:


checking libgen.h usability... yes
 282 checking libgen.h presence... yes
 283 checking for libgen.h... yes


an these lines starting at 1968:


checking libgen.h usability... no
checking libgen.h presence... yes
configure: WARNING: libgen.h: present but cannot be compiled
configure: WARNING: libgen.h:     check for missing prerequisite headers?
configure: WARNING: libgen.h: see the Autoconf documentation
configure: WARNING: libgen.h:     section "Present But Cannot Be Compiled"
configure: WARNING: libgen.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------- ##
configure: WARNING:     ## Report this to bug-...@gnu.org ##
configure: WARNING:     ## -------------------------------- ##
checking for libgen.h... no


As per the instructions generating the error message, I'm emailing you the log file.


Please let my know if you need any more information from me.


Thanks a lot for your time and help.


Regards,
Arvind
patch-2.7.5.log

Dima Pasechnik

unread,
Oct 8, 2017, 7:14:44 AM10/8/17
to sage-support


On Sunday, October 8, 2017 at 12:06:20 PM UTC+1, Arvind Ayyer wrote:
Dear all,


I recently upgraded my Mac OS to HighSierra and have installed the latest version of XCode. Strangely enough, the gcc version is still 4.2.1.


is this Xcode 9? Then you need either https://trac.sagemath.org/ticket/12426 or


it's not gcc, it's clang, (mis)representing itself as gcc. This was always in Xcode (since they dropped "real" gcc)

John H Palmieri

unread,
Oct 8, 2017, 1:02:36 PM10/8/17
to sage-support
Are you trying to install Sage 6.2 (as your log seems to indicate)? That is extremely old. Try with a fresh source installation: either http://www.sagemath.org/download-source.html for stable source or http://www.sagemath.org/download-latest.html for the latest development version. Also, do you have the Xcode command-line tools installed? Run "xcode-select -install" from the terminal.

Finally, as Dima says, Sage won't build as is on OS X High Sierra, but the problems should come later in the installation process.

John H Palmieri

unread,
Oct 8, 2017, 4:37:02 PM10/8/17
to sage-support
Also, if you have problems with the curl package, try https://trac.sagemath.org/ticket/23991

Arvind Ayyer

unread,
Oct 8, 2017, 11:16:47 PM10/8/17
to sage-support
Thanks for your response, Dima. When you say that I need this ticket or that, do you mean that I should get that particular branch from git and install? I tried to check with get #12426, but that does not seem to be on the git server. The tickets you suggested seem to go in opposite directions. I read somewhere that gcc installed separately interferes with clang on XCode. I'm not using XCode for anything other than Sage, but do you think that could cause problems?

Regards,
Arvind

Arvind Ayyer

unread,
Oct 8, 2017, 11:18:08 PM10/8/17
to sage-support
Thanks for your response, John. Yes, I do have the command-line tools. Why do you think I'm installing Sage 6.2? Is it only because of the directory name? That's only because that was my first install on the Mac. I've installed 6.7 after that. I'm getting the latest version from git following the `Tentative Conventions' guidelines.
I'll try to upgrade to latest version of curl and check.

Regards,
Arvind

Dima Pasechnik

unread,
Oct 9, 2017, 6:15:26 AM10/9/17
to sage-support


On Monday, October 9, 2017 at 4:16:47 AM UTC+1, Arvind Ayyer wrote:
Thanks for your response, Dima. When you say that I need this ticket or that, do you mean that I should get that particular branch from git and install? I tried to check with get #12426, but that does not seem to be on the git server. The tickets you suggested seem to go in opposite directions. I read somewhere that gcc installed separately interferes with clang on XCode. I'm not using XCode for anything other than Sage, but do you think that could cause problems?

To install the branch from  #12426, you need to use git.
In a nutshell, add trac's git server to the remotes, and pull the branch
u/fbissey/clang-progress
from there.

Something like

git remote add trac git://trac.sagemath.org/sage.git
git checkout -b foobar
git pull trac u/fbissey/clang-progress

and rebuild Sage:

make distclean 
./configure CC=cc CXX=c++
make

More details may be found on

Shout if if you get stuck..

Arvind Ayyer

unread,
Oct 9, 2017, 11:20:13 AM10/9/17
to sage-support

Thanks, Dima.


To install the branch from  #12426, you need to use git.
In a nutshell, add trac's git server to the remotes, and pull the branch
u/fbissey/clang-progress
from there.

Stupid me! I thought the patch was called 12426 or something like it, whereas
the ticket clearly says what the patch is called.
 
Something like

git remote add trac git://trac.sagemath.org/sage.git
git checkout -b foobar
git pull trac u/fbissey/clang-progress

and rebuild Sage:

make distclean 
./configure CC=cc CXX=c++
make

So I did this. It progressed past the previous stage, but is now
giving an error while installing gcc. I've attached the log file.

Arvind

gcc-5.4.0.log

Dima Pasechnik

unread,
Oct 9, 2017, 11:36:53 AM10/9/17
to sage-support
Oh, I am sorry, I have not realised that this won't work on Xcode 9 without https://trac.sagemath.org/ticket/23898
(even with clang you still need to build a fortran compiler, provided by the gcc package gfortran)

If you just need working Sage, it might be easier to use only #23898
but not #12426 (you'd need to recompile)

Else, try pulling the branch of #23898 (and copying the corresponding tarball, as directed there)
on top of #12426, and try re-running make.
If you succeed with the latter, we will promote you to a Sage developer ;-)

Dima

Arvind Ayyer

unread,
Oct 13, 2017, 3:08:31 AM10/13/17
to sage-support
After many hours of compiling (and when it seemed close to completing), it gave an error while installing curl-7.53.1, as John had predicted. The error is funny because this is MacOS 10.13:

[curl-7.53.1] libtool: compile:  clang -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -I/Applications/Sage-6.2.app/Contents/Resources/sage/local/include -fvisibility=hidden -Qunused-arguments -Os -mmacosx-version-min=10.8 -Werror=partial-availability -MT libcurl_la-connect.lo -MD -MP -MF .deps/libcurl_la-connect.Tpo -c connect.c  -fno-common -DPIC -o .libs/libcurl_la-connect.o
[curl-7.53.1] connect.c:1087:12: error: 'connectx' is only available on macOS 10.11 or newer [-Werror,-Wunguarded-availability]
[curl-7.53.1]       rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
[curl-7.53.1]            ^~~~~~~~
[curl-7.53.1] /usr/include/sys/socket.h:713:5: note: 'connectx' has been explicitly marked partial here
[curl-7.53.1] int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,
[curl-7.53.1]     ^
[curl-7.53.1] connect.c:1087:12: note: enclose 'connectx' in a __builtin_available check to silence this warning
[curl-7.53.1]       rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
[curl-7.53.1]            ^~~~~~~~
[curl-7.53.1] 1 error generated.


What's the quickest way out now? If I download curl-7.56.0 in the upstream directory and rerun "SAGE_INSTALL_GCC=yes make ptestlong", will it delete all the existing builds?

Thanks,
Arvind

Ling Lin

unread,
Oct 16, 2017, 4:12:47 PM10/16/17
to sage-support
Hi,

I'm having a similar problem, since I have to install Sage on a new computer (Macbook Pro 2017 with OS10.13).
I think the issue is again with building gcc-5.4.0, which was mentioned in ticket ##23898. Since I'm not familiar with git, I cloned the repository for both the master and developer branch and tried to build that. In both cases, it still tries to build gcc-5.4.0, which then fails.

Would it be possible to spell out the fix for dummies?

Thanks,
Ling

John H Palmieri

unread,
Oct 16, 2017, 5:11:15 PM10/16/17
to sage-support
You have at least two choices. For both, start by downloading (http://www.sagemath.org/download-source.html) and unpacking sage-8.0.tar.gz wherever you plan to build it.

Choice 1: install git-trac-config: see http://doc.sagemath.org/html/en/developer/git_trac.html#installing-the-git-trac-command. (So run "git clone https://github.com/sagemath/git-trac-command.git" in some suitable directory, separate from the Sage installation, and then run "source git-trac-command/enable.sh".

Then cd into the Sage-8.0 directory. Run "git trac config". Then run "git trac checkout 23898". Also download the tarball for gcc-7.2 from that ticket and put it in sage-8.0/upstream. Then run "make".

Choice 2: skip the git business and just make the changes directly: edit the file "sage-8.0/build/pkgs/gcc/package-version.txt" to say "7.2.0". Also download a gzipped tarball for gcc-7.2 (for example from ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.gz) and put it in sage-8.0/upstream. Then run "./sage --package fix-checksum gcc". Then run "make".

moep

unread,
Oct 16, 2017, 10:58:33 PM10/16/17
to sage-support
Thanks for the response! I tried out Choice 1 and I got the git business to work (I also pulled #23972, because the first time I tried 'make', the 7.2 tarball got deleted).
But I still get an error in the end with building gcc-7.2.0. I have attached the log (it's huge, ~6MB).

At this point, I don't even understand what the error is... Any suggestions?
gcc-7.2.0.log

John H Palmieri

unread,
Oct 17, 2017, 1:21:01 AM10/17/17
to sage-support
It looks like you haven't installed the OS X command line tools, or they got removed when you updated to High Sierra. Try (re)installing them: run "xcode-select --install" from a terminal window.

moep

unread,
Oct 18, 2017, 12:16:26 AM10/18/17
to sage-support
Thanks a lot! Now gcc works. With this build, I seem to have no problem doing the computations I needed.

However, there are two further errors. One is with building curl-7.53.1, which John already mentioned above, and the other is with openblas-0.2.19.p0, which seem to have a fix with #23272. Since they don't seem to affect what I need, I haven't tried the solutions.
curl-7.53.1.log
openblas-0.2.19.p0.log
Reply all
Reply to author
Forward
0 new messages