buid failed on win32 and cmake

Julien Isorce julien.isorce at gmail.com
Sun Nov 22 11:13:10 PST 2009


Hi,

(git clone git://cgit.freedesktop.org/dbus/dbus/)
It seems that DBUS_MAJOR_VERSION macros are not defined.
What is the step to have those macro defined ?

Thx
Sincerely
Julien

See the following log

cmake -G "MinGW Makefiles" ../dbus/cmake
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: C:/mingw/bin/gcc.exe
-- Check for working C compiler: C:/mingw/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/mingw/bin/g++.exe
-- Check for working CXX compiler: C:/mingw/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found windows supplementary package location: C:/Program Files/win32libs
-- Found LibXml2: C:/Program Files/win32libs/lib/libxml2.dll.a
-- Found libexpat: C:/Program Files/win32libs/lib/libexpat.dll.a
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for io.h
-- Looking for io.h - found
-- Looking for grp.h
-- Looking for grp.h - not found
-- Looking for sys/poll.h
-- Looking for sys/poll.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - not found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for sys/syslimits.h
-- Looking for sys/syslimits.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for backtrace
-- Looking for backtrace - not found.
-- Looking for getgrouplist
-- Looking for getgrouplist - not found.
-- Looking for getpeerucred
-- Looking for getpeerucred - not found.
-- Looking for nanosleep
-- Looking for nanosleep - not found.
-- Looking for getpwnam_r
-- Looking for getpwnam_r - not found.
-- Looking for setenv
-- Looking for setenv - not found.
-- Looking for socketpair
-- Looking for socketpair - not found.
-- Looking for unsetenv
-- Looking for unsetenv - not found.
-- Looking for writev
-- Looking for writev - not found.
-- Looking for setrlimit
-- Looking for setrlimit - not found.
-- Looking for socklen_t
-- Looking for socklen_t - not found.
-- Performing Test HAVE_CMSGCRED
-- Performing Test HAVE_CMSGCRED - Failed
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of __int64
-- Check size of __int64 - done

set -DDBUS_INSTALL_SYSTEM_LIBS=1 to install runtime libraries too
set DBUSDIR (environment or cmake option) to overwrite the default install
directory


                  D-BUS 1.1.1-2
                  ==========

        prefix:
        exec_prefix:
        libdir:
        bindir:                   D:/workspace/build_dbus/bin
        sysconfdir:
        localstatedir:
        datadir:                  D:/workspace/build_dbus/test/data
        source code location:     D:/workspace/dbus/cmake/..
        c compiler:               gcc.exe
        cflags:
        cflags debug:             -g
        cflags release:           -O3 -DNDEBUG
        cxx compiler:             g++.exe
        cxxflags:
        cxxflags debug:           -g
        cxxflags release:         -O3 -DNDEBUG
        64-bit int:               long long
        32-bit int:               int
        16-bit int:               short
        Doxygen:                  DOXYGEN-NOTFOUND
        xmlto:                    XMLTO-NOTFOUND
        gcc coverage profiling:   OFF
        Building unit tests:      ON
        Building verbose mode:    ON
        Building w/o assertions:  OFF
        Building w/o checks:      OFF
        installing system libs:   OFF
        Building Doxygen docs:
        Using XML parser:         Expat
        System bus address:       tcp:host=localhost,port=12434
        Session bus address:      tcp:host=localhost,port=12434

NOTE: building with unit tests increases the size of the installed library
and renders it insecure.
NOTE: building with verbose mode increases library size, may slightly
increase security risk, and decreases per
NOTE: building with assertions increases library size and decreases
performance.

-- Configuring done
CMake Warning (dev) at bus/CMakeLists.txt:124 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "bus-test" links to some libraries for which the linker
must
  search:

    ws2_32, advapi32, netapi32

  and other libraries with known full path:

    C:/Program Files/win32libs/lib/libexpat.dll.a

  CMake is adding directories in the second list to the linker search path
in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003"
for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: D:/workspace/build_dbus

D:\workspace\build_dbus>mingw32-make
Scanning dependencies of target dbus-1
[  0%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-address.obj
[  1%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-auth.obj
[  2%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-auth-script.obj
[  3%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-bus.obj
[  4%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-connection.obj
[  5%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-credentials.obj
[  6%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-errors.obj
[  7%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-keyring.obj
[  8%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-marshal-header.obj
[  9%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-marshal-byteswap.obj
[ 10%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-marshal-recursive.obj
[ 11%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-marshal-validate.obj
[ 12%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-message.obj
[ 13%] Building C object
dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-misc.obj
D:\workspace\dbus\dbus\dbus-misc.c: In function `dbus_get_version':
D:\workspace\dbus\dbus\dbus-misc.c:166: error: `DBUS_MAJOR_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:166: error: (Each undeclared identifier
is reported only once
D:\workspace\dbus\dbus\dbus-misc.c:166: error: for each function it appears
in.)
D:\workspace\dbus\dbus\dbus-misc.c:168: error: `DBUS_MINOR_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:170: error: `DBUS_MICRO_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c: In function `_dbus_misc_test':
D:\workspace\dbus\dbus\dbus-misc.c:200: error: `DBUS_MAJOR_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:201: error: `DBUS_MINOR_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:202: error: `DBUS_MICRO_VERSION'
undeclared (first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:216: error: `DBUS_VERSION' undeclared
(first use in this function)
D:\workspace\dbus\dbus\dbus-misc.c:239: error: `DBUS_VERSION_STRING'
undeclared (first use in this function)
mingw32-make[2]: ***
[dbus/CMakeFiles/dbus-1.dir/D_/workspace/dbus/dbus/dbus-misc.obj] Error 1
mingw32-make[1]: *** [dbus/CMakeFiles/dbus-1.dir/all] Error 2
mingw32-make: *** [all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20091122/c3c820e3/attachment.html 


More information about the dbus mailing list