Summary

commit e6c87a718936b070ce8983f0e95cbead7959629c not BSD-compatible

Metadata

Attachments

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:

alloca(3)

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.

Changes and comments

[2010-12-19 17:37:38 UTC] alanpost set cc to alanpost@sunflowerriver.org

[2010-12-19 21:51:28 UTC] ckeen wrote:

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.

[2010-12-19 22:11:01 UTC] alanpost wrote:

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?

[2010-12-19 22:20:33 UTC] ckeen wrote:

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 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?

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.

[2010-12-19 22:21:33 UTC] ckeen wrote:

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

[2010-12-19 23:16:52 UTC] ckeen wrote:

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.

[2010-12-20 10:39:00 UTC] ckeen attached patch-chicken_h (description=change of the forward declaration signature of alloca from char* to void*)

[2010-12-20 10:40:08 UTC] ckeen wrote:

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...

[2010-12-20 10:40:08 UTC] ckeen changed status from new to assigned

[2010-12-20 10:40:08 UTC] ckeen set owner to felix

[2010-12-20 12:51:57 UTC] felix changed status from assigned to closed

[2010-12-20 12:51:57 UTC] felix set resolution to fixed

[2010-12-20 12:51:57 UTC] felix wrote:

Thanks, folks. Patch applied.

[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0

[2011-06-01 09:00:41 UTC] felix wrote:

Milestone 4.7.0 deleted

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted