在 ubuntu 17.10 上使用 make 时出现 PBRT v3 构建错误
PBRT v3 build error using make on ubuntu 17.10
我正在尝试构建在以下存储库中找到的 PBRT v3:
https://github.com/mmp/pbrt-v3/tree/master
我严格按照存储库中的说明构建系统,但出现无法破译的错误。
我遵循的说明是:
1) 要检查 pbrt 以及所有依赖项,请确保在克隆存储库时使用 --recursive 标志,即
$ git 克隆 --递归 https://github.com/mmp/pbrt-v3/
2) 对于基于 Linux 和 OS X 的命令行构建,安装 cmake 后,为构建创建一个新目录,切换到该目录,然后 运行 cmake [pbrt-v3 的路径]。将在该当前目录中创建一个 Makefile。 运行 make -j8,用于构建 pbrt、obj2pbrt 和 imgtool 实用程序,以及 运行s pbrt 单元测试的可执行文件。
执行 make -j8 后,我在 90% 处收到以下错误:
[ 88%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRle.cpp.o
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfZip.cpp.o
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o
[ 90%] Linking CXX static library libIlmImf.a
[ 90%] Built target IlmImf
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
这是命令的完整详细信息:
[ 88%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfFastHuf.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRle.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfRle.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfRle.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfSystemSpecific.cpp
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfZip.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfZip.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfZip.cpp
[ 90%] Linking CXX static library libIlmImf.a
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/cmake -P CMakeFiles/IlmImf.dir/cmake_clean_target.cmake
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/cmake -E cmake_link_script CMakeFiles/IlmImf.dir/link.txt --verbose=1
/usr/bin/ar qc libIlmImf.a CMakeFiles/IlmImf.dir/ImfAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfBoxAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfCRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfChannelList.cpp.o CMakeFiles/IlmImf.dir/ImfChannelListAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFloatAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFrameBuffer.cpp.o CMakeFiles/IlmImf.dir/ImfHeader.cpp.o CMakeFiles/IlmImf.dir/ImfIO.cpp.o CMakeFiles/IlmImf.dir/ImfInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfIntAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfLineOrderAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfMatrixAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfOpaqueAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfStringAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfVecAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfHuf.cpp.o CMakeFiles/IlmImf.dir/ImfThreading.cpp.o CMakeFiles/IlmImf.dir/ImfWav.cpp.o CMakeFiles/IlmImf.dir/ImfLut.cpp.o CMakeFiles/IlmImf.dir/ImfCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfRleCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfZipCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfPizCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfB44Compressor.cpp.o CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfMisc.cpp.o CMakeFiles/IlmImf.dir/ImfCompressionAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfDoubleAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfConvert.cpp.o CMakeFiles/IlmImf.dir/ImfPreviewImage.cpp.o CMakeFiles/IlmImf.dir/ImfPreviewImageAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfVersion.cpp.o CMakeFiles/IlmImf.dir/ImfChromaticities.cpp.o CMakeFiles/IlmImf.dir/ImfChromaticitiesAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfKeyCode.cpp.o CMakeFiles/IlmImf.dir/ImfKeyCodeAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfTimeCode.cpp.o CMakeFiles/IlmImf.dir/ImfTimeCodeAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfRational.cpp.o CMakeFiles/IlmImf.dir/ImfRationalAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFramesPerSecond.cpp.o CMakeFiles/IlmImf.dir/ImfStandardAttributes.cpp.o CMakeFiles/IlmImf.dir/ImfStdIO.cpp.o CMakeFiles/IlmImf.dir/ImfEnvmap.cpp.o CMakeFiles/IlmImf.dir/ImfEnvmapAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfScanLineInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledMisc.cpp.o CMakeFiles/IlmImf.dir/ImfTiledOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfTileDescriptionAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfTileOffsets.cpp.o CMakeFiles/IlmImf.dir/ImfRgbaYca.cpp.o CMakeFiles/IlmImf.dir/ImfPxr24Compressor.cpp.o CMakeFiles/IlmImf.dir/ImfTestFile.cpp.o CMakeFiles/IlmImf.dir/ImfStringVectorAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfMultiView.cpp.o CMakeFiles/IlmImf.dir/ImfAcesFile.cpp.o CMakeFiles/IlmImf.dir/ImfMultiPartOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfGenericOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfOutputPartData.cpp.o CMakeFiles/IlmImf.dir/ImfMultiPartInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfGenericInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfPartType.cpp.o CMakeFiles/IlmImf.dir/ImfInputPartData.cpp.o CMakeFiles/IlmImf.dir/ImfOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfTiledOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfTiledInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepFrameBuffer.cpp.o CMakeFiles/IlmImf.dir/ImfDeepCompositing.cpp.o CMakeFiles/IlmImf.dir/ImfCompositeDeepScanLine.cpp.o CMakeFiles/IlmImf.dir/ImfDeepImageStateAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfRle.cpp.o CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o CMakeFiles/IlmImf.dir/ImfZip.cpp.o
/usr/bin/ranlib libIlmImf.a
make[2]: Leaving directory '/home/ernesto/PBRT/build'
[ 90%] Built target IlmImf
make[1]: Leaving directory '/home/ernesto/PBRT/build'
Makefile:162: recipe for target 'all' failed
我尝试重新运行命令并得到以下输出:
make -j8
[ 1%] Built target Iex
[ 4%] Built target Ptex_static
[ 5%] Built target eLut
[ 6%] Built target toFloat
[ 11%] Built target zlibstatic
[ 14%] Built target glog
[ 15%] Built target cyhair2pbrt
[ 16%] Built target obj2pbrt
[ 16%] Built target ptxinfo
[ 17%] Built target IexMath
[ 52%] Built target demangle_unittest
[ 51%] Built target pbrt
[ 52%] Linking CXX shared library libPtex.so
[ 52%] Built target Half
[ 54%] Built target Imath
[ 57%] Built target IlmThread
[ 58%] Built target stl_logging_unittest
[ 58%] Built target utilities_unittest
[ 58%] Built target symbolize_unittest
[ 58%] Built target logging_unittest
[ 59%] Built target stacktrace_unittest
[ 59%] Built target signalhandler_unittest
[ 59%] Built target CopyIlmBaseLibs
[ 59%] Built target dwaLookups
[ 60%] Built target b44ExpLogTable
/usr/bin/ld: ../../../zlib/libz.a(deflate.o): relocation R_X86_64_PC32 against symbol `_length_code' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/build.make:329: recipe for target 'src/ext/ptex/src/ptex/libPtex.so' failed
make[2]: *** [src/ext/ptex/src/ptex/libPtex.so] Error 1
CMakeFiles/Makefile2:2316: recipe for target 'src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/all' failed
make[1]: *** [src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 87%] Built target IlmImf
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
我添加了 Cmake 的详细信息以显示显示的信息
cmake ../pbrt-v3/
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for pthread.h
-- Looking for 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 include file alloca.h
-- Looking for include file alloca.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Performing Test HAVE_HEX_FP_CONSTANTS
-- Performing Test HAVE_HEX_FP_CONSTANTS - Success
-- Performing Test HAVE_BINARY_CONSTANTS
-- Performing Test HAVE_BINARY_CONSTANTS - Success
-- Performing Test HAVE_CONSTEXPR
-- Performing Test HAVE_CONSTEXPR - Success
-- Performing Test HAVE_ALIGNAS
-- Performing Test HAVE_ALIGNAS - Success
-- Performing Test HAVE_ALIGNOF
-- Performing Test HAVE_ALIGNOF - Success
-- Performing Test HAVE_ITIMER
-- Performing Test HAVE_ITIMER - Success
-- Performing Test HAVE_NONPOD_IN_UNIONS
-- Performing Test HAVE_NONPOD_IN_UNIONS - Success
-- Performing Test HAVE_DECLSPEC_NOINLINE
-- Performing Test HAVE_DECLSPEC_NOINLINE - Failed
-- Performing Test HAVE_ATTRIBUTE_NOINLINE
-- Performing Test HAVE_ATTRIBUTE_NOINLINE - Success
-- Performing Test HAVE__ALIGNED_MALLOC
-- Performing Test HAVE__ALIGNED_MALLOC - Failed
-- Performing Test HAVE_POSIX_MEMALIGN
-- Performing Test HAVE_POSIX_MEMALIGN - Success
-- Performing Test HAVE_MEMALIGN
-- Performing Test HAVE_MEMALIGN - Success
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Success
-- Performing Test HAVE_DECLSPEC_THREAD
-- Performing Test HAVE_DECLSPEC_THREAD - Failed
-- Performing Test HAVE___THREAD
-- Performing Test HAVE___THREAD - Success
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Found ZLIB: /home/ernesto/PBRT/build/src/ext/zlib/$<CONFIGURATION>/zlibstatic.lib (found version "1.2.8")
-- Performing Test HAVE_GCC_INLINE_ASM_AVX
-- Performing Test HAVE_GCC_INLINE_ASM_AVX - Success
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN - Success
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for glob.h
-- Looking for glob.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for libunwind.h
-- Looking for libunwind.h - not found
-- Looking for pwd.h
-- Looking for pwd.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/utsname.h
-- Looking for sys/utsname.h - found
-- Looking for syscall.h
-- Looking for syscall.h - found
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Looking for ucontext.h
-- Looking for ucontext.h - found
-- Looking for unwind.h
-- Looking for unwind.h - found
-- Looking for C++ include ext/hash_map
-- Looking for C++ include ext/hash_map - found
-- Looking for C++ include ext/hash_set
-- Looking for C++ include ext/hash_set - found
-- Looking for C++ include ext/slist
-- Looking for C++ include ext/slist - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Looking for C++ include tr1/unordered_set
-- Looking for C++ include tr1/unordered_set - found
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Looking for C++ include unordered_set
-- Looking for C++ include unordered_set - found
-- Check size of unsigned __int16
-- Check size of unsigned __int16 - failed
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Looking for dladdr
-- Looking for dladdr - not found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for pread
-- Looking for pread - found
-- Looking for pwrite
-- Looking for pwrite - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Performing Test HAVE_NO_DEPRECATED
-- Performing Test HAVE_NO_DEPRECATED - Success
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for get_static_proc_name in unwind
-- Looking for get_static_proc_name in unwind - not found
-- Performing Test HAVE___ATTRIBUTE__
-- Performing Test HAVE___ATTRIBUTE__ - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN - Success
-- Performing Test HAVE___BUILTIN_EXPECT
-- Performing Test HAVE___BUILTIN_EXPECT - Success
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP - Success
-- Performing Test HAVE_RWLOCK
-- Performing Test HAVE_RWLOCK - Failed
-- Performing Test HAVE___DECLSPEC
-- Performing Test HAVE___DECLSPEC - Failed
-- Performing Test STL_NO_NAMESPACE
-- Performing Test STL_NO_NAMESPACE - Failed
-- Performing Test STL_STD_NAMESPACE
-- Performing Test STL_STD_NAMESPACE - Success
-- Performing Test HAVE_USING_OPERATOR
-- Performing Test HAVE_USING_OPERATOR - Success
-- Performing Test HAVE_NAMESPACES
-- Performing Test HAVE_NAMESPACES - Success
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ernesto/PBRT/build
我也运行 cmake 带有-fPIC 标志,但是执行make -j8 时结果是一样的
谁能告诉我如何解决这个问题?
此致。
我能够通过安装以下软件包并重新启动来解决这个问题:
氧气
zlib1g-dev
使用来自 ubuntu 的 apt 包管理器。
感谢您的帮助。
我正在尝试构建在以下存储库中找到的 PBRT v3:
https://github.com/mmp/pbrt-v3/tree/master
我严格按照存储库中的说明构建系统,但出现无法破译的错误。
我遵循的说明是:
1) 要检查 pbrt 以及所有依赖项,请确保在克隆存储库时使用 --recursive 标志,即
$ git 克隆 --递归 https://github.com/mmp/pbrt-v3/
2) 对于基于 Linux 和 OS X 的命令行构建,安装 cmake 后,为构建创建一个新目录,切换到该目录,然后 运行 cmake [pbrt-v3 的路径]。将在该当前目录中创建一个 Makefile。 运行 make -j8,用于构建 pbrt、obj2pbrt 和 imgtool 实用程序,以及 运行s pbrt 单元测试的可执行文件。
执行 make -j8 后,我在 90% 处收到以下错误:
[ 88%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRle.cpp.o
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfZip.cpp.o
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o
[ 90%] Linking CXX static library libIlmImf.a
[ 90%] Built target IlmImf
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
这是命令的完整详细信息:
[ 88%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfFastHuf.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRle.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfRle.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfRle.cpp
[ 89%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfSystemSpecific.cpp
[ 90%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfZip.cpp.o
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/c++ -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR=\"/home/ernesto/PBRT/pbrt-v3/IlmImfTest/\" -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf -I/home/ernesto/PBRT/pbrt-v3/src/ext/zlib -I/home/ernesto/PBRT/build/src/ext/zlib -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Iex -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Imath -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/IlmThread -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/IlmBase/Half -I/home/ernesto/PBRT/build/src/ext/openexr/IlmBase/config -I/home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/config -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfUtil -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmaketiled -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrenvmap -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmakepreview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/exrmultiview -I/home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImfFuzzTest -std=gnu++11 -Wno-conversion-null -Wno-unused-result -O3 -DNDEBUG -D PBRT_HAVE_ALLOCA_H -D PBRT_HAVE_MEMORY_H -D PBRT_HAVE_HEX_FP_CONSTANTS -D PBRT_HAVE_BINARY_CONSTANTS -D PBRT_HAVE_CONSTEXPR -D PBRT_CONSTEXPR=constexpr -D PBRT_HAVE_ALIGNAS -D PBRT_HAVE_ALIGNOF -D PBRT_HAVE_ITIMER -D PBRT_HAVE_NONPOD_IN_UNIONS -D PBRT_NOINLINE=__attribute__\(\(noinline\)\) -D PBRT_HAVE_POSIX_MEMALIGN -D PBRT_THREAD_LOCAL=thread_local -o CMakeFiles/IlmImf.dir/ImfZip.cpp.o -c /home/ernesto/PBRT/pbrt-v3/src/ext/openexr/OpenEXR/IlmImf/ImfZip.cpp
[ 90%] Linking CXX static library libIlmImf.a
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/cmake -P CMakeFiles/IlmImf.dir/cmake_clean_target.cmake
cd /home/ernesto/PBRT/build/src/ext/openexr/OpenEXR/IlmImf && /usr/bin/cmake -E cmake_link_script CMakeFiles/IlmImf.dir/link.txt --verbose=1
/usr/bin/ar qc libIlmImf.a CMakeFiles/IlmImf.dir/ImfAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfBoxAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfCRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfChannelList.cpp.o CMakeFiles/IlmImf.dir/ImfChannelListAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFloatAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFrameBuffer.cpp.o CMakeFiles/IlmImf.dir/ImfHeader.cpp.o CMakeFiles/IlmImf.dir/ImfIO.cpp.o CMakeFiles/IlmImf.dir/ImfInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfIntAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfLineOrderAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfMatrixAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfOpaqueAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfStringAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfVecAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfHuf.cpp.o CMakeFiles/IlmImf.dir/ImfThreading.cpp.o CMakeFiles/IlmImf.dir/ImfWav.cpp.o CMakeFiles/IlmImf.dir/ImfLut.cpp.o CMakeFiles/IlmImf.dir/ImfCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfRleCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfZipCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfPizCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfB44Compressor.cpp.o CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o CMakeFiles/IlmImf.dir/ImfMisc.cpp.o CMakeFiles/IlmImf.dir/ImfCompressionAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfDoubleAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfConvert.cpp.o CMakeFiles/IlmImf.dir/ImfPreviewImage.cpp.o CMakeFiles/IlmImf.dir/ImfPreviewImageAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfVersion.cpp.o CMakeFiles/IlmImf.dir/ImfChromaticities.cpp.o CMakeFiles/IlmImf.dir/ImfChromaticitiesAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfKeyCode.cpp.o CMakeFiles/IlmImf.dir/ImfKeyCodeAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfTimeCode.cpp.o CMakeFiles/IlmImf.dir/ImfTimeCodeAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfRational.cpp.o CMakeFiles/IlmImf.dir/ImfRationalAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFramesPerSecond.cpp.o CMakeFiles/IlmImf.dir/ImfStandardAttributes.cpp.o CMakeFiles/IlmImf.dir/ImfStdIO.cpp.o CMakeFiles/IlmImf.dir/ImfEnvmap.cpp.o CMakeFiles/IlmImf.dir/ImfEnvmapAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfScanLineInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledMisc.cpp.o CMakeFiles/IlmImf.dir/ImfTiledOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfTiledRgbaFile.cpp.o CMakeFiles/IlmImf.dir/ImfTileDescriptionAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfTileOffsets.cpp.o CMakeFiles/IlmImf.dir/ImfRgbaYca.cpp.o CMakeFiles/IlmImf.dir/ImfPxr24Compressor.cpp.o CMakeFiles/IlmImf.dir/ImfTestFile.cpp.o CMakeFiles/IlmImf.dir/ImfStringVectorAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfMultiView.cpp.o CMakeFiles/IlmImf.dir/ImfAcesFile.cpp.o CMakeFiles/IlmImf.dir/ImfMultiPartOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfGenericOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfOutputPartData.cpp.o CMakeFiles/IlmImf.dir/ImfMultiPartInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfGenericInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfPartType.cpp.o CMakeFiles/IlmImf.dir/ImfInputPartData.cpp.o CMakeFiles/IlmImf.dir/ImfOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfTiledOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfTiledInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepScanLineOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledInputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledOutputPart.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledInputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepTiledOutputFile.cpp.o CMakeFiles/IlmImf.dir/ImfDeepFrameBuffer.cpp.o CMakeFiles/IlmImf.dir/ImfDeepCompositing.cpp.o CMakeFiles/IlmImf.dir/ImfCompositeDeepScanLine.cpp.o CMakeFiles/IlmImf.dir/ImfDeepImageStateAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfFastHuf.cpp.o CMakeFiles/IlmImf.dir/ImfFloatVectorAttribute.cpp.o CMakeFiles/IlmImf.dir/ImfRle.cpp.o CMakeFiles/IlmImf.dir/ImfSystemSpecific.cpp.o CMakeFiles/IlmImf.dir/ImfZip.cpp.o
/usr/bin/ranlib libIlmImf.a
make[2]: Leaving directory '/home/ernesto/PBRT/build'
[ 90%] Built target IlmImf
make[1]: Leaving directory '/home/ernesto/PBRT/build'
Makefile:162: recipe for target 'all' failed
我尝试重新运行命令并得到以下输出:
make -j8
[ 1%] Built target Iex
[ 4%] Built target Ptex_static
[ 5%] Built target eLut
[ 6%] Built target toFloat
[ 11%] Built target zlibstatic
[ 14%] Built target glog
[ 15%] Built target cyhair2pbrt
[ 16%] Built target obj2pbrt
[ 16%] Built target ptxinfo
[ 17%] Built target IexMath
[ 52%] Built target demangle_unittest
[ 51%] Built target pbrt
[ 52%] Linking CXX shared library libPtex.so
[ 52%] Built target Half
[ 54%] Built target Imath
[ 57%] Built target IlmThread
[ 58%] Built target stl_logging_unittest
[ 58%] Built target utilities_unittest
[ 58%] Built target symbolize_unittest
[ 58%] Built target logging_unittest
[ 59%] Built target stacktrace_unittest
[ 59%] Built target signalhandler_unittest
[ 59%] Built target CopyIlmBaseLibs
[ 59%] Built target dwaLookups
[ 60%] Built target b44ExpLogTable
/usr/bin/ld: ../../../zlib/libz.a(deflate.o): relocation R_X86_64_PC32 against symbol `_length_code' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/build.make:329: recipe for target 'src/ext/ptex/src/ptex/libPtex.so' failed
make[2]: *** [src/ext/ptex/src/ptex/libPtex.so] Error 1
CMakeFiles/Makefile2:2316: recipe for target 'src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/all' failed
make[1]: *** [src/ext/ptex/src/ptex/CMakeFiles/Ptex_dynamic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 87%] Built target IlmImf
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
我添加了 Cmake 的详细信息以显示显示的信息
cmake ../pbrt-v3/
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for pthread.h
-- Looking for 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 include file alloca.h
-- Looking for include file alloca.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Performing Test HAVE_HEX_FP_CONSTANTS
-- Performing Test HAVE_HEX_FP_CONSTANTS - Success
-- Performing Test HAVE_BINARY_CONSTANTS
-- Performing Test HAVE_BINARY_CONSTANTS - Success
-- Performing Test HAVE_CONSTEXPR
-- Performing Test HAVE_CONSTEXPR - Success
-- Performing Test HAVE_ALIGNAS
-- Performing Test HAVE_ALIGNAS - Success
-- Performing Test HAVE_ALIGNOF
-- Performing Test HAVE_ALIGNOF - Success
-- Performing Test HAVE_ITIMER
-- Performing Test HAVE_ITIMER - Success
-- Performing Test HAVE_NONPOD_IN_UNIONS
-- Performing Test HAVE_NONPOD_IN_UNIONS - Success
-- Performing Test HAVE_DECLSPEC_NOINLINE
-- Performing Test HAVE_DECLSPEC_NOINLINE - Failed
-- Performing Test HAVE_ATTRIBUTE_NOINLINE
-- Performing Test HAVE_ATTRIBUTE_NOINLINE - Success
-- Performing Test HAVE__ALIGNED_MALLOC
-- Performing Test HAVE__ALIGNED_MALLOC - Failed
-- Performing Test HAVE_POSIX_MEMALIGN
-- Performing Test HAVE_POSIX_MEMALIGN - Success
-- Performing Test HAVE_MEMALIGN
-- Performing Test HAVE_MEMALIGN - Success
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Success
-- Performing Test HAVE_DECLSPEC_THREAD
-- Performing Test HAVE_DECLSPEC_THREAD - Failed
-- Performing Test HAVE___THREAD
-- Performing Test HAVE___THREAD - Success
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Found ZLIB: /home/ernesto/PBRT/build/src/ext/zlib/$<CONFIGURATION>/zlibstatic.lib (found version "1.2.8")
-- Performing Test HAVE_GCC_INLINE_ASM_AVX
-- Performing Test HAVE_GCC_INLINE_ASM_AVX - Success
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN - Success
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for glob.h
-- Looking for glob.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for libunwind.h
-- Looking for libunwind.h - not found
-- Looking for pwd.h
-- Looking for pwd.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/utsname.h
-- Looking for sys/utsname.h - found
-- Looking for syscall.h
-- Looking for syscall.h - found
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Looking for ucontext.h
-- Looking for ucontext.h - found
-- Looking for unwind.h
-- Looking for unwind.h - found
-- Looking for C++ include ext/hash_map
-- Looking for C++ include ext/hash_map - found
-- Looking for C++ include ext/hash_set
-- Looking for C++ include ext/hash_set - found
-- Looking for C++ include ext/slist
-- Looking for C++ include ext/slist - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Looking for C++ include tr1/unordered_set
-- Looking for C++ include tr1/unordered_set - found
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Looking for C++ include unordered_set
-- Looking for C++ include unordered_set - found
-- Check size of unsigned __int16
-- Check size of unsigned __int16 - failed
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Looking for dladdr
-- Looking for dladdr - not found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for pread
-- Looking for pread - found
-- Looking for pwrite
-- Looking for pwrite - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Performing Test HAVE_NO_DEPRECATED
-- Performing Test HAVE_NO_DEPRECATED - Success
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for get_static_proc_name in unwind
-- Looking for get_static_proc_name in unwind - not found
-- Performing Test HAVE___ATTRIBUTE__
-- Performing Test HAVE___ATTRIBUTE__ - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN - Success
-- Performing Test HAVE___BUILTIN_EXPECT
-- Performing Test HAVE___BUILTIN_EXPECT - Success
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP - Success
-- Performing Test HAVE_RWLOCK
-- Performing Test HAVE_RWLOCK - Failed
-- Performing Test HAVE___DECLSPEC
-- Performing Test HAVE___DECLSPEC - Failed
-- Performing Test STL_NO_NAMESPACE
-- Performing Test STL_NO_NAMESPACE - Failed
-- Performing Test STL_STD_NAMESPACE
-- Performing Test STL_STD_NAMESPACE - Success
-- Performing Test HAVE_USING_OPERATOR
-- Performing Test HAVE_USING_OPERATOR - Success
-- Performing Test HAVE_NAMESPACES
-- Performing Test HAVE_NAMESPACES - Success
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ernesto/PBRT/build
我也运行 cmake 带有-fPIC 标志,但是执行make -j8 时结果是一样的
谁能告诉我如何解决这个问题?
此致。
我能够通过安装以下软件包并重新启动来解决这个问题:
氧气
zlib1g-dev
使用来自 ubuntu 的 apt 包管理器。
感谢您的帮助。