#462 closed defect (fixed)
commit e6c87a718936b070ce8983f0e95cbead7959629c not BSD-compatible
Reported by: | Alan Post | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | build system | Version: | 4.6.x |
Keywords: | Cc: | alanpost@… | |
Estimated difficulty: |
Description
After updating Chicken past e6c87a718936b070ce8983f0e95cbead7959629c, I get the following error trying to build on OpenBSD 4.8:
gmake -f ./Makefile.bsd CONFIG= all gmake[1]: Entering directory `/home/a/wa/chicken/core' gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os -fomit-frame-pointer -DC_BUILDING_LIBCHICKEN library.c -o library-static.o -I. -I./ In file included from library.c:11: chicken.h:157: error: conflicting types for 'alloca' gmake[1]: *** [library-static.o] Error 1 gmake[1]: Leaving directory `/home/a/wa/chicken/core' gmake: *** [all] Error 2
The OpenBSD man page indicates that alloca has a different signature than the one declared in chicken.h:
The macro '#if defined(__OpenBSD__)' can be used to add platform specific code in OpenBSD, though I suspect alloca is stable across the *BSD platforms.
Attachments (1)
Change History (11)
comment:1 Changed 14 years ago by
Cc: | alanpost@… added |
---|
comment:2 follow-up: 3 Changed 14 years ago by
comment:3 follow-up: 4 Changed 14 years ago by
Replying to ckeen:
I cannot reproduce this with a checkout of experimental that includes this commitgg. Can you retry using a clean build?
Also can you try a gmake PLATFORM=BSD instead of calling the Makefile directly?
This works on 4.6 and 4.7. From CVS I cannot see any change of the alloca signatures, but I will try this next.
I was using PLATFORM=BSD, I'm sorry for not including that in my report. What compiler version are you using? OpenBSD 4.8 has:
$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.8/4.2.1/specs Target: i386-unknown-openbsd4.8 Configured with: OpenBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070719
Which might be available from ports on OpenBSD 4.7
I will retry compiling from a clean checkout. Will you try a newer version of gcc if you're on 4.7?
comment:4 Changed 14 years ago by
Replying to alanpost:
Replying to ckeen:
I cannot reproduce this with a checkout of experimental that includes this commitgg. Can you retry using a clean build?
Also can you try a gmake PLATFORM=BSD instead of calling the Makefile directly?
This works on 4.6 and 4.7. From CVS I cannot see any change of the alloca signatures, but I will try this next.
I was using PLATFORM=BSD, I'm sorry for not including that in my report. What compiler version are you using? OpenBSD 4.8 has:
$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.8/4.2.1/specs Target: i386-unknown-openbsd4.8 Configured with: OpenBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070719Which might be available from ports on OpenBSD 4.7
I will retry compiling from a clean checkout. Will you try a newer version of gcc if you're on 4.7?
Ah good catch.
$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.6/3.3.5/specs Configured with: Thread model: single gcc version 3.3.5 (propolice)
Is your compiler from ports or the one from base? I will try building on a 4.8 and on a 4.7 with a newer gcc.
comment:5 Changed 14 years ago by
Same with 4.7:
$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.7/3.3.5/specs Configured with: Thread model: single gcc version 3.3.5 (propolice) [22:21:11] ckeen@athene:~/proj/chicken/chicken-core
comment:6 Changed 14 years ago by
OK Thanks to IRC, alan and another build host I do run into the same problem on 4.8g.
I will come up with a patch, so it will run on 4.7 systems which are still officially supported until may 2011 and newer 4.8 systems.
Changed 14 years ago by
Attachment: | patch-chicken_h added |
---|
change of the forward declaration signature of alloca from char* to void*
comment:7 Changed 14 years ago by
Owner: | set to felix winkelmann |
---|---|
Status: | new → assigned |
Actually after looking up man pages for alloca, which system does have the signature of
char *alloca(size_t size);
instead of
void *alloca(size_t size);
I have verified this for:
Linux, *BSD, Mac OS X, Windows (VS2010 docs) will look into it for Solaris (who was the Haiku person again?)
I have attached a patch to remedy the problem. This also builds on OpenBSD 4.7 as the signature has always been this way...
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks, folks. Patch applied.
I cannot reproduce this with a checkout of experimental that includes this commitgg. Can you retry using a clean build?
Also can you try a gmake PLATFORM=BSD instead of calling the Makefile directly?
This works on 4.6 and 4.7. From CVS I cannot see any change of the alloca signatures, but I will try this next.