Version: (using KDE KDE 3.1.94) Compiler: gcc 3.2 OS: Solaris kurifiltertest.cpp: In function `int main(int, char**)': kurifiltertest.cpp:147: `setenv' undeclared (first use this function) kurifiltertest.cpp:147: (Each undeclared identifier is reported only once for each function it appears in.) /usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h: At global scope: /usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h: In instantiation of `__gthread_mutex_t std::_Swap_lock_struct<0>::_S_swap_lock': /usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h:122: instantiated from here /usr/local/gcc-3.2/include/c++/3.2/bits/stl_threads.h:115: warning: missing initializer for member `_pthread_mutex::<anonymous struct>::__pthread_mutex_magic' gmake[3]: *** [kurifiltertest.o] Error 1 gmake[3]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio/tests' gmake[2]: *** [check-am] Error 2 gmake[2]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio/tests' gmake[1]: *** [check-recursive] Error 1 gmake[1]: Leaving directory `/home/drutitsky/KDE3/kdelibs-3.1.94/kio' gmake: *** [check-recursive] Error 1 Should use putenv instead setenv on Solaris. May be should bbe macro.
setenv() should be provided by libkdefakes (it's under kdelibs/kdecore) when missing. So it sounds like configure for some reason decided you have setenv or such
Created attachment 4024 [details] Attempt at fixing the problem The error comes from the compiler, not from the linker. Which means all it needs is a declaration, since libkdefakes in linked from libkdecore, which in turn is linked from libkio. Can you test the attached patch and see if it corrects the problem? Note: this test also fails for me, but due to another reason. It seems to be a "since 3.2" feature that isn't working.
how about including config.h then?
Subject: kdelibs/kio/tests CVS commit by faure: This should fix the setenv problem on Solaris. CCMAIL: 72045-done@bugs.kde.org M +1 -1 kurifiltertest.cpp 1.36 --- kdelibs/kio/tests/kurifiltertest.cpp #1.35:1.36 @@ -1,3 +1,3 @@ - +#include <config.h> #include <iostream> #include <stdlib.h>