[CMake] autoconfTocmake transfer glitch

luxInteg lux-integ at btconnect.com
Sat Nov 27 21:22:56 EST 2010


Greetings,

I am learning cmake.  I am attempting to compile a small progrmm  libxls 
(available from  http://libxls.sourceforge.net/ )   as part of my education.

It compiles with autoconf/make like so:-

## ------------ from sh configure
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for size_t... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... no
checking for iconv in -liconv... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/libxls/Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands

## ------------ from sh configure/make
Making all in src
make[2]: Entering directory `/home/ruler/Albradric/TESTS2/libxls-0.2.0/src'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..  
-I../include -I../include   -g -O2 -MT xlstool.lo -MD -MP -MF 
".deps/xlstool.Tpo" -c -o xlstool.lo xlstool.c; \
        then mv -f ".deps/xlstool.Tpo" ".deps/xlstool.Plo"; else rm -f 
".deps/xlstool.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -g -O2 -MT 
xlstool.lo -MD -MP -MF .deps/xlstool.Tpo -c xlstool.c -o xlstool.o
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..  
-I../include -I../include   -g -O2 -MT ole.lo -MD -MP -MF ".deps/ole.Tpo" -c -
o ole.lo ole.c; \
        then mv -f ".deps/ole.Tpo" ".deps/ole.Plo"; else rm -f 
".deps/ole.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -g -O2 -MT ole.lo 
-MD -MP -MF .deps/ole.Tpo -c ole.c -o ole.o
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..  
-I../include -I../include   -g -O2 -MT xls.lo -MD -MP -MF ".deps/xls.Tpo" -c -
o xls.lo xls.c; \
        then mv -f ".deps/xls.Tpo" ".deps/xls.Plo"; else rm -f 
".deps/xls.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -g -O2 -MT xls.lo 
-MD -MP -MF .deps/xls.Tpo -c xls.c -o xls.o
xls.c: In function 'xls_addRow':
xls.c:360: warning: overflow in implicit constant conversion
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o libxlsreader.la -
rpath /usr/local/libxls/lib -version-info 2:0:2 -liconv  xlstool.lo ole.lo 
xls.lo  
mkdir .libs
ar cru .libs/libxlsreader.a  xlstool.o ole.o xls.o
ranlib .libs/libxlsreader.a
-------------------------


And with cmake/make like so:-

## ------------ from cmake
mkdir: created directory `build'
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for setjmp.h
-- Looking for setjmp.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Performing Test ICONV_HAVE_WERROR
-- Performing Test ICONV_HAVE_WERROR - Success
-- Performing Test ICONV_SECOND_ARGUMENT_IS_CONST
-- Performing Test ICONV_SECOND_ARGUMENT_IS_CONST - Failed
-- Found Iconv: /usr/lib64/libiconv.so
-- Configuring done
-- Generating done
-- Build files have been written to: $SOURCES/libxls-0.2.0/build

## ------------ from cmake/make
$SOURCES/libxls-0.2.0/src/xls.c: In function 'xls_addRow':
$SOURCES/libxls-0.2.0/src/xls.c:360: warning: overflow in implicit constant 
conversion
$SOURCES/libxls-0.2.0/src/xls.c: In function 'xls_getVersion':
$SOURCES/libxls-0.2.0/src/xls.c:944: error: 'PACKAGE_VERSION' undeclared 
(first use in this function)
$SOURCES/libxls-0.2.0/src/xls.c:944: error: (Each undeclared identifier is 
reported only once
$SOURCES/libxls-0.2.0/src/xls.c:944: error: for each function it appears in.)
make[2]: *** [Lib/CMakeFiles/xlsreader-static.dir/__/src/xls.c.o] Error 1

--------------------------
(I am using cmake-2.8 and I checked the cmake-modules to see if there was one   
that    exports   'PACKAGE_VERSION'  but from my uneducated eye I could not 
see any.

help would be appreciated
sincerely
luxInteg


More information about the CMake mailing list