Maxs homepage

Main Branches

Contact   Publications   Talks   Grants   Teaching   Mathematics   Computer   Images   Private   Links  

Compiling GAP 3r4p4 under modern Linux

Under reasonably modern Linux the header files of the C library have changed in a way, such that GAP3r4p4 does no longer compile "out of the box". The typical error message while compiling via "make" ist something like:

[root@localhost src] # make ibm-i386-linux-gcc2
make[1]:Entering directory '/usr/local/lib/gap3r4p4/src' gcc
system.c:1576:Conflicting types for 'ioctl'
/usr/include/sys/ioctl.h:43:previous declaration of 'ioctl'
system.c : In function 'syAnswerCont':
system.c:1615:warning:'return' with a value, in function returning
system.c: In function 'syAnswerTstp':
system.c:1626:warning:'return ' value in function returning void.
system.c:In function 'syAnswerIntr':
system.c:2749:warning:'return' with a value in function returning
make[1]:***[system.o] Error 1
make[1]:Leaving directory '/usr/local/lib/gap3r4p4/src'
make : *** [ibm-i386-linux-gcc2] Error 2.

What shall I do?

Note that only the error about "ioctl" is serious. The warnings about return values can safely be ignored.

The solution to this problem is:

Edit the src/Makefile: Change the line 244 (2 lines after the target ibm-i386-linux-gcc2:):
	@$(MAKE) system.o   CC=gcc  CFLAGS="$(COPTS) -DSYS_IS_USG 
            -DSYS_HAS_TIME_PROTO -DSYS_HAS_SIG_T=void"

(note that the long line has been broken here!) into

	@$(MAKE) system.o   CC=gcc  CFLAGS="$(COPTS) -DSYS_IS_USG 

Note that the replacement line is rather long and you probably cannot see any difference without scrolling to the right.

Then there remain 3 warnings, but they are not serious (as far as I know).

I hope that helps.