Header inclusion issue with llvm-gcc

Andrea D'Amore and.damore at macports.org
Wed Sep 7 12:21:45 PDT 2011


I tried to build clisp on SnowLeopard with XCode4 4.0.2, the build
broke due to a test that was failing. I symlinked /Developer to XCode
3.2.6 directory and with that I was able to build clisp.

I investigated to see why XC4 couldn't build, the failing test was
generated by $worksrcpath/src/genclisph that in turn was printing a
"stdbool.h: No such file or directory" error and leaving clisp-test.c
source incomplete, hence the compiler error on clisp-test.c .

This is the relevant part from debug output:

(echo; echo '/* genclisph */' ; ./genclisph clisp-test.c ; echo ; echo
'#endif /* _CLISP_H */') >> clisp.h
writing test file clisp-test.c
stdbool.h: No such file or directory
/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -I/opt/local/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_lang_clisp/clisp/work/clisp-2.49/src/gllib
-W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type
-Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2
-fexpensive-optimizations -falign-functions=4 -DUNIX_BINARY_DISTRIB
-DENABLE_UNICODE -DDYNAMIC_MODULES -I.  -DUSE_CLISP_H=1
-DCOMPILE_STANDALONE clisp-test.c -o clisp-test-clisp
clisp-test.c: In function ‘main’:
clisp-test.c:18: error: expected declaration or statement at end of input


Searching for stdbool.h occurencies in src/ it was easy to see that
genclisph had a "#ifdef HAVE_STDBOOL_H" whose "#else" branch had
print_file() with a wrong path, cf. [1].


Why HAVE_STDBOOL_H is not defined when using XC4?

Can anyone try to build on Lion without the patchfile?



-- 
Andrea

[1] https://trac.macports.org/browser/trunk/dports/lang/clisp/files/patch-src_lispbibl_d.diff


More information about the macports-dev mailing list