compiling error

Asked by Souvik Maji

I am trying to install Geis on my fedora 22 workstation, with gcc 5. But during make i am having this error:

In file included from geis_bag.c:25:0:
geis_bag.c: In function '_bag_store_allocate':
geis_logging.h:56:39: error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic]
                                       __FUNCTION__, __LINE__, \
                                       ^
geis_bag.c:39:5: note: in expansion of macro 'geis_error'
     geis_error("failed to allocate bag store");
     ^
geis_bag.c: In function 'geis_bag_new':
geis_logging.h:56:39: error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic]
                                       __FUNCTION__, __LINE__, \
                                       ^
geis_bag.c:53:5: note: in expansion of macro 'geis_error'
     geis_error("failed to allocate bag");
     ^
cc1: all warnings being treated as errors
Makefile:379: recipe for target 'libgeis_util_la-geis_bag.lo' failed
make[3]: *** [libgeis_util_la-geis_bag.lo] Error 1
Makefile:351: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
Makefile:461: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:369: recipe for target 'all' failed
make: *** [all] Error 2

why this error? and how to avoid this?

Question information

Language:
English Edit question
Status:
Solved
For:
Geis Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen M. Webb
Solved:
Last query:
Last reply:
Revision history for this message
Best Stephen M. Webb (bregma) said :
#1

The error is because GCC 5 is far more pedantic about what it accepts when the -pedantic flag is used. This has actually been fixed upstream in bzr head but has not yet been officially released.

To get past this problem, edit the configure.ac file and edit the line

AC_SUBST(AM_CFLAGS, "-Wall -Wextra -Werror -pedantic -std=iso9899:1999 -D_GNU_SOURCE=1")

to read

AC_SUBST(AM_CFLAGS, "-Wall -Wextra -std=iso9899:1999 -D_GNU_SOURCE=1")

and then run "autoreconf" and proceed to configure and make the project.

Revision history for this message
Souvik Maji (souvikmaji94) said :
#2

Thanks Stephen M. Webb, that solved my question.

Revision history for this message
Souvik Maji (souvikmaji94) said :
#3

This solved my problem. But autoreconf showed a lots of warnings. This is the output of autoreconf:

Makefile.am:28: warning: '%'-style pattern rules are a GNU make extension
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libgeis/Makefile.am:25: while processing Libtool library 'libgeis.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-dbus-backend.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libgeis/backend/dbus/Makefile.am:21: while processing Libtool library 'libgeis-dbus-backend.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-grail-backend.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libgeis/backend/grail/Makefile.am:19: while processing Libtool library 'libgeis-grail-backend.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-test-fixture.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libgeis/backend/test_fixture/Makefile.am:7: while processing Libtool library 'libgeis-test-fixture.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-dbus-server.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libgeis/server/Makefile.am:22: while processing Libtool library 'libgeis-dbus-server.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-dbus.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libs/geis-dbus/Makefile.am:22: while processing Libtool library 'libgeis-dbus.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgeis-util.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
libs/geis-util/Makefile.am:20: while processing Libtool library 'libgeis-util.la'
python/Makefile.am:31: warning: source file '_geis_bindings/_geis_bindings.c' is in a subdirectory,
python/Makefile.am:31: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
/usr/share/automake-1.15/am/ltlibrary.am: warning: '_geis_bindings.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
python/Makefile.am:29: while processing Libtool library '_geis_bindings.la'
testsuite/geis1/Makefile.am:41: warning: source file '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' is in a subdirectory,
testsuite/geis1/Makefile.am:41: but option 'subdir-objects' is disabled
testsuite/geis2/Makefile.am:89: warning: source file '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' is in a subdirectory,
testsuite/geis2/Makefile.am:89: but option 'subdir-objects' is disabled
testsuite/gtest/Makefile.am:10: warning: source file '$(GTEST_SOURCE)/src/gtest-all.cc' is in a subdirectory,
testsuite/gtest/Makefile.am:10: but option 'subdir-objects' is disabled
testsuite/gtest/Makefile.am:26: warning: source file '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp' is in a subdirectory,
testsuite/gtest/Makefile.am:26: but option 'subdir-objects' is disabled
/usr/share/automake-1.15/am/library.am: warning: 'libgtest_geis.a': linking libraries using a non-POSIX
/usr/share/automake-1.15/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
testsuite/gtest/Makefile.am:7: while processing library 'libgtest_geis.a'
/usr/share/automake-1.15/am/library.am: warning: 'libx11_mocks.a': linking libraries using a non-POSIX
/usr/share/automake-1.15/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
testsuite/x11_mocks/Makefile.am:6: while processing library 'libx11_mocks.a'