boberfly / GafferCycles

Cycles for Gaffer
BSD 3-Clause "New" or "Revised" License
84 stars 10 forks source link

cant compile with cmake3 on centos 7 #15

Closed willDTF closed 5 years ago

willDTF commented 5 years ago

the compile process won't go to the end and return this : `-- The CXX compiler identification is unknown CMake Error at cycles/CMakeLists.txt:42 (project): The CMAKE_CXX_COMPILER:

g++-6

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "/home/master/GafferCycles/build/CMakeFiles/CMakeOutput.log". See also "/home/master/GafferCycles/build/CMakeFiles/CMakeError.log".`

the cmakeerror log return for each line : Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: g++-6 Build flags: Id flags:

the cmake output return `The system is: Linux - 3.10.0-957.5.1.el7.x86_64 - x86_64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: /usr/bin/cc Build flags: Id flags:

The output was: 0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/master/GafferCycles/build/CMakeFiles/3.13.4/CompilerIdC/a.out"

Determining if the C compiler works passed with the following output: Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_0184d/fast" /usr/bin/gmake -f CMakeFiles/cmTC_0184d.dir/build.make CMakeFiles/cmTC_0184d.dir/build gmake[1]: Entering directory /home/master/GafferCycles/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_0184d.dir/testCCompiler.c.o /usr/bin/cc -fPIE -o CMakeFiles/cmTC_0184d.dir/testCCompiler.c.o -c /home/master/GafferCycles/build/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_0184d /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_0184d.dir/link.txt --verbose=1 /usr/bin/cc -rdynamic CMakeFiles/cmTC_0184d.dir/testCCompiler.c.o -o cmTC_0184d gmake[1]: Leaving directory/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'

Detecting C compiler ABI info compiled with the following output: Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_9846c/fast" /usr/bin/gmake -f CMakeFiles/cmTC_9846c.dir/build.make CMakeFiles/cmTC_9846c.dir/build gmake[1]: Entering directory /home/master/GafferCycles/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o /usr/bin/cc -fPIE -o CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake3/Modules/CMakeCCompilerABI.c Linking C executable cmTC_9846c /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_9846c.dir/link.txt --verbose=1 /usr/bin/cc -v -rdynamic CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -o cmTC_9846c Using built-in specs. COLLECT_GCC=/usr/bin/cc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_9846c' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_9846c /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o gmake[1]: Leaving directory/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'

Parsed C implicit link information from above output: link line regex: [^( |.[/])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/]+-)?ld|collect2)[^/]*( |$)] ignore line: [Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp] ignore line: [] ignore line: [Run Build Command:"/usr/bin/gmake" "cmTC_9846c/fast"] ignore line: [/usr/bin/gmake -f CMakeFiles/cmTC_9846c.dir/build.make CMakeFiles/cmTC_9846c.dir/build] ignore line: [gmake[1]: Entering directory `/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'] ignore line: [Building C object CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o] ignore line: [/usr/bin/cc -fPIE -o CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake3/Modules/CMakeCCompilerABI.c] ignore line: [Linking C executable cmTC_9846c] ignore line: [/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_9846c.dir/link.txt --verbose=1] ignore line: [/usr/bin/cc -v -rdynamic CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -o cmTC_9846c ] ignore line: [Using built-in specs.] ignore line: [COLLECT_GCC=/usr/bin/cc] ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper] ignore line: [Target: x86_64-redhat-linux] ignore line: [Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux] ignore line: [Thread model: posix] ignore line: [gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ] ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/] ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../:/lib/:/usr/lib/] ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_9846c' '-mtune=generic' '-march=x86-64'] link line: [ /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_9846c /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o] arg [/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2] ==> ignore arg [--build-id] ==> ignore arg [--no-add-needed] ==> ignore arg [--eh-frame-hdr] ==> ignore arg [--hash-style=gnu] ==> ignore arg [-m] ==> ignore arg [elf_x86_64] ==> ignore arg [-export-dynamic] ==> ignore arg [-dynamic-linker] ==> ignore arg [/lib64/ld-linux-x86-64.so.2] ==> ignore arg [-o] ==> ignore arg [cmTC_9846c] ==> ignore arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o] ==> ignore arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o] ==> ignore arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o] ==> ignore arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5] arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] arg [-L/lib/../lib64] ==> dir [/lib/../lib64] arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64] arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..] arg [CMakeFiles/cmTC_9846c.dir/CMakeCCompilerABI.c.o] ==> ignore arg [-lgcc] ==> lib [gcc] arg [--as-needed] ==> ignore arg [-lgcc_s] ==> lib [gcc_s] arg [--no-as-needed] ==> ignore arg [-lc] ==> lib [c] arg [-lgcc] ==> lib [gcc] arg [--as-needed] ==> ignore arg [-lgcc_s] ==> lib [gcc_s] arg [--no-as-needed] ==> ignore arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o] ==> ignore arg [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o] ==> ignore collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.8.5] collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64] ==> [/usr/lib64] collapse library dir [/lib/../lib64] ==> [/lib64] collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64] collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..] ==> [/usr/lib] implicit libs: [gcc;gcc_s;c;gcc;gcc_s] implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib] implicit fwks: []

Detecting C [-std=c11] compiler features compiled with the following output: Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_c3f61/fast" /usr/bin/gmake -f CMakeFiles/cmTC_c3f61.dir/build.make CMakeFiles/cmTC_c3f61.dir/build gmake[1]: Entering directory /home/master/GafferCycles/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_c3f61.dir/feature_tests.c.o /usr/bin/cc -fPIE -std=c11 -o CMakeFiles/cmTC_c3f61.dir/feature_tests.c.o -c /home/master/GafferCycles/build/CMakeFiles/feature_tests.c Linking C executable cmTC_c3f61 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_c3f61.dir/link.txt --verbose=1 /usr/bin/cc -rdynamic CMakeFiles/cmTC_c3f61.dir/feature_tests.c.o -o cmTC_c3f61 gmake[1]: Leaving directory/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'

Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros

Detecting C [-std=c99] compiler features compiled with the following output: Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_5a720/fast" /usr/bin/gmake -f CMakeFiles/cmTC_5a720.dir/build.make CMakeFiles/cmTC_5a720.dir/build gmake[1]: Entering directory /home/master/GafferCycles/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_5a720.dir/feature_tests.c.o /usr/bin/cc -fPIE -std=c99 -o CMakeFiles/cmTC_5a720.dir/feature_tests.c.o -c /home/master/GafferCycles/build/CMakeFiles/feature_tests.c Linking C executable cmTC_5a720 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_5a720.dir/link.txt --verbose=1 /usr/bin/cc -rdynamic CMakeFiles/cmTC_5a720.dir/feature_tests.c.o -o cmTC_5a720 gmake[1]: Leaving directory/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'

Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:1c_variadic_macros

Detecting C [-std=c90] compiler features compiled with the following output: Change Dir: /home/master/GafferCycles/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_1e344/fast" /usr/bin/gmake -f CMakeFiles/cmTC_1e344.dir/build.make CMakeFiles/cmTC_1e344.dir/build gmake[1]: Entering directory /home/master/GafferCycles/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_1e344.dir/feature_tests.c.o /usr/bin/cc -fPIE -std=c90 -o CMakeFiles/cmTC_1e344.dir/feature_tests.c.o -c /home/master/GafferCycles/build/CMakeFiles/feature_tests.c Linking C executable cmTC_1e344 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_1e344.dir/link.txt --verbose=1 /usr/bin/cc -rdynamic CMakeFiles/cmTC_1e344.dir/feature_tests.c.o -o cmTC_1e344 gmake[1]: Leaving directory/home/master/GafferCycles/build/CMakeFiles/CMakeTmp'

Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:0c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:0c_variadic_macros`
boberfly commented 5 years ago

Hey!

You will need to install GCC 6 on CentOS to make it compliant with VFX Platform 2018. If you take a peek at Gaffer's official docker builder it should give some hints to how your environment should look like here: https://github.com/GafferHQ/build/blob/master/Dockerfile

At home I use Kubuntu 18.04 which has named it gcc-6/g++-6 (the distro comes with v7 as default but that is too new) but it might be different on CentOS. Cheers!

boberfly commented 5 years ago

Hi @Kaiz3rTool

https://github.com/boberfly/GafferCycles/releases/download/gafferCycles-0.1.0-gaffer-0.53.0.0/gafferCycles-0.1.0-gaffer-0.53.0.0-linux.tar.gz I have a test build here which you can path to GAFFER_EXTENSION_PATHS before launching Gaffer. This should work on 0.53.1.1 which is the latest released one right now.

Cheers

willDTF commented 5 years ago

hi, thank you for your answer, I will take a look ASAP and thanks for invest your time on Gaffer-Cycles bridge, great idea !

willDTF commented 5 years ago

Hi, just tried the compiled one, it result some errors on loading : `

ERROR : startup/gui/menus.py : Error loading Cycles module - "/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/gafferCycles/python/GafferCycles/_GafferCycles.so)".
 Traceback (most recent call last):
  File "/opt/gafferCycles/startup/gui/menus.py", line 61, in <module>
    import GafferCycles
  File "/opt/gafferCycles/python/GafferCycles/__init__.py", line 39, in <module>
    from _GafferCycles import *
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/gafferCycles/python/GafferCycles/_GafferCycles.so)

ERROR : IECore.loadConfig : Error executing file "/opt/gafferCycles/startup/gui/viewer.py" - "unindent does not match any outer indentation level (viewer.py, line 73)".
 Traceback (most recent call last):
  File "/opt/gaffer-0.53.1.1-linux/python/IECore/ConfigLoader.py", line 75, in loadConfig
    execfile( fullFileName, fileContextDict, fileContextDict )
  File "/opt/gafferCycles/startup/gui/viewer.py", line 73
    GafferSceneUI.SceneView.registerShadingMode(
                                               ^
IndentationError: unindent does not match any outer indentation level`
boberfly commented 5 years ago

@Kaiz3rTool you're in luck, I was just battling out this very issue as I was compiling on Ubuntu with GCC 6.5 but VFX Platform/CentOS 7 has GCC 6.3. If you try this build:

https://github.com/boberfly/GafferCycles/releases/tag/0.4.1

Can you verify that this gets around the above issue? It is my first build using CentOS 7 in a docker container which mirrors how Gaffer usually gets built from GafferHQ.

Cheers

willDTF commented 5 years ago

I have tried it fastly, so far so good no errors on loading, shader assignment works, both interactiverender and render works as espected thanks a lot for your help

I have created a post on gaffer-dev group about your work

maybe someone from there can help you

Best