exiv2 cmake的时候报错

Nita ·
更新时间:2024-09-20
· 857 次阅读

exiv2 cmake …报如下错误:

yk@yk-Vostro-3669:~/exiv2/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -- ICONV_INCLUDE_DIR : -- ICONV_LIBRARIES : /usr/lib/x86_64-linux-gnu/libc.so CMake Error at cmake/compilerFlags.cmake:32 (if): if given arguments: "COMPILER_IS_GCC" "OR" "(" "COMPILER_IS_CLANG" "AND" "CMAKE_CXX_COMPILER_VERSION" "VERSION_GREATER_EQUAL" "3.7" ")" Unknown arguments specified Call Stack (most recent call first): CMakeLists.txt:63 (include) -- Configuring incomplete, errors occurred! See also "/home/yk/exiv2/build/CMakeFiles/CMakeOutput.log". See also "/home/yk/exiv2/build/CMakeFiles/CMakeError.log".

解决方法:
大佬教我,让下载一个早期的0.26的版本安装,说新版本坑多。。
然后下载0.26版本。

mkdir build cd build cmake .. cmake --build .

一切正常。
接下来输入:

make tests

报如下错误:

yk@yk-Vostro-3669:~/exiv2-0.26/build$ make tests Scanning dependencies of target tests Running addmoddel.sh ... touch: cannot touch '/home/yk/exiv2-0.26/test/tmp/addmoddel': No such file or directory touch: cannot touch 'tmp/ttt': No such file or directory ./addmoddel.sh: line 11: /home/yk/exiv2-0.26/test/tmp/addmoddel.out: No such file or directory ./functions.source: line 82: /home/yk/exiv2-0.26/test/tmp/addmoddel.out-new: No such file or directory cat: /home/yk/exiv2-0.26/test/tmp/addmoddel.out: No such file or directory mv: cannot stat '/home/yk/exiv2-0.26/test/tmp/addmoddel.out-new': No such file or directory diff: /home/yk/exiv2-0.26/test/tmp/addmoddel.out: No such file or directory diff: /home/yk/exiv2-0.26/test/tmp/addmoddel.out: No such file or directory result = 2 Running bugfixes-test.sh ... touch: cannot touch '/home/yk/exiv2-0.26/test/tmp/bugfixes-test': No such file or directory touch: cannot touch 'tmp/ttt': No such file or directory ./bugfixes-test.sh: line 632: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out: No such file or directory ./bugfixes-test.sh: line 638: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out-stripped: No such file or directory cat: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out: No such file or directory mv: cannot stat '/home/yk/exiv2-0.26/test/tmp/bugfixes-test.out-stripped': No such file or directory ./functions.source: line 82: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out-new: No such file or directory cat: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out: No such file or directory mv: cannot stat '/home/yk/exiv2-0.26/test/tmp/bugfixes-test.out-new': No such file or directory diff: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out: No such file or directory diff: /home/yk/exiv2-0.26/test/tmp/bugfixes-test.out: No such file or directory result = 2 .......省略

然后,没有管这个错误,把make tests变成了 make 输入进去,执行:

make yk@yk-Vostro-3669:~/exiv2-0.26/build$ make [ 11%] Built target xmp [ 51%] Built target exiv2lib [ 52%] Built target conntest [ 54%] Built target exiv2 [ 56%] Built target remotetest [ 57%] Built target geotag [ 60%] Built target exiv2json [ 62%] Built target pathtest [ 64%] Built target metacopy [ 66%] Built target xmpsample [ 67%] Built target xmpparser-test [ 69%] Built target xmpparse [ 71%] Built target write2-test [ 73%] Built target exifvalue [ 74%] Built target ini-test [ 75%] Built target werror-test [ 76%] Built target exifdata-test [ 77%] Built target addmoddel [ 78%] Built target iptcprint [ 79%] Built target exifprint [ 81%] Built target convert-test [ 82%] Built target exifcomment [ 83%] Built target iptceasy [ 85%] Built target iptctest [ 86%] Built target easyaccess-test [ 87%] Built target key-test [ 89%] Built target iotest [ 91%] Built target largeiptc-test [ 93%] Built target tiff-test [ 94%] Built target mmap-test [ 95%] Built target prevtest [ 97%] Built target exifdata [ 98%] Built target stringto-test [ 99%] Built target taglist [100%] Built target write-test

然后,执行:

sudo make install yk@yk-Vostro-3669:~/exiv2-0.26/build$ sudo make install [sudo] yk 的密码: [ 11%] Built target xmp [ 51%] Built target exiv2lib [ 52%] Built target conntest [ 54%] Built target exiv2 [ 56%] Built target remotetest [ 57%] Built target geotag [ 60%] Built target exiv2json [ 62%] Built target pathtest [ 64%] Built target metacopy [ 66%] Built target xmpsample [ 67%] Built target xmpparser-test [ 69%] Built target xmpparse [ 71%] Built target write2-test [ 73%] Built target exifvalue [ 74%] Built target ini-test [ 75%] Built target werror-test [ 76%] Built target exifdata-test [ 77%] Built target addmoddel [ 78%] Built target iptcprint [ 79%] Built target exifprint [ 81%] Built target convert-test [ 82%] Built target exifcomment [ 83%] Built target iptceasy [ 85%] Built target iptctest [ 86%] Built target easyaccess-test [ 87%] Built target key-test [ 89%] Built target iotest [ 91%] Built target largeiptc-test [ 93%] Built target tiff-test [ 94%] Built target mmap-test [ 95%] Built target prevtest [ 97%] Built target exifdata [ 98%] Built target stringto-test [ 99%] Built target taglist [100%] Built target write-test Install the project... -- Install configuration: "" -- Installing: /usr/local/include/exiv2/exv_conf.h -- Installing: /usr/local/include/exiv2/svn_version.h -- Installing: /usr/local/lib/pkgconfig/exiv2.pc -- Installing: /usr/local/lib/pkgconfig/exiv2.lsm -- Installing: /usr/local/lib/libxmp.a -- Installing: /usr/local/lib/libexiv2.so.26.0.0 -- Installing: /usr/local/lib/libexiv2.so.26 -- Installing: /usr/local/lib/libexiv2.so -- Installing: /usr/local/bin/exiv2 -- Set runtime path of "/usr/local/bin/exiv2" to "" -- Installing: /usr/local/include/exiv2/asfvideo.hpp -- Installing: /usr/local/include/exiv2/basicio.hpp -- Installing: /usr/local/include/exiv2/bmpimage.hpp -- Installing: /usr/local/include/exiv2/config.h -- Installing: /usr/local/include/exiv2/convert.hpp -- Installing: /usr/local/include/exiv2/cr2image.hpp -- Installing: /usr/local/include/exiv2/crwimage.hpp -- Installing: /usr/local/include/exiv2/datasets.hpp -- Installing: /usr/local/include/exiv2/easyaccess.hpp -- Installing: /usr/local/include/exiv2/epsimage.hpp -- Installing: /usr/local/include/exiv2/error.hpp -- Installing: /usr/local/include/exiv2/exif.hpp -- Installing: /usr/local/include/exiv2/exiv2.hpp -- Installing: /usr/local/include/exiv2/futils.hpp -- Installing: /usr/local/include/exiv2/gifimage.hpp -- Installing: /usr/local/include/exiv2/http.hpp -- Installing: /usr/local/include/exiv2/image.hpp -- Installing: /usr/local/include/exiv2/ini.hpp -- Installing: /usr/local/include/exiv2/iptc.hpp -- Installing: /usr/local/include/exiv2/jp2image.hpp -- Installing: /usr/local/include/exiv2/jpgimage.hpp -- Installing: /usr/local/include/exiv2/matroskavideo.hpp -- Installing: /usr/local/include/exiv2/metadatum.hpp -- Installing: /usr/local/include/exiv2/mrwimage.hpp -- Installing: /usr/local/include/exiv2/orfimage.hpp -- Installing: /usr/local/include/exiv2/pgfimage.hpp -- Installing: /usr/local/include/exiv2/preview.hpp -- Installing: /usr/local/include/exiv2/properties.hpp -- Installing: /usr/local/include/exiv2/psdimage.hpp -- Installing: /usr/local/include/exiv2/quicktimevideo.hpp -- Installing: /usr/local/include/exiv2/rafimage.hpp -- Installing: /usr/local/include/exiv2/riffvideo.hpp -- Installing: /usr/local/include/exiv2/rwlock.hpp -- Installing: /usr/local/include/exiv2/rw2image.hpp -- Installing: /usr/local/include/exiv2/tags.hpp -- Installing: /usr/local/include/exiv2/tgaimage.hpp -- Installing: /usr/local/include/exiv2/tiffimage.hpp -- Installing: /usr/local/include/exiv2/types.hpp -- Installing: /usr/local/include/exiv2/utilsvideo.hpp -- Installing: /usr/local/include/exiv2/value.hpp -- Installing: /usr/local/include/exiv2/version.hpp -- Installing: /usr/local/include/exiv2/webpimage.hpp -- Installing: /usr/local/include/exiv2/xmp.hpp -- Installing: /usr/local/include/exiv2/xmpsidecar.hpp -- Up-to-date: /usr/local/include/exiv2/utilsvideo.hpp -- Installing: /usr/local/include/exiv2/pngimage.hpp -- Installing: /usr/local/share/man/man1/exiv2.1 -- Installing: /usr/local/bin/addmoddel -- Set runtime path of "/usr/local/bin/addmoddel" to "" -- Installing: /usr/local/bin/convert-test -- Set runtime path of "/usr/local/bin/convert-test" to "" -- Installing: /usr/local/bin/easyaccess-test -- Set runtime path of "/usr/local/bin/easyaccess-test" to "" -- Installing: /usr/local/bin/exifcomment -- Set runtime path of "/usr/local/bin/exifcomment" to "" -- Installing: /usr/local/bin/exifdata-test -- Set runtime path of "/usr/local/bin/exifdata-test" to "" -- Installing: /usr/local/bin/exifdata -- Set runtime path of "/usr/local/bin/exifdata" to "" -- Installing: /usr/local/bin/exifprint -- Set runtime path of "/usr/local/bin/exifprint" to "" -- Installing: /usr/local/bin/exifvalue -- Set runtime path of "/usr/local/bin/exifvalue" to "" -- Installing: /usr/local/bin/ini-test -- Set runtime path of "/usr/local/bin/ini-test" to "" -- Installing: /usr/local/bin/iotest -- Set runtime path of "/usr/local/bin/iotest" to "" -- Installing: /usr/local/bin/iptceasy -- Set runtime path of "/usr/local/bin/iptceasy" to "" -- Installing: /usr/local/bin/iptcprint -- Set runtime path of "/usr/local/bin/iptcprint" to "" -- Installing: /usr/local/bin/iptctest -- Set runtime path of "/usr/local/bin/iptctest" to "" -- Installing: /usr/local/bin/key-test -- Set runtime path of "/usr/local/bin/key-test" to "" -- Installing: /usr/local/bin/largeiptc-test -- Set runtime path of "/usr/local/bin/largeiptc-test" to "" -- Installing: /usr/local/bin/mmap-test -- Set runtime path of "/usr/local/bin/mmap-test" to "" -- Installing: /usr/local/bin/prevtest -- Set runtime path of "/usr/local/bin/prevtest" to "" -- Installing: /usr/local/bin/stringto-test -- Set runtime path of "/usr/local/bin/stringto-test" to "" -- Installing: /usr/local/bin/taglist -- Set runtime path of "/usr/local/bin/taglist" to "" -- Installing: /usr/local/bin/tiff-test -- Set runtime path of "/usr/local/bin/tiff-test" to "" -- Installing: /usr/local/bin/werror-test -- Set runtime path of "/usr/local/bin/werror-test" to "" -- Installing: /usr/local/bin/write-test -- Set runtime path of "/usr/local/bin/write-test" to "" -- Installing: /usr/local/bin/write2-test -- Set runtime path of "/usr/local/bin/write2-test" to "" -- Installing: /usr/local/bin/xmpparse -- Set runtime path of "/usr/local/bin/xmpparse" to "" -- Installing: /usr/local/bin/xmpparser-test -- Set runtime path of "/usr/local/bin/xmpparser-test" to "" -- Installing: /usr/local/bin/xmpsample -- Set runtime path of "/usr/local/bin/xmpsample" to "" -- Installing: /usr/local/bin/metacopy -- Set runtime path of "/usr/local/bin/metacopy" to "" -- Installing: /usr/local/bin/path-test -- Set runtime path of "/usr/local/bin/path-test" to "" -- Installing: /usr/local/bin/exiv2json -- Set runtime path of "/usr/local/bin/exiv2json" to "" -- Installing: /usr/local/bin/geotag -- Set runtime path of "/usr/local/bin/geotag" to "" -- Installing: /usr/local/share/man/man1/exiv2samples.1

。。。完毕(还没测试,是否能用)。


作者:ykwjt



cmake

需要 登录 后方可回复, 如果你还没有账号请 注册新账号