Build problem with latest GCC (auto-load.c fails to compile)

Steve Ellcey sellcey@cavium.com
Wed Dec 21 21:15:00 GMT 2016


Has anyone tried building gdb with the latest (top-of-tree) GCC sources?
I just did that and the build died with message shown below.

Steve Ellcey
sellcey@caviumnetworks.com



../../../src/binutils-gdb/gdb/auto-load.c: In function ‘void print_scripts(VEC_loaded_script_ptr*)’:
../../../src/binutils-gdb/gdb/auto-load.c:1317:52: error: argument 1 null where non-null expected [-Werror=nonnull]
   sizeof (loaded_script_ptr), sort_scripts_by_name);
                                                    ^
In file included from /home/ubuntu/sellcey/test-ifunc/install-init/include/c++/7.0.0/cstdlib:75:0,
                 from /home/ubuntu/sellcey/test-ifunc/install-init/include/c++/7.0.0/stdlib.h:36,
                 from build-gnulib/import/stdlib.h:36,
                 from ../../../src/binutils-gdb/gdb/common/common-defs.h:53,
                 from ../../../src/binutils-gdb/gdb/defs.h:28,
                 from ../../../src/binutils-gdb/gdb/auto-load.c:20:
/usr/include/stdlib.h:764:13: note: in a call to function ‘void qsort(void*, size_t, size_t, __compar_fn_t)’ declared here
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
cc1plus: all warnings being treated as errors
Makefile:1880: recipe for target 'auto-load.o' failed
make[2]: *** [auto-load.o] Error 1
make[2]: Leaving directory '/home/ubuntu/sellcey/test-ifunc/obj/binutils-gdb/gdb'
Makefile:10455: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/ubuntu/sellcey/test-ifunc/obj/binutils-gdb'
Makefile:850: recipe for target 'all' failed
make: *** [all] Error 2



More information about the Gdb-patches mailing list