how do I fix this header conflict?
Benjamin Reed
ranger at befunk.com
Mon Jun 30 18:48:49 BST 2003
In acinclude.m4.in there is a line that adds the flag "-pedantic-errors"
to CXXFLAGS. On Mac OS X, this causes issues when configure gets very
long and the c preprocessor gets out-of-bounds errors:
---(snip!)---
configure:32891: checking for initgroups
configure:32942: g++ -c -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall
-pedantic -W -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions
-fno-check-new -fno-common -pedantic-errors -DQT_THREAD_SUPPORT
-I/usr/X11R6/include -I/opt/local/include -I/opt/local/include/qt3
-no-cpp-precomp -fno-common conftest.cc >&5
conftest.cc:1:7: line number out of range
configure:32945: $? = 1
---(snip!)---
When this happens, configure assumes I don't have the function and
enables the version in libkdefakes instead. This causes conflicts when
the kdefakes version gets in the way of the version in the system
libraries:
---(snip!)---
In file included from dcopserver.cpp:39:
/usr/include/unistd.h:215: error: declaration of C function `int
initgroups(const char*, int)' conflicts with
../config.h:810: error: previous declaration `int initgroups(const
char*, unsigned int)' here
make[4]: *** [dcopserver.lo] Error 1
---(snip!)---
The thing that fixes it for me is to change "-pedantic-errors" to
"-pedantic", but last time I asked about this I got a lot of backlash.
Since that is not a proper solution, what is?
More information about the kde-core-devel
mailing list