Skip Menu |

This queue is for tickets about the Bit-Vector CPAN distribution.

Report information
The Basics
Id: 43544
Status: resolved
Priority: 0/
Queue: Bit-Vector

People
Owner: Nobody in particular
Requestors: jesse [...] bestpractical.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bit::Vector doesn't build cleanly on OSX 10.5's built in Perl
Date: Mon, 23 Feb 2009 12:49:25 -0500
To: bug-bit-vector [...] rt.cpan.org
From: Jesse Vincent <jesse [...] bestpractical.com>
17h:vendor jesse$ perl Makefile.PL Writing Makefile for Bit::Vector Writing patchlevel.h for perl (5.008008) 17h:vendor jesse$ make test cc -c -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3 -DVERSION=\"6.4\" -DXS_VERSION=\"6.4\" "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" BitVector.c cc -c -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3 -DVERSION=\"6.4\" -DXS_VERSION=\"6.4\" "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" Vector.c In file included from BitVector.h:16, from Vector.xs:34: ToolBox.h:92: error: syntax error before numeric constant In file included from BitVector.h:16, from Vector.xs:34: ToolBox.h:92: error: syntax error before numeric constant lipo: can't open input file: /var/folders/A8/A852KdyMFSSTmM-ZYKaf3U+++TI/-Tmp-//ccAHMlkt.out (No such file or directory) make: *** [Vector.o] Error 1 17h:vendor jesse$ A build of Bit::Vector against a home-built 5.8.9 on the same box works just fine. Tatsuhiko Miyagawa baked up a patch that fixes things for OSX: Subject: [PATCH] Make bool type work with C99 (OS X Leopard) --- ToolBox.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ToolBox.h b/ToolBox.h index 08b2cee..2eb8a6d 100644 --- a/ToolBox.h +++ b/ToolBox.h @@ -89,7 +89,8 @@ typedef Z_longword *Z_longwordptr; #ifdef MACOS_TRADITIONAL #define boolean Boolean #else - typedef enum { false = FALSE, true = TRUE } boolean; + #include <stdbool.h> + typedef bool boolean; #endif #endif Perl and GCC details are below: 17h:vendor jesse$ gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5465) 17h:vendor jesse$ perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=9.0, archname=darwin-thread-multi-2level uname='darwin b71.apple.com 9.0 darwin kernel version 9.2.0: mon feb 18 15:29:49 pst 2008; root:xnu-1228.3.14~1release_i386 i386 ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include', optimize='-O3', cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include' ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc -mmacosx-version-min=10.5.1', ldflags ='-arch i386 -arch ppc -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: fix for regcomp CVE-2007-5116 security vulnerability Built under darwin Compiled at May 31 2008 00:04:31 @INC: /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 . --
On Mon Feb 23 12:49:39 2009, jesse@bestpractical.com wrote: Show quoted text
> > Tatsuhiko Miyagawa baked up a patch that fixes things for OSX: > > Subject: [PATCH] Make bool type work with C99 (OS X Leopard) > > --- > ToolBox.h | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/ToolBox.h b/ToolBox.h > index 08b2cee..2eb8a6d 100644 > --- a/ToolBox.h > +++ b/ToolBox.h > @@ -89,7 +89,8 @@ typedef Z_longword *Z_longwordptr; > #ifdef MACOS_TRADITIONAL > #define boolean Boolean > #else > - typedef enum { false = FALSE, true = TRUE } boolean; > + #include <stdbool.h> > + typedef bool boolean; > #endif > #endif
Will be fixed in next release (version 6.6) due the next few days.