[pkg-firebird-general] Bug#377173: FTBFS with GCC 4.2: C/C++ linkage declarations conflict

Martin Michlmayr tbm at cyrius.com
Thu Jul 6 21:05:46 UTC 2006


Package: firebird2
Version: 1.5.3.4870-8

Your package fails to build with recent versions of the gcc-snapshot
package, i.e. a pre-release of GCC 4.2.  The problem is that external
variables are defined both in a C and C++ context, as you can see in
this simple example:

42059:tbm at deprecation: ~] /usr/lib/gcc-snapshot/bin/g++ -c t.cc
t.cc:1: error: previous declaration of 'int i' with 'C++' linkage
t.cc:4: error: conflicts with new declaration with 'C' linkage
42060:tbm at deprecation: ~] cat t.cc
extern int i;

extern "C" {
        extern int i;
}

According to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27227#c8 this is
not valid, so please investgate.


> Automatic build of firebird2_1.5.3.4870-8 on usurper by sbuild/amd64 0.46
...
> g++ -DTERMINATE_IDLE_LOCK_MANAGER -DTERMINATE_IDLE_LOCK_MANAGER -I../src/include/gen -I../src/include -ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0  -DPROD_BUILD -DTERMINATE_IDLE_LOCK_MANAGER -I../src/include/gen -I../src/include -ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0  -DPROD_BUILD -I../src/include/gen -I../src/include -ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0  -DPROD_BUILD -DBOOT_BUILD -I../src/include/gen -I../src/include -ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0  -DPROD_BUILD -c ../src/jrd/jrd.cpp -o ../temp/libfbstatic/jrd/jrd.o
> ../src/jrd/../jrd/jrd.h:1053: error: previous declaration of 'int debug' with 'C++' linkage
> ../src/jrd/jrd.cpp:424: error: conflicts with new declaration with 'C' linkage
> ../src/jrd/../jrd/jrd.h:1054: error: previous declaration of 'ihndl* internal_db_handles' with 'C++' linkage
> ../src/jrd/jrd.cpp:425: error: conflicts with new declaration with 'C' linkage
> ../src/jrd/jrd.cpp: In function 'ISC_STATUS check_database(tdbb*, att*, ISC_STATUS*)':
> ../src/jrd/jrd.cpp:4684: warning: deprecated conversion from string constant to 'TEXT*''
> make[4]: *** [../temp/libfbstatic/jrd/jrd.o] Error 1
> rm ../src/jrd/dyn_util.cpp ../src/jrd/ini.cpp ../src/jrd/dyn_mod.cpp ../src/jrd/dfw.cpp ../src/jrd/dyn_def.cpp ../src/jrd/dpm.cpp ../src/jrd/met.cpp ../src/jrd/dyn.cpp ../src/jrd/grant.cpp ../src/jrd/scl.cpp ../src/jrd/dyn_del.cpp ../src/jrd/pcmet.cpp ../src/jrd/fun.cpp
> make[4]: Leaving directory `/build/tbm/firebird2-1.5.3.4870/src'
> make[3]: *** [libfbstatic] Error 2

-- 
Martin Michlmayr
http://www.cyrius.com/




More information about the pkg-firebird-general mailing list