Opened 9 years ago

Closed 9 years ago

#15973 closed defect (fixed)

Allow GAP to compile on OS X 10.4

Reported by: Karl-Dieter Crisman Owned by:
Priority: major Milestone: sage-6.2
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Karl-Dieter Crisman Reviewers: Volker Braun
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: c6dd019 (Commits, GitHub, GitLab) Commit: c6dd01927304177ffcfde2be05ee45f5cb8a9ce9
Dependencies: Stopgaps:

Status badges

Description (last modified by Karl-Dieter Crisman)

I don't know whether this affects any other platform...

gcc -I. -I../.. -DCONFIG_H  -I/Users/student/Desktop/sage-6.2.beta4/local/include -Wall -g -O2  -O2 -g   -o sysfiles.o -c ../../src/sysfiles.c
../../src/sysfiles.c:3075:15: error: conflicting types for 'sys_errlist'
In file included from ../../src/sysfiles.h:20:0,
                 from ../../src/sysfiles.c:21:
/usr/include/stdio.h:274:30: note: previous declaration of 'sys_errlist' was here
make[4]: *** [sysfiles.o] Error 1
make[3]: *** [compile] Error 2
Error building GAP.

real    11m47.329s
user    7m23.375s
sys     2m4.167s
************************************************************************
Error installing package gap-4.7.4
************************************************************************

Dima on this sage-release thread gives the correct solution - to add -DHAVE_SYS_ERRLIST to the CFLAGS.

There is another problem with an unknown -no_pie flag as well which is passed to the linker, which on 10.4 and 10.5 is not supported - see this Macports bug report.

Change History (14)

comment:1 Changed 9 years ago by Karl-Dieter Crisman

Description: modified (diff)

comment:2 Changed 9 years ago by Dima Pasechnik

I didn't give a proper solution, I gave a hack. A proper solution would be to change configure.in appropriately, and/or to run autoconf etc on OSX 10.4 to generate configure.

Same applies to -no_pie, I guess.

comment:3 Changed 9 years ago by Dima Pasechnik

Report Upstream: N/ANot yet reported upstream; Will do shortly.

This can be reported upstream - GAP devs usually honour requests for fixes for old and not too exotic platforms.

comment:4 Changed 9 years ago by Dima Pasechnik

Report Upstream: Not yet reported upstream; Will do shortly.Reported upstream. No feedback yet.

comment:5 in reply to:  2 Changed 9 years ago by Karl-Dieter Crisman

I didn't give a proper solution, I gave a hack. A proper solution would be to change configure.in appropriately, and/or to run autoconf etc on OSX 10.4 to generate configure.

Oh, I see. I guess we could apply a patch to that. Though I'm having trouble seeing where it's done - configure.in, configure, sysinfo.in, none of them have sys_err in them. Hard to navigate.

Same applies to -no_pie, I guess.

Presumably, though I have the same trouble there. And probably running autoconf on a bunch of different machines isn't a real solution, though maybe I'm misunderstanding this.

This can be reported upstream - GAP devs usually honour requests for fixes for old and not too exotic platforms.

Awesome.

So... why is there no GAP source code browser, and no public bug report list? RWTH can't be that protective of it...

comment:6 Changed 9 years ago by Dima Pasechnik

The issue is reported on GAP's brand new public issue tracker on Bitbucket https://bitbucket.org/gap-system/gap/issue/1/gap-474-does-not-build-on-osx-104

Issue number 1, in fact...

comment:7 Changed 9 years ago by Volker Braun

Just to repeat my comment on the gap bitbucket tracker:

The bug is probably https://bitbucket.org/gap-system/gap/commits/86fd78bc51f7, which enabled the -no_pie linker option on OSX 10.4. But the 10.4 linker does not understand the option, so linking fails. This, in turn, causes the AC_TRY_LINK for sys_errlist to fail, and autoconf unsets HAVE_SYS_ERRLIST.

comment:8 Changed 9 years ago by Karl-Dieter Crisman

Report Upstream: Reported upstream. No feedback yet.Fixed upstream, but not in a stable release.

comment:9 Changed 9 years ago by Karl-Dieter Crisman

In particular, see this commit.

comment:10 Changed 9 years ago by Karl-Dieter Crisman

Okay, just slapping that patch in the patches directory for Gap cleared the issue (yes, I had removed the previous hack). Git isn't built on that machine yet so I couldn't export this as a branch, but if someone can just check it doesn't mess things up on a newer OS X machine then I think we're good to go.

comment:11 Changed 9 years ago by Volker Braun

Branch: u/vbraun/allow_gap_to_compile_on_os_x_10_4

comment:12 Changed 9 years ago by Volker Braun

Commit: c6dd01927304177ffcfde2be05ee45f5cb8a9ce9
Status: newneeds_review

New commits:

c6dd019OSX 10.4 build fix

comment:13 Changed 9 years ago by Volker Braun

Authors: Karl-Dieter Crisman
Reviewers: Volker Braun
Status: needs_reviewpositive_review

comment:14 Changed 9 years ago by Volker Braun

Branch: u/vbraun/allow_gap_to_compile_on_os_x_10_4c6dd01927304177ffcfde2be05ee45f5cb8a9ce9
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.