Here is the error msg for “make”, can anyone tell me what I have done wrong?

 

huangjianzhong@tpdl545 ~/libical-1.0/build

$ make

[  3%] Built target ical-header

[  4%] Building C object src/libical/CMakeFiles/ical.dir/icaltz-util.o

/home/huangjianzhong/libical-1.0/src/libical/icaltz-util.c: In function ‘decode’:

/home/huangjianzhong/libical-1.0/src/libical/icaltz-util.c:151:10: error: ‘BYTE_ORDER’ undeclared (first use in this function)

/home/huangjianzhong/libical-1.0/src/libical/icaltz-util.c:151:10: note: each undeclared identifier is reported only once for each function it appears in

/home/huangjianzhong/libical-1.0/src/libical/icaltz-util.c:151:24: error: ‘BIG_ENDIAN’ undeclared (first use in this function)

/home/huangjianzhong/libical-1.0/src/libical/icaltz-util.c:153:28: error: ‘LITTLE_ENDIAN’ undeclared (first use in this function)

src/libical/CMakeFiles/ical.dir/build.make:485: recipe for target `src/libical/CMakeFiles/ical.dir/icaltz-util.o' failed

make[2]: *** [src/libical/CMakeFiles/ical.dir/icaltz-util.o] Error 1

CMakeFiles/Makefile2:165: recipe for target `src/libical/CMakeFiles/ical.dir/all' failed

make[1]: *** [src/libical/CMakeFiles/ical.dir/all] Error 2

Makefile:126: recipe for target `all' failed

make: *** [all] Error 2

 

Following is my build steps:

 

1)       export CC=i686-pc-mingw32-gcc

2)       export CXX= i686-pc-mingw32-g++

3)       ./configure --host=i686-pc-mingw32

4)       Call “cmake ..” and modified the CMakeCache.txt setting env for compiler etc., below is the content. then regenerate

########################

# EXTERNAL cache entries

########################

 

//Path to a program.

CMAKE_AR:FILEPATH=/usr/bin/i686-pc-mingw32-ar.exe

 

//For backwards compatibility, what version of CMake commands and

// syntax should this version of CMake try to support.

CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4

 

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or

// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.

CMAKE_BUILD_TYPE:STRING=

 

//Enable/Disable color output during build.

CMAKE_COLOR_MAKEFILE:BOOL=ON

 

//CXX compiler.

CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/i686-pc-mingw32-g++.exe

 

//Flags used by the compiler during all build types.

CMAKE_CXX_FLAGS:STRING=-I/usr/include -I/usr/include/w32api

//I have tried adding –I flag and remove them totally both does not work

 

//Flags used by the compiler during debug builds.

CMAKE_CXX_FLAGS_DEBUG:STRING=-g

 

//Flags used by the compiler during release minsize builds.

CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

 

//Flags used by the compiler during release builds (/MD /Ob1 /Oi

// /Ot /Oy /Gs will produce slightly less optimized but smaller

// files).

CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

 

//Flags used by the compiler during Release with Debug Info builds.

CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g

 

//C compiler.

CMAKE_C_COMPILER:FILEPATH=/usr/bin/i686-pc-mingw32-gcc.exe

 

//Flags used by the compiler during all build types.

CMAKE_C_FLAGS:STRING=

 

//Flags used by the compiler during debug builds.

CMAKE_C_FLAGS_DEBUG:STRING=-g

 

//Flags used by the compiler during release minsize builds.

CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

 

//Flags used by the compiler during release builds (/MD /Ob1 /Oi

// /Ot /Oy /Gs will produce slightly less optimized but smaller

// files).

CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

 

//Flags used by the compiler during Release with Debug Info builds.

CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g

 

//Flags used by the linker.

CMAKE_EXE_LINKER_FLAGS:STRING='-Wl,--enable-auto-import '

 

//Flags used by the linker during debug builds.

CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

 

//Flags used by the linker during release minsize builds.

CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

 

//Flags used by the linker during release builds.

CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

 

//Flags used by the linker during Release with Debug Info builds.

CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

 

//Enable/Disable output of compile commands during generation.

CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

 

//Install path prefix, prepended onto install directories.

CMAKE_INSTALL_PREFIX:PATH=/usr/local

 

//Path to a program.

CMAKE_LINKER:FILEPATH=/usr/bin/i686-pc-mingw32-ld.exe

 

//Path to a program.

CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make.exe

 

//Flags used by the linker during the creation of modules.

CMAKE_MODULE_LINKER_FLAGS:STRING=' '

 

//Flags used by the linker during debug builds.

CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

 

//Flags used by the linker during release minsize builds.

CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

 

//Flags used by the linker during release builds.

CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

 

//Flags used by the linker during Release with Debug Info builds.

CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

 

//Path to a program.

CMAKE_NM:FILEPATH=/usr/bin/i686-pc-mingw32-nm.exe

 

//Path to a program.

CMAKE_OBJCOPY:FILEPATH=/usr/bin/i686-pc-mingw32-objcopy.exe

 

//Path to a program.

CMAKE_OBJDUMP:FILEPATH=/usr/bin/i686-pc-mingw32-objdump.exe

 

//Value Computed by CMake

CMAKE_PROJECT_NAME:STATIC=libical

 

//Path to a program.

CMAKE_RANLIB:FILEPATH=/usr/bin/i686-pc-mingw32-ranlib.exe

 

//RC compiler.

CMAKE_RC_COMPILER:FILEPATH=/usr/bin/i686-pc-mingw32-windres.exe

 

//Flags for Fortran compiler.

CMAKE_RC_FLAGS:STRING=' '

 

//Flags used by the linker during the creation of dll's.

CMAKE_SHARED_LINKER_FLAGS:STRING=' '

 

//Flags used by the linker during debug builds.

CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

 

//Flags used by the linker during release minsize builds.

CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

 

//Flags used by the linker during release builds.

CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

 

//Flags used by the linker during Release with Debug Info builds.

CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

 

//If set, runtime paths are not added when installing shared libraries,

// but are added when building.

CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

 

//If set, runtime paths are not added when using shared libraries.

CMAKE_SKIP_RPATH:BOOL=NO

 

//Path to a program.

CMAKE_STRIP:FILEPATH=/usr/bin/i686-pc-mingw32-strip.exe

 

//If true, cmake will use relative paths in makefiles and projects.

CMAKE_USE_RELATIVE_PATHS:BOOL=OFF

 

//If this value is on, makefiles will be generated without the

// .SILENT directive, and all commands will be echoed to the console

// during the make.  This is useful for debugging only. With Visual

// Studio IDE projects all commands are done without /nologo.

CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

 

//Single output directory for building all executables.

EXECUTABLE_OUTPUT_PATH:PATH=

 

//Include directory name

INCLUDE_INSTALL_DIR:STRING=/usr/local/include

 

//Single output directory for building all libraries.

LIBRARY_OUTPUT_PATH:PATH=

 

//Library directory name

LIB_INSTALL_DIR:STRING=/usr/local/lib

 

//Define suffix of directory name (32/64)

LIB_SUFFIX:STRING=

 

//Path to a program.

PERL_EXECUTABLE:FILEPATH=/usr/bin/perl.exe

 

//Share directory name

SHARE_INSTALL_DIR:STRING=/usr/local/share

 

//Dependencies for target

ical-static_LIB_DEPENDS:STATIC=

 

//Dependencies for the target

ical_LIB_DEPENDS:STATIC=general;-lpthread;

 

//Dependencies for target

icalss-static_LIB_DEPENDS:STATIC=

 

//Dependencies for the target

icalss_LIB_DEPENDS:STATIC=general;ical;

 

//Dependencies for target

icalvcal-static_LIB_DEPENDS:STATIC=

 

//Dependencies for the target

icalvcal_LIB_DEPENDS:STATIC=general;ical;

 

//Value Computed by CMake

libical_BINARY_DIR:STATIC=/home/huangjianzhong/libical-1.0/build

 

//Value Computed by CMake

libical_SOURCE_DIR:STATIC=/home/huangjianzhong/libical-1.0