genreflex on Mac Snow Leopard

From: Brett Viren <bv_at_bnl.gov>
Date: Fri, 10 Sep 2010 17:44:46 -0400


Hi,

I'm trying to get Reflex dictionaries working on Mac Snow Leopard using ROOT 5.26.00b and find that genreflex chokes on the system stdlib.h. Has anyone experience this problem and found a solution?

Read on for some details.

The system is:



Xcode: 3.2.3

uname -a Darwin bnlku24.phy.bnl.gov 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

g++ -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)


I see the problem when building the Relax set of dictionaries. The build is failing in the HepMC dictionaries, which happen to be the first ones CMT decides to build:



#CMT---> (constituents.make) Starting HepMCGen #CMT---> (HepMCGen.make) Rebuilding ../i386-darwin-gcc42-dbg/HepMCGen_dependencies.make echo ../i386-darwin-gcc42-dbg/dict/HepMC/HepMCDict_dict.cpp HepMCDict.h ../i386-darwin-gcc42-dbg/dict/HepMC/HepMCDict_dict.cpp HepMCDict.h
/Users/dayabay/offline/NuWa-trunk/../external/ROOT/5.26.00b/i386-darwin-gcc42-dbg/root/bin/genreflex /Users/dayabay/offline/NuWa-trunk/relax/Dictionaries/HepMCRflx/dict/HepMCDict.h -o ../i386-darwin-gcc42-dbg/dict/HepMC/HepMCDict_dict.cpp \
                         --gccxmlopt='--gccxml-compiler c++ ' --select=/Users/dayabay/offline/NuWa-trunk/relax/Dictionaries/HepMCRflx/dict/selection.xml --rootmap=/Users/dayabay/offline/NuWa-trunk/relax/InstallArea/i386-darwin-gcc42-dbg/lib/libHepMCRflx.pamtoor --rootmap-lib=libHepMCRflx --gccxmlpath=/Users/dayabay/offline/NuWa-trunk/../external/gccxml/0.9.0_20081130/i386-darwin-gcc42-dbg/bin --capabilities=/Users/dayabay/offline/NuWa-trunk/relax/Dictionaries/HepMCRflx/i386-darwin-gcc42-dbg/dict/HepMC/capabilities.cpp  -I"/Users/dayabay/offline/NuWa-trunk/relax/Dictionaries/HepMCRflx/dict"  -I"../src" -I"/Users/dayabay/offline/NuWa-trunk/../external/HepMC/2.03.09/i386-darwin-gcc42-dbg/include" -I"/Users/dayabay/offline/NuWa-trunk/lcgcmt/LCG_SettingsCompat/src"             
In file included from /usr/include/c++/4.2.1/cstdlib:72,
                 from /usr/include/c++/4.2.1/bits/stl_algobase.h:68,
                 from /usr/include/c++/4.2.1/bits/char_traits.h:46,
                 from /usr/include/c++/4.2.1/ios:45,
                 from /usr/include/c++/4.2.1/ostream:45,
                 from /usr/include/c++/4.2.1/iostream:45,
                 from /Users/dayabay/offline/NuWa-trunk/../external/HepMC/2.03.09/i386-darwin-gcc42-dbg/include/HepMC/Flow.h:50,
                 from /Users/dayabay/offline/NuWa-trunk/relax/Dictionaries/HepMCRflx/dict/HepMCDict.h:7:

/usr/include/stdlib.h:272: error: expected primary-expression before 'void'
/usr/include/stdlib.h:274: error: expected `)' before '^' token
/usr/include/stdlib.h:274: error: expected ',' or '...' before '^' token
/usr/include/stdlib.h:274: error: expected initializer before ')' token
/usr/include/stdlib.h:301: error: expected `)' before '^' token
/usr/include/stdlib.h:301: error: expected ',' or '...' before '^' token
/usr/include/stdlib.h:301: error: expected initializer before ')' token
/usr/include/stdlib.h:307: error: expected `)' before '^' token
/usr/include/stdlib.h:307: error: expected ',' or '...' before '^' token
/usr/include/stdlib.h:307: error: expected initializer before ')' token
/usr/include/stdlib.h:313: error: expected `)' before '^' token
/usr/include/stdlib.h:313: error: expected ',' or '...' before '^' token
/usr/include/stdlib.h:313: error: expected initializer before ')' token
/usr/include/stdlib.h:319: error: expected `)' before '^' token
/usr/include/stdlib.h:319: error: expected ',' or '...' before '^' token
/usr/include/stdlib.h:319: error: expected initializer before ')' token

The area of stdlib.h where the initial two failures are is this:


    271 #ifdef __BLOCKS__
    272 int atexit_b(void (^)(void));     273 void *bsearch_b(const void *, const void *, size_t,     274 size_t, int (^)(const void *, const void *));     275 #endif /* __BLOCKS__ */


I have never seen this use of "^" in C/C++. Does anyone know what it means?

And, to the bigger question, any suggestions about how to proceed?

Thanks,
-Brett.

Received on Fri Sep 10 2010 - 23:44:56 CEST

This archive was generated by hypermail 2.2.0 : Mon Sep 13 2010 - 17:50:02 CEST