这对Ubuntu来说是个新手,这让我很困惑。
当前正在尝试使用make构建OpenImageIO,请遵循以下步骤:https://sites.google.com/site/openimageio/checking-out-and-building-openimageio
据我所知,我已经安装了所有依赖项,但是尝试运行make会导致以下错误:

platform=linux64, hw=x86_64
OPENIMAGEIO_SITE = shanesimmsart-pc
dist_dir = dist/linux64
INSTALLDIR = /home/shanesimmsart/oiio
( cd build/linux64 ; make  )
make[1]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
[  0%] Building CXX object src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o
/home/shanesimmsart/oiio/src/libutil/strutil.cpp: In function ‘OpenImageIO::v1_6::string_view OpenImageIO::v1_6::Strutil::parse_nested(OpenImageIO::v1_6::string_view&, bool)’:
/home/shanesimmsart/oiio/src/libutil/strutil.cpp:768:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for ( ; nesting && len < p.size(); ++len) {
                            ^
cc1plus: all warnings being treated as errors
make[3]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o] Error 1
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/all] Error 2
make[2]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make: *** [cmake] Error 2

有人知道我可能做错什么了吗?

最佳答案

默认情况下,您使用的包已启用-Werror标志,这将强制编译器将所有警告视为错误。对于将代码发送给用户来说,这总是一个坏主意,因为用户将拥有各种各样的编译器和编译器版本,因此用户将得到与开发人员不同的警告。当开发人员构建代码时,他们绝对应该使用-Werror。当开发人员将代码发送给用户时,默认情况下绝对不应该启用-Werror
无论如何,看看Git中的代码,如果您这样做:

make STOP_ON_WARNING=no

它将禁用-Werror

关于linux - 在Kubuntu 14.10上构建OpenImageIO:出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28659800/

10-11 23:07