|
From: Huang J. (S. TPE3-2) <Hua...@cs...> - 2013-07-26 00:47:47
|
Hello Allen, I tried, and got the error msg bellow, /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 Here is the msg from cmake, -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc.exe -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++.exe -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found Perl: /usr/bin/perl.exe (found version "5.14.2") -- Looking for include file assert.h -- Looking for include file assert.h - found -- Looking for include file byteswap.h -- Looking for include file byteswap.h - not found. -- Looking for include file ctype.h -- Looking for include file ctype.h - found -- Looking for include file dlfcn.h -- Looking for include file dlfcn.h - not found. -- Looking for include file endian.h -- Looking for include file endian.h - not found. -- Looking for include file inttypes.h -- Looking for include file inttypes.h - found -- Looking for include file memory.h -- Looking for include file memory.h - found -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for include file stdint.h -- Looking for include file stdint.h - found -- Looking for include file stdlib.h -- Looking for include file stdlib.h - found -- Looking for include file strings.h -- Looking for include file strings.h - found -- Looking for include file string.h -- Looking for include file string.h - found -- Looking for include file sys/endian.h -- Looking for include file sys/endian.h - not found. -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for include file sys/types.h -- Looking for include file sys/types.h - found -- Looking for include file time.h -- Looking for include file time.h - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for include file wctype.h -- Looking for include file wctype.h - found -- Looking for backtrace -- Looking for backtrace - not found -- Looking for gmtime_r -- Looking for gmtime_r - not found -- Looking for isspace -- Looking for isspace - found -- Looking for iswspace -- Looking for iswspace - found -- Looking for setenv -- Looking for setenv - not found -- Looking for snprintf -- Looking for snprintf - found -- Looking for strdup -- Looking for strdup - found -- Looking for unsetenv -- Looking for unsetenv - not found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of mode_t -- Check size of mode_t - done -- Check size of size_t -- Check size of size_t - done -- Check size of intptr_t -- Check size of intptr_t - done -- Check size of pid_t -- Check size of pid_t - done -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found. -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for pthread_attr_get_np in pthread -- Looking for pthread_attr_get_np in pthread - not found -- Looking for pthread_getattr_np in pthread -- Looking for pthread_getattr_np in pthread - not found -- Looking for include files pthread.h, pthread_np.h -- Looking for include files pthread.h, pthread_np.h - not found. -- Configuring done -- Generating done -- Build files have been written to: /home/huangjianzhong/libical-1.0/build -----邮件原件----- 发件人: Allen Winter [mailto:wi...@kd...] 发送时间: 2013年7月25日 23:12 收件人: fre...@li...; Huang Jianzhong (SVW TPE3-2) 主题: Re: [libical] libical 1.0 compile error under Cygwin using i686-pc-mingw32 toolchain Hello, We no longer support configure, sorry about that. So the build instructions are: export CC=i686-pc-mingw32-gcc export CXX= i686-pc-mingw32-g++ mkdir build cd build cmake .. make make install if that fails, please send the compile errors On Thursday, July 25, 2013 06:14:46 AM Huang Jianzhong wrote: > 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 > |