You are not logged in.

#1 2013-10-24 04:47:13

pzlvv
Member
Registered: 2012-12-07
Posts: 9

Unknown compiler flag: -D_FORTIFY_SOURCE=2

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

#2 2013-10-24 05:30:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Unknown compiler flag: -D_FORTIFY_SOURCE=2

Another user got the same error, but got no response so far https://aur.archlinux.org/packages/pocketsphinx/

Offline

#3 2013-10-24 05:44:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Unknown compiler flag: -D_FORTIFY_SOURCE=2

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

#4 2013-10-24 06:00:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Unknown compiler flag: -D_FORTIFY_SOURCE=2

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

#5 2013-10-24 06:04:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Unknown compiler flag: -D_FORTIFY_SOURCE=2

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

#6 2013-11-05 18:32:07

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Unknown compiler flag: -D_FORTIFY_SOURCE=2

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

See my comment on https://aur.archlinux.org/packages/pocketsphinx/

Last edited by ackalker (2013-11-05 18:33:23)

Offline

Board footer

Powered by FluxBB