c++ - Same android cmake git project compiles well on one Ubuntu machine but does not compile on another Ubuntu machine even the entire project is the same -


i'm developing android cmake project compiles succesfully on 32-bit ubuntu 12.04 machine @ work (i call workmachine). when want compile @ home, installed 32-bit ubuntu 12.04 virtual machine (i call homemachine), git cloned project on it, , when start compilation, block error.

cmake_cflags are:  cmake_cxxflags are:  -- configuring done -- generating done -- build files have been written to: /home/raa/dropbox/demo/android_build [  0%] built target bitstream [  0%] built target distrat [  1%] built target fisher [  1%] built target gtest [  7%] built target jpeg-8c [  7%] built target map [  8%] built target resampler [  9%] built target timer [ 92%] built target fftw3f-3 [ 96%] built target vlfeat [ 96%] built target extract_shared [ 97%] built target shared [ 97%] built target cssc_train linking cxx executable ../../bin/extract /home/raa/dropbox/demo/libraries/fftw-3.3.3/api/configure.c:28: error: undefined reference 'fftwf_dft_conf_standard' collect2: error: ld returned 1 exit status make[2]: *** [../bin/extract] error 1 make[1]: *** [src/cmakefiles/extract.dir/all] error 2 make: *** [all] error 2 

here reporting gcc version (the same on both computers)

gcc -v using built-in specs. collect_gcc=gcc collect_lto_wrapper=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper target: i686-linux-gnu configured with: ../src/configure -v --with-pkgversion='ubuntu/linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/readme.bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu thread model: posix gcc version 4.6.3 (ubuntu/linaro 4.6.3-1ubuntu5)  

but how possible? seems problem not due cmake cache or similar chaches, because if git clone project on directory on workmachine, code compiles too. can check in order resolve problem? if need additional details, please ask me.

thank time.

riccardo

the solution riccardos problem change commandline parameter of ar r q (see man page difference, q not check duplicats)

do via

set(cmake_c_archive_append "<cmake_ar> q  <target> <link_flags> <objects>") 

you want check if cmake_ar "ar" (might different on other systems)


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -