Page 1 of 1

Overflow plugin compile error

PostPosted: Mon Jun 09, 2014 2:15 pm
by GBit
kernel 3.14.5
Code: Select all
  GENHASH  /usr/src/linux/linux-3.14.5/tools/gcc/size_overflow_plugin/size_overflow_hash.h
  GENHASH  /usr/src/linux/linux-3.14.5/tools/gcc/size_overflow_plugin/size_overflow_hash_aux.h
  HOSTCXX -fPIC tools/gcc/size_overflow_plugin/insert_size_overflow_asm.o
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:745:2: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:747:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:748:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:750:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:756:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:757:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:758:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:759:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:760:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:762:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:763:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:764:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:765:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:766:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:767:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:769:2: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-narrowing" [enabled by default]
make[4]: *** [tools/gcc/size_overflow_plugin/insert_size_overflow_asm.o] Error 1
make[3]: *** [tools/gcc/size_overflow_plugin] Error 2
make[2]: *** [gcc-plugins] Error 2
make[2]: Leaving directory `/usr/src/linux/linux-3.14.5'
make[1]: *** [debian/stamp/conf/kernel-conf] Error 2
make[1]: Leaving directory `/usr/src/linux/linux-3.14.5'
make: *** [debian/stamp/conf/minimal_debian] Error 2
Failed to create a ./debian directory:  at /usr/bin/make-kpkg line 984.



gcc -v

gcc -v
Code: Select all
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)


The patch went fine in term sof errors, nothing popped up. I keep getting these plugin errors, though.

.config

http://pastebin.com/srY0peP9

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 8:13 am
by ephox
Hi,

Could you paste the result of these commands, please? (HOSTCXX=g++ and CC=gcc if you don't override them yourself):
Code: Select all
a=$($CC -print-file-name=plugin); ls -l  "$a/include/"; echo "plugin_dir: $a"

run this script from your kernel source:
Code: Select all
sh -x scripts/gcc-plugin.sh "$HOSTCXX" "$HOSTCXX" "$CC"

Code: Select all
dpkg -l | grep plugin-dev

Code: Select all
make clean ; make V=1 gcc-plugins


Thanks

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 10:16 am
by GBit
Code: Select all
 a=$($CC -print-file-name=plugin); ls -l "$a/include/"; echo "plugin_dir: $a"
-print-file-name=plugin: command not found
ls: cannot access /include/: No such file or directory
plugin_dir:


Code: Select all
 sh -x scripts/gcc-plugin.sh "$HOSTCXX" "$HOSTCXX" "$CC"
+ dirname scripts/gcc-plugin.sh
+ srctree=scripts
+ -print-file-name=plugin
scripts/gcc-plugin.sh: 3: scripts/gcc-plugin.sh: -print-file-name=plugin: not found
+ gccplugins_dir=
+ -E -shared - -o /dev/null -Iscripts/../tools/gcc -I/include
+ plugincc=scripts/gcc-plugin.sh: 4: scripts/gcc-plugin.sh: -E: not found
+ [ 127 -eq 0 ]


Code: Select all
 dpkg -l | grep plugin-dev
ii  gcc-4.8-plugin-dev                        4.8.1-2ubuntu1~12.04                          Files for GNU GCC plugin development.


Code: Select all
make clean ; make V=1 gcc-plugins
make -f /usr/src/linux/linux-3.14.6/Makefile silentoldconfig
make -f scripts/Makefile.build obj=scripts/basic
  gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks  -Wno-empty-body     -o scripts/basic/fixdep scripts/basic/fixdep.c 
rm -f .tmp_quiet_recordmcount
mkdir -p include/linux include/config
make -f scripts/Makefile.build obj=scripts/kconfig silentoldconfig
  gcc -Wp,-MD,scripts/kconfig/.conf.o.d -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks  -Wno-empty-body   -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c
  gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fomit-frame-pointer -fno-delete-null-pointer-checks  -Wno-empty-body   -DCURSES_LOC="<ncurses.h>" -DLOCALE  -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
In file included from scripts/kconfig/zconf.tab.c:2535:0:
scripts/kconfig/expr.c: In function ‘expr_print_gstr_helper’:
scripts/kconfig/expr.c:1156:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((last_line_length + extra_length) > gs->max_width)
                                         ^
In file included from scripts/kconfig/zconf.tab.c:2536:0:
scripts/kconfig/symbol.c: In function ‘sym_rel_comp’:
scripts/kconfig/symbol.c:982:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  exact1 = (s1->eo - s1->so) == strlen(s1->sym->name);
                             ^
scripts/kconfig/symbol.c:983:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  exact2 = (s2->eo - s2->so) == strlen(s2->sym->name);
                             ^
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘menu_set_type’:
scripts/kconfig/menu.c:116:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (sym->type == type)
                ^
  gcc  -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o 
mkdir -p include/generated
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
make -f scripts/Makefile.build obj=tools/gcc
make -f scripts/Makefile.build obj=tools/gcc/size_overflow_plugin
  /bin/bash /usr/src/linux/linux-3.14.6/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh -s size_overflow_hash -d tools/gcc/size_overflow_plugin/size_overflow_hash.data -o /usr/src/linux/linux-3.14.6/tools/gcc/size_overflow_plugin/size_overflow_hash.h
  /bin/bash /usr/src/linux/linux-3.14.6/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh -s size_overflow_hash_aux -d tools/gcc/size_overflow_plugin/size_overflow_hash_aux.data -o /usr/src/linux/linux-3.14.6/tools/gcc/size_overflow_plugin/size_overflow_hash_aux.h
  g++ -Wp,-MD,tools/gcc/size_overflow_plugin/.insert_size_overflow_asm.o.d -O2 -Wall -W -Wno-array-bounds -I/usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include -Itools/gcc -std=gnu++98 -fno-rtti -ggdb -Wno-unused-parameter -Wno-narrowing -Wno-unused-variable  -fPIC -c -o tools/gcc/size_overflow_plugin/insert_size_overflow_asm.o tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:745:2: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:747:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:748:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:750:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:756:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:757:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:758:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:759:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:760:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:762:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:763:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:764:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:765:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:766:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:767:3: error: expected primary-expression before ‘.’ token
tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c:769:2: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-narrowing" [enabled by default]
make[2]: *** [tools/gcc/size_overflow_plugin/insert_size_overflow_asm.o] Error 1
make[1]: *** [tools/gcc/size_overflow_plugin] Error 2
make: *** [gcc-plugins] Error 2

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 10:18 am
by GBit
Also, if it matters, I moved to 3.14.6 with the latest Grsecurity patch (all of that output above is from that) and the same exact errors persist.

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 10:27 am
by ephox
GBit wrote:
Code: Select all
 a=$($CC -print-file-name=plugin); ls -l "$a/include/"; echo "plugin_dir: $a"
-print-file-name=plugin: command not found
ls: cannot access /include/: No such file or directory
plugin_dir:


Code: Select all
 sh -x scripts/gcc-plugin.sh "$HOSTCXX" "$HOSTCXX" "$CC"
+ dirname scripts/gcc-plugin.sh
+ srctree=scripts
+ -print-file-name=plugin
scripts/gcc-plugin.sh: 3: scripts/gcc-plugin.sh: -print-file-name=plugin: not found
+ gccplugins_dir=
+ -E -shared - -o /dev/null -Iscripts/../tools/gcc -I/include
+ plugincc=scripts/gcc-plugin.sh: 4: scripts/gcc-plugin.sh: -E: not found
+ [ 127 -eq 0 ]



Could you substitute the $HOSTCXX and $CC variables? :) Based on the output of make: g++ (HOSTCXX), gcc (CC) .

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 10:37 am
by GBit
Whoops, sorry. Yeah.

Code: Select all
a=$($gcc -print-file-name=plugin); ls -l  "$a/include/"; echo "plugin_dir: $a"
-print-file-name=plugin: command not found
ls: cannot access /include/: No such file or directory
plugin_dir:
a=$(gcc -print-file-name=plugin); ls -l  "$a/include/"; echo "plugin_dir: $a"
total 3244
drwxr-xr-x 3 root root   4096 Jun  9 15:19 ada
-rw-r--r-- 1 root root   2222 Jun  5  2013 alias.h
-rw-r--r-- 1 root root   2030 Jun  5  2013 alloc-pool.h
-rw-r--r-- 1 root root    228 Jun  5  2013 all-tree.def
-rw-r--r-- 1 root root  14497 Jun  5  2013 ansidecl.h
-rw-r--r-- 1 root root  44982 Jun  5  2013 auto-host.h
-rw-r--r-- 1 root root  33044 Jun  5  2013 basic-block.h
-rw-r--r-- 1 root root  12359 Jun  5  2013 b-header-vars
-rw-r--r-- 1 root root  24452 Jun  5  2013 bitmap.h
-rw-r--r-- 1 root root  71869 Jun  5  2013 builtins.def
-rw-r--r-- 1 root root    170 Jun  5  2013 bversion.h
drwxr-xr-x 2 root root   4096 Jun  9 15:19 c-family
-rw-r--r-- 1 root root   6650 Jun  5  2013 cfg-flags.def
-rw-r--r-- 1 root root   8988 Jun  5  2013 cfghooks.h
-rw-r--r-- 1 root root  21183 Jun  5  2013 cfgloop.h
-rw-r--r-- 1 root root  46198 Jun  5  2013 cgraph.h
-rw-r--r-- 1 root root   4102 Jun  5  2013 cif-code.def
drwxr-xr-x 3 root root   4096 Jun  9 15:19 config
-rw-r--r-- 1 root root   1459 Jun  5  2013 configargs.h
-rw-r--r-- 1 root root    217 Jun  5  2013 config.h
-rw-r--r-- 1 root root   6549 Jun  5  2013 coretypes.h
drwxr-xr-x 2 root root   4096 Jun  9 15:19 cp
-rw-r--r-- 1 root root   2784 Jun  5  2013 cppdefault.h
-rw-r--r-- 1 root root  38961 Jun  5  2013 cpplib.h
-rw-r--r-- 1 root root  25731 Jun  5  2013 c-tree.h
drwxr-xr-x 2 root root   4096 Jun  9 15:19 d
-rw-r--r-- 1 root root   7928 Jun  5  2013 debug.h
-rw-r--r-- 1 root root  41888 Jun  5  2013 defaults.h
-rw-r--r-- 1 root root   3595 Jun  5  2013 diagnostic-core.h
-rw-r--r-- 1 root root   2017 Jun  5  2013 diagnostic.def
-rw-r--r-- 1 root root  10801 Jun  5  2013 diagnostic.h
-rw-r--r-- 1 root root  12786 Jun  5  2013 double-int.h
-rw-r--r-- 1 root root   7149 Jun  5  2013 dumpfile.h
-rw-r--r-- 1 root root   3492 Jun  5  2013 emit-rtl.h
-rw-r--r-- 1 root root  12284 Jun  5  2013 except.h
-rw-r--r-- 1 root root   3458 Jun  5  2013 filenames.h
-rw-r--r-- 1 root root   4301 Jun  5  2013 fixed-value.h
-rw-r--r-- 1 root root   3312 Jun  5  2013 flags.h
-rw-r--r-- 1 root root   7011 Jun  5  2013 flag-types.h
-rw-r--r-- 1 root root  28744 Jun  5  2013 function.h
-rw-r--r-- 1 root root   5122 Jun  5  2013 gcc-plugin.h
-rw-r--r-- 1 root root  34940 Jun  5  2013 genrtl.h
-rw-r--r-- 1 root root   9499 Jun  5  2013 ggc.h
-rw-r--r-- 1 root root  14409 Jun  5  2013 gimple.def
-rw-r--r-- 1 root root 134641 Jun  5  2013 gimple.h
-rw-r--r-- 1 root root   1368 Jun  5  2013 gimple-pretty-print.h
-rw-r--r-- 1 root root   2605 Jun  5  2013 gsstruct.def
-rw-r--r-- 1 root root   9909 Jun  5  2013 gtm-builtins.def
-rw-r--r-- 1 root root 518382 Jun  5  2013 gtype-desc.h
-rw-r--r-- 1 root root  23214 Jun  5  2013 hard-reg-set.h
-rw-r--r-- 1 root root   7405 Jun  5  2013 hashtab.h
-rw-r--r-- 1 root root   1121 Jun  5  2013 highlev-plugin-common.h
-rw-r--r-- 1 root root   9636 Jun  5  2013 hwint.h
-rw-r--r-- 1 root root   1419 Jun  5  2013 incpath.h
-rw-r--r-- 1 root root   2608 Jun  5  2013 input.h
-rw-r--r-- 1 root root   6348 Jun  5  2013 insn-constants.h
-rw-r--r-- 1 root root 294428 Jun  5  2013 insn-flags.h
-rw-r--r-- 1 root root   6474 Jun  5  2013 insn-modes.h
-rw-r--r-- 1 root root   3298 Jun  5  2013 insn-notes.def
-rw-r--r-- 1 root root   1545 Jun  5  2013 internal-fn.def
-rw-r--r-- 1 root root   1420 Jun  5  2013 internal-fn.h
-rw-r--r-- 1 root root   1830 Jun  5  2013 intl.h
-rw-r--r-- 1 root root  22583 Jun  5  2013 ipa-prop.h
-rw-r--r-- 1 root root   1069 Jun  5  2013 ipa-reference.h
-rw-r--r-- 1 root root   2335 Jun  5  2013 ipa-ref.h
-rw-r--r-- 1 root root   2706 Jun  5  2013 ipa-ref-inline.h
-rw-r--r-- 1 root root   1548 Jun  5  2013 ipa-utils.h
-rw-r--r-- 1 root root   5559 Jun  5  2013 is-a.h
drwxr-xr-x 2 root root   4096 Jun  9 15:19 java
-rw-r--r-- 1 root root  19625 Jun  5  2013 langhooks.h
-rw-r--r-- 1 root root  24516 Jun  5  2013 libiberty.h
-rw-r--r-- 1 root root  29884 Jun  5  2013 line-map.h
-rw-r--r-- 1 root root  11612 Jun  5  2013 machmode.h
-rw-r--r-- 1 root root   5335 Jun  5  2013 md5.h
-rw-r--r-- 1 root root   1864 Jun  5  2013 mode-classes.def
drwxr-xr-x 2 root root   4096 Jun  9 15:19 objc
-rw-r--r-- 1 root root  20889 Jun  5  2013 obstack.h
-rw-r--r-- 1 root root  10071 Jun  5  2013 omp-builtins.def
-rw-r--r-- 1 root root 211563 Jun  5  2013 options.h
-rw-r--r-- 1 root root  14497 Jun  5  2013 opts.h
-rw-r--r-- 1 root root  24449 Jun  5  2013 output.h
-rw-r--r-- 1 root root  38477 Jun  5  2013 params.def
-rw-r--r-- 1 root root   7749 Jun  5  2013 params.h
-rw-r--r-- 1 root root  12892 Jun  5  2013 plugin-api.h
-rw-r--r-- 1 root root   2809 Jun  5  2013 plugin.def
-rw-r--r-- 1 root root   2342 Jun  5  2013 plugin.h
-rw-r--r-- 1 root root    593 Jun  5  2013 plugin-version.h
-rw-r--r-- 1 root root   1562 Jun  5  2013 pointer-set.h
-rw-r--r-- 1 root root   5727 Jun  5  2013 predict.def
-rw-r--r-- 1 root root   1474 Jun  5  2013 predict.h
-rw-r--r-- 1 root root   1259 Jun  5  2013 prefix.h
-rw-r--r-- 1 root root  14295 Jun  5  2013 pretty-print.h
-rw-r--r-- 1 root root  18555 Jun  5  2013 real.h
-rw-r--r-- 1 root root   1341 Jun  5  2013 realmpfr.h
-rw-r--r-- 1 root root   9540 Jun  5  2013 reg-notes.def
-rw-r--r-- 1 root root  57408 Jun  5  2013 rtl.def
-rw-r--r-- 1 root root 105802 Jun  5  2013 rtl.h
-rw-r--r-- 1 root root   5643 Jun  5  2013 safe-ctype.h
-rw-r--r-- 1 root root  13452 Jun  5  2013 sanitizer.def
-rw-r--r-- 1 root root   8725 Jun  5  2013 sbitmap.h
-rw-r--r-- 1 root root   5729 Jun  5  2013 splay-tree.h
-rw-r--r-- 1 root root   2845 Jun  5  2013 statistics.h
-rw-r--r-- 1 root root   3516 Jun  5  2013 symtab.h
-rw-r--r-- 1 root root  26589 Jun  5  2013 sync-builtins.def
-rw-r--r-- 1 root root  33463 Jun  5  2013 system.h
-rw-r--r-- 1 root root  89858 Jun  5  2013 target.def
-rw-r--r-- 1 root root   6459 Jun  5  2013 target.h
-rw-r--r-- 1 root root   4059 Jun  5  2013 target-hooks-macros.h
-rw-r--r-- 1 root root  14314 Jun  5  2013 timevar.def
-rw-r--r-- 1 root root   3551 Jun  5  2013 timevar.h
-rw-r--r-- 1 root root   1088 Jun  5  2013 tm.h
-rw-r--r-- 1 root root    144 Jun  5  2013 tm_p.h
-rw-r--r-- 1 root root   9228 Jun  5  2013 tm-preds.h
-rw-r--r-- 1 root root   2769 Jun  5  2013 toplev.h
-rw-r--r-- 1 root root  18819 Jun  5  2013 tree-check.h
-rw-r--r-- 1 root root  59785 Jun  5  2013 tree.def
-rw-r--r-- 1 root root   2980 Jun  5  2013 tree-dump.h
-rw-r--r-- 1 root root  30684 Jun  5  2013 tree-flow.h
-rw-r--r-- 1 root root  35098 Jun  5  2013 tree-flow-inline.h
-rw-r--r-- 1 root root 246607 Jun  5  2013 tree.h
-rw-r--r-- 1 root root   6129 Jun  5  2013 tree-inline.h
-rw-r--r-- 1 root root   3193 Jun  5  2013 tree-iterator.h
-rw-r--r-- 1 root root  22687 Jun  5  2013 tree-pass.h
-rw-r--r-- 1 root root   2177 Jun  5  2013 tree-pretty-print.h
-rw-r--r-- 1 root root   5280 Jun  5  2013 tree-ssa-alias.h
-rw-r--r-- 1 root root   8676 Jun  5  2013 tree-ssa-operands.h
-rw-r--r-- 1 root root   7998 Jun  5  2013 tree-ssa-sccvn.h
-rw-r--r-- 1 root root   2810 Jun  5  2013 treestruct.def
-rw-r--r-- 1 root root  49802 Jun  5  2013 vec.h
-rw-r--r-- 1 root root    184 Jun  5  2013 version.h
plugin_dir: /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin



Code: Select all
sh -x scripts/gcc-plugin.sh "$g++" "$g++" "$gcc"
+ dirname scripts/gcc-plugin.sh
+ srctree=scripts
+ -print-file-name=plugin
scripts/gcc-plugin.sh: 3: scripts/gcc-plugin.sh: -print-file-name=plugin: not found
+ gccplugins_dir=
+ ++ -E -shared - -o /dev/null -Iscripts/../tools/gcc -I/include
+ plugincc=scripts/gcc-plugin.sh: 4: scripts/gcc-plugin.sh: ++: not found
+ [ 127 -eq 0 ]


Code: Select all
sh -x scripts/gcc-plugin.sh "g++" "g++" "gcc"
+ dirname scripts/gcc-plugin.sh
+ srctree=scripts
+ gcc -print-file-name=plugin
+ gccplugins_dir=/usr/lib/gcc/x86_64-linux-gnu/4.8/plugin
+ g++ -E -shared - -o /dev/null -Iscripts/../tools/gcc -I/usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include
+ plugincc=<stdin>:3:2: warning: #warning g++ [-Wcpp]
+ [ 0 -eq 0 ]
+ [[ <stdin>:3:2: warning: #warning g++ [-Wcpp] =~ g++ ]]
scripts/gcc-plugin.sh: 15: scripts/gcc-plugin.sh: [[: not found
+ [[ <stdin>:3:2: warning: #warning g++ [-Wcpp] =~ g++ ]]
scripts/gcc-plugin.sh: 15: scripts/gcc-plugin.sh: [[: not found

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 11:08 am
by PaX Team
can you run
Code: Select all
g++ -Wp,-MD,tools/gcc/size_overflow_plugin/.insert_size_overflow_asm.o.d -O2 -Wall -W -Wno-array-bounds -I/usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include -Itools/gcc -std=gnu++98 -fno-rtti -ggdb -Wno-unused-parameter -Wno-narrowing -Wno-unused-variable  -fPIC -E -o tools/gcc/size_overflow_plugin/insert_size_overflow_asm.i tools/gcc/size_overflow_plugin/insert_size_overflow_asm.c
and post tools/gcc/size_overflow_plugin/insert_size_overflow_asm.i somewhere (or just email it to Emese and me)?

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 4:01 pm
by GBit
http://www.justbeamit.com/wdh3r

Sorry that took so long.

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 4:09 pm
by PaX Team
the link doesn't work ("this download link no longer exists"), can you email it instead?

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 4:43 pm
by GBit
Darn. Yeah, what's the address?

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 4:45 pm
by PaX Team

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 4:47 pm
by GBit
Sent.

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 5:03 pm
by PaX Team
ok, i think i know what the problem is. how many gcc versions do you have installed? in particular, do you have a pre-4.7 version as well? the symptoms can be explained if the plugins were to be compiled with such an old gcc (or rather, g++) version. this can only happen if you or your kernel build system explicitly sets HOSTCC/HOSTCXX differently from CC. you should set them to the 4.8 gcc binaries for best results.

Re: Overflow plugin compile error

PostPosted: Wed Jun 11, 2014 6:38 pm
by GBit
Yeah, you're right. I thought I'd removed the old version but I guess it had gotten pulled in by something else. I've removed it and it appears to be compiling just fine now.

Thank you.