When emerging kde-base/kdelibs-3.3.2-r2 I get the following error which appears to be due to syntax problems in the library libxml2. Upon further investigation it looks like it could be caused by XMLPUBFUN not being defined, which is strange considereing xmlexports.h is included. Running gcc with -E reveals that the contents of xmlexports.h is not being included. The specific subsystem of kdelib is kdoctools. The is a fresh install of gentoo from the 2004.3 livecd. Reproducible: Always Steps to Reproduce: 1. Emerge kdelib or 2. Emerge source for kdelib 3. ./configure 4. Make 5. or in kdoctools directory -> Make Actual Results: /bin/sh ../libtool --silent --mode=compile --tag=CXX i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../dcop -I../kio/kssl -I.. -I../kioslave -I../kioslave/bzip2 -I../dcop -I../libltdl -I../kdefx -I../kdecore -I../kdeui -I../kio -I../kio/kio -I../kio/kfile -I.. -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/kde/3.3/include -I/usr/local/include/libxml2 -I/usr/include/libxml2 -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=pentium3 -O3 -pipe -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c -o xslt.lo xslt.cpp In file included from /usr/include/libxslt/xsltInternals.h:20, from main.cpp:11: /usr/include/libxml2/libxml/dict.h:30: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:32: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:34: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:36: error: syntax error before `void' /usr/include/libxml2/libxml/dict.h:42: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:46: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:50: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:53: error: syntax error before `int' In file included from /usr/include/libxslt/xsltInternals.h:20, from xslt.cpp:2: /usr/include/libxml2/libxml/dict.h:30: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:32: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:34: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:36: error: syntax error before `void' /usr/include/libxml2/libxml/dict.h:42: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:46: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:50: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:53: error: syntax error before `int' make[2]: *** [main.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /usr/include/libxslt/xsltutils.h:24, from kio_help.cpp:42: /usr/include/libxml2/libxml/dict.h:30: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:32: error: syntax error before `XMLCALL' /usr/include/libxml2/libxml/dict.h:34: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:36: error: syntax error before `void' /usr/include/libxml2/libxml/dict.h:42: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:46: error: syntax error before `const' /usr/include/libxml2/libxml/dict.h:50: error: syntax error before `int' /usr/include/libxml2/libxml/dict.h:53: error: syntax error before `int' make[2]: *** [xslt.lo] Error 1 make[2]: *** [kio_help.lo] Error 1 make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdelibs-3.3.2-r2/work/kdelibs-3.3.2' make: *** [all] Error 2 Attached is the postprocessor data from running make in kdoctools. As you can see, xmlexports.h is never included even though it is #included in xmlversion.h (which is #included in dict.h).
Created attachment 50174 [details] Preprocessor output
> ... -I/usr/local/include/libxml2 ... You are compiling against something in /usr/local, that's likely to be the cause.
issue was linking against usr/local
Changing to invalid. Or should we change the checks to avoid this kind of problems (I think there are too much checks to change).
I have to write something here...