pb to build kdelibs

Alexander Neundorf neundorf at kde.org
Mon Jan 30 19:21:09 CET 2006


On Monday 30 January 2006 15:14, Laurent Montel wrote:
> Hi,
> I have this problem when I try to use cmake:
> lmontel/kde-4.0/kde4/kdelibs-cmake/kdelibs/dcop/dcopclient.cpp
> /usr/include/stdlib.h:675: error: declaration of C function 'int
> unsetenv(const char*)' conflicts with
> /home/lmontel/kde-4.0/kde4/kdelibs-cmake/kdelibs/config.h:460: error:
> previous declaration 'void unsetenv(const char*)' here
> /home/lmontel/kde-4.0/kde4/kdelibs-cmake/kdelibs/config.h:460: error:
> declaration of C function 'void unsetenv(const char*)' conflicts with
> /usr/include/stdlib.h:675: error: previous declaration 'int unsetenv(const
> char*)' here
>
> Do you have an idea ?

You can find all configure checks in kdelibs/ConfigureChecks.cmake.
There you'll find 
check_prototype_exists(unsetenv stdlib.h HAVE_UNSETENV_PROTO)
Every check_something() command comes from a cmake module named 
"CheckSomething.cmake". CheckPrototypeExists.cmake is in 
kdelibs/cmake/modules/. This check is very new, so it might still have 
problems, all other checks come with cmake for a long time.
The check_prototype_exists() functions tries to check whether unsetenv() is 
declared in stdlib.h and stores the result in HAVE_UNSETENV_PROTO.
Look at your config.h whether HAVE_UNSETENV_PROTO is defined to 1 or not 
(probably not).
So something went wrong with the test.
Open CMakeFiles/CMakeError.log and search for unsetenv, then you should see 
why it failed. Probably some header is missing.
To have the check executed again, either delete the file CMakeCache.txt (then 
all checks will be executed again), or remove all lines containing "UNSETENV" 
from CMakeCache.txt (simply with an editor), then only these checks will be 
executed again (saves some time).

You can find documentation about how to do system checking in the cmake wiki: 
http://www.cmake.org/Wiki/CMake , it's the entry "How to write platform 
checks with cmake".

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list