You are not logged in.
Hi, I'm installing pocketsphinx from AUR and I got an error "Unknown compiler flag: -D_FORTIFY_SOURCE=2".
Here're some details:
cython -o pocketsphinx.c pocketsphinx.pyx -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 -I/usr/include/python2.7 -I/usr/include/sphinxbase -I/python
Unknown compiler flag: -D_FORTIFY_SOURCE=2
Makefile:601: recipe for target 'pocketsphinx.c' failed
make[1]: *** [pocketsphinx.c] Error 1
I know nothing about cython and can anybody give some suggestions?
Offline
Another user got the same error, but got no response so far https://aur.archlinux.org/packages/pocketsphinx/
Offline
Quick solution would be adding "unset CPPFLAGS" to the PKGBUILD.
That's not really a good option, though. I'm thinking the build system needs patched to not include $CPPFLAGS when using cython.
Offline
The only somewhat related thing I could find was https://mailman.archlinux.org/pipermail … 24788.html but it talks about the need of '-O2', not the '-D_FORTIFY_SOURCE=2' and not the CPPFLAGS itself.
I think that adding 'unset CPPFLAGS' to some PKGBUILDs may be the right way.
Offline
The problem is that then you don't have -D_FORTIFY_SOURCE=2 for when other parts of the software are built with gcc/clang/etc. Not the end of the world, but not ideal.
Offline
Fixing this without unsetting CPPFLAGS for everything else is as easy as adding the following line under the 'find -type f' lines in build():
sed -i '/cython/s/$(CPPFLAGS) //' python/Makefile.amSee my comment on https://aur.archlinux.org/packages/pocketsphinx/
Last edited by ackalker (2013-11-05 18:33:23)
Offline