You are not logged in.
Hi,
I've run into a problem with 3 different AUR packages relating to a strange gcc flag, -02 (that's a zero), that appears for no apparent reason. The packages are sxiv-git, isync-git, and hhpc-git. I've tried all three the manual way, and with packer. Here's what the error messages look like using packer (they are essentially the same the manual way):
sxiv-git
==> Starting build()...
cp config.def.h config.h
gcc -march=native -02 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -std=c99 -Wall -pedantic -O2 -I/usr/include -DHAVE_GIFLIB -DVERSION=\"git-20140218\" -c -o commands.o commands.c
gcc: error: unrecognized command line option ‘-02’
Makefile:19: recipe for target 'commands.o' failed
make: *** [commands.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
The build failed.
hhpc-git
==> Starting build()...
cc -c hhpc.c -march=native -02 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -s -O2 -DNDEBUG
cc: error: unrecognized command line option ‘-02’
Makefile:79: recipe for target 'hhpc.o' failed
make: *** [hhpc.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
The build failed.
isync-git; here I was referred to config.log. The following is from there.
configure:3111: $? = 0
configure:3100: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.8-20140206/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir$
Thread model: posix
gcc version 4.8.2 20140206 (prerelease) (GCC)
configure:3111: $? = 0
configure:3100: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3111: $? = 1
configure:3100: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3111: $? = 1
configure:3131: checking whether the C compiler works
configure:3153: gcc -march=native -02 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-com$
gcc: error: unrecognized command line option '-02'
configure:3157: $? = 1
configure:3195: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "isync"
| #define PACKAGE_TARNAME "isync"
| #define PACKAGE_VERSION "1.1.1"
| #define PACKAGE_STRING "isync 1.1.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "isync"
| #define VERSION "1.1.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3200: error: in `/tmp/packerbuild-1000/isync-git/isync-git/src/isync':
configure:3202: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=native -02 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
ac_cv_env_CPPFLAGS_set=set
And voila---here is the flag. I checked sxiv's and hhpc's makefiles, and neither show this flag. Since there appear to be environmental variables, I guess these are set elsewhere on my system. Yet I've installed other packages successfully; not sure if any of these required gcc. Anyone have an idea what's going on? Thanks in advance!
Last edited by monodromy (2014-02-20 07:13:22)
Offline
Post your /etc/makepkg.conf or at least grep it:
$ grep o2 /etc/makepkg.conf
$ grep O2 /etc/makepkg.conf
Last edited by karol (2014-02-20 06:28:25)
Offline
Nothing for the first grep, but jackpot for the second:
CFLAGS="-march=native -02 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
Should I comment out the whole thing? Just delete the -02? Or change the 0 to O?
Offline
It is definitely -O2
Offline
Thanks---I just realized I copied it wrong myself from the wiki. Appreciate all the help!
Offline