install_deps.sh fails when compiling OSL #39938

Closed
opened 2014-04-28 18:23:16 +02:00 by S J Bennett · 17 comments
Member

System Information
Tested on Xubuntu and Ubuntu 14.04

Blender Version
Broken: currently
Worked: prior to April 24 2014

Short description of error
From a clean install (i.e. no Blender source, no /opt/lib/ or ~/src folders), follow the standard build instructions for Ubuntu up to and including the point where you run install_deps.sh

Troubleshooting so far:

Problem appears to be from changes introduced to OSL's src/cmake/modules/FindIlmBase.cmake file on April 24 2014, diff is here: 17ce27739b (diff-10b22e8cc61b4493866c72933aeafa5c)

Regressing the changes to FindIlmBase.cmake manually and re-running install_deps.sh with "git reset --hard" commented out of the compile_OSL() function got OSL building again successfully.

Can confirm that install_deps.sh followed the "else" path through these two lines of FindIlmBase.cmake - these are commented out in the current non-working version:

string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})

Not sure how to proceed from here myself but it appears you can feed CMake a var with the correct library names - ILMBASE_CUSTOM_LIBRARIES -- I'm not sure of the exact syntax to do this from install_deps.sh otherwise I'd keep hacking. Over to you!

**System Information** Tested on Xubuntu and Ubuntu 14.04 **Blender Version** Broken: currently Worked: prior to April 24 2014 **Short description of error** From a clean install (i.e. no Blender source, no /opt/lib/ or ~/src folders), follow the standard build instructions for Ubuntu up to and including the point where you run install_deps.sh Troubleshooting so far: Problem appears to be from changes introduced to OSL's src/cmake/modules/FindIlmBase.cmake file on April 24 2014, diff is here: https://github.com/imageworks/OpenShadingLanguage/commit/17ce27739b252bc21fe5583010c489b82db5f0a5#diff-10b22e8cc61b4493866c72933aeafa5c Regressing the changes to FindIlmBase.cmake manually and re-running install_deps.sh with "git reset --hard" commented out of the compile_OSL() function got OSL building again successfully. Can confirm that install_deps.sh followed the "else" path through these two lines of FindIlmBase.cmake - these are commented out in the current non-working version: ``` string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION}) set (IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver}) ``` Not sure how to proceed from here myself but it appears you can feed CMake a var with the correct library names - ILMBASE_CUSTOM_LIBRARIES -- I'm not sure of the exact syntax to do this from install_deps.sh otherwise I'd keep hacking. Over to you!
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @quollism

Added subscriber: @quollism
Author
Member

Thought I jagged a fix for this but I didn't. Could be helpful to know this all the same:

Tried changing this part of install_deps.sh compile_OSL() function:

  if [ $_with_built_openexr == true ]; then
    cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
    cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
  fi

To this:

  if [ $_with_built_openexr == true ]; then
    cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
    cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
    cmake_d="$cmake_d -D ILMBASE_CUSTOM=True"
    cmake_d="$cmake_d -D ILMBASE_CUSTOM_LIBRARIES=Half Iex-2_1 Imath-2_1 IlmThread-2_1"
  fi

This mostly gets OSL compiling again, but it errors near the end:

...
[ 97%] Building CXX object src/testshade/CMakeFiles/testshade.dir/testshademain.cpp.o
Linking CXX executable testshade
/usr/bin/ld: CMakeFiles/testshade.dir/simplerend.cpp.o: undefined reference to symbol '_ZN7Iex_2_17BaseExcD2Ev'
/opt/lib/openexr/lib/libIex-2_1.so.11: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make- [x]: *** [src/testshade/testshade] Error 1
make- [x]: *** [src/testshade/CMakeFiles/testshade.dir/all] Error 2
make- [x]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object src/testrender/CMakeFiles/testrender.dir/simplerend.cpp.o
[100%] Building CXX object src/testrender/CMakeFiles/testrender.dir/testrender.cpp.o
Linking CXX executable testrender
/usr/bin/ld: CMakeFiles/testrender.dir/simplerend.cpp.o: undefined reference to symbol '_ZN7Iex_2_17BaseExcD2Ev'
/opt/lib/openexr/lib/libIex-2_1.so.11: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make- [x]: *** [src/testrender/testrender] Error 1
make- [x]: *** [src/testrender/CMakeFiles/testrender.dir/all] Error 2
make: *** [all] Error 2
ERROR! OpenShadingLanguage-1.4.0 failed to compile, exiting

So whatever the fix for this is, it's not that. OSL builds just fine with the older version of FindIlmBase.cmake though. Go figure.

Thought I jagged a fix for this but I didn't. Could be helpful to know this all the same: Tried changing this part of install_deps.sh compile_OSL() function: ``` if [ $_with_built_openexr == true ]; then cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr" cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" fi ``` To this: ``` if [ $_with_built_openexr == true ]; then cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr" cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" cmake_d="$cmake_d -D ILMBASE_CUSTOM=True" cmake_d="$cmake_d -D ILMBASE_CUSTOM_LIBRARIES=Half Iex-2_1 Imath-2_1 IlmThread-2_1" fi ``` This mostly gets OSL compiling again, but it errors near the end: ... [ 97%] Building CXX object src/testshade/CMakeFiles/testshade.dir/testshademain.cpp.o Linking CXX executable testshade /usr/bin/ld: CMakeFiles/testshade.dir/simplerend.cpp.o: undefined reference to symbol '_ZN7Iex_2_17BaseExcD2Ev' /opt/lib/openexr/lib/libIex-2_1.so.11: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make- [x]: *** [src/testshade/testshade] Error 1 make- [x]: *** [src/testshade/CMakeFiles/testshade.dir/all] Error 2 make- [x]: *** Waiting for unfinished jobs.... [ 98%] Building CXX object src/testrender/CMakeFiles/testrender.dir/simplerend.cpp.o [100%] Building CXX object src/testrender/CMakeFiles/testrender.dir/testrender.cpp.o Linking CXX executable testrender /usr/bin/ld: CMakeFiles/testrender.dir/simplerend.cpp.o: undefined reference to symbol '_ZN7Iex_2_17BaseExcD2Ev' /opt/lib/openexr/lib/libIex-2_1.so.11: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make- [x]: *** [src/testrender/testrender] Error 1 make- [x]: *** [src/testrender/CMakeFiles/testrender.dir/all] Error 2 make: *** [all] Error 2 ERROR! OpenShadingLanguage-1.4.0 failed to compile, exiting So whatever the fix for this is, it's not that. OSL builds just fine with the older version of FindIlmBase.cmake though. Go figure.

Added subscriber: @mont29

Added subscriber: @mont29

I’d like to get the log of the error in install_deps from the unchanged (trunk) version…

Also, did install_deps build openexr, or did it installed it from ubuntu's packages?

I’d like to get the log of the error in install_deps from the unchanged (trunk) version… Also, did install_deps build openexr, or did it installed it from ubuntu's packages?
Bastien Montagne self-assigned this 2014-04-28 19:14:27 +02:00
Author
Member

install_deps builds both IlmBase and OpenEXR itself just fine.

Error log as follows:

Building OpenShadingLanguage-1.4.0
Ensuring /opt/lib exists and is writable by us
From https://github.com/imageworks/OpenShadingLanguage
  • branch master -> FETCH_HEAD
Already up-to-date.
M	src/cmake/modules/FindIlmBase.cmake
Your branch is up-to-date with 'origin/master'.
HEAD is now at 356903f Remove remnants of hash() from the OSL spec and type checking.
- The C compiler identification is GNU 4.8.2
- The CXX compiler identification is GNU 4.8.2
- 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
- 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
- Project source dir = /home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0
- Project build dir = /home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build
- Using gcc 4.8 as the compiler
- CMAKE_CXX_COMPILER is /usr/bin/c++
- CMAKE_CXX_COMPILER_ID is GNU
- platform = linux64
- OPENIMAGEIOHOME = /opt/lib/oiio
- Looking for include file pthread.h
- Looking for include file 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  
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find IlmBase (missing: ILMBASE_IEX_LIBRARIES
  ILMBASE_IMATH_LIBRARIES ILMBASE_ILMTHREAD_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/cmake/externalpackages.cmake:37 (find_package)
  CMakeLists.txt:193 (include)


- Configuring incomplete, errors occurred!
See also "/home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `clean'.  Stop.
ERROR! OpenShadingLanguage-1.4.0 failed to compile, exiting

install_deps builds both IlmBase and OpenEXR itself just fine. Error log as follows: ``` Building OpenShadingLanguage-1.4.0 Ensuring /opt/lib exists and is writable by us From https://github.com/imageworks/OpenShadingLanguage ``` * branch master -> FETCH_HEAD ``` Already up-to-date. M src/cmake/modules/FindIlmBase.cmake Your branch is up-to-date with 'origin/master'. HEAD is now at 356903f Remove remnants of hash() from the OSL spec and type checking. ``` - The C compiler identification is GNU 4.8.2 - The CXX compiler identification is GNU 4.8.2 - 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 - 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 - Project source dir = /home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0 - Project build dir = /home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build - Using gcc 4.8 as the compiler - CMAKE_CXX_COMPILER is /usr/bin/c++ - CMAKE_CXX_COMPILER_ID is GNU - platform = linux64 - OPENIMAGEIOHOME = /opt/lib/oiio - Looking for include file pthread.h - Looking for include file 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 ``` CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find IlmBase (missing: ILMBASE_IEX_LIBRARIES ILMBASE_IMATH_LIBRARIES ILMBASE_ILMTHREAD_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) src/cmake/externalpackages.cmake:37 (find_package) CMakeLists.txt:193 (include) ``` - Configuring incomplete, errors occurred! ``` See also "/home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build/CMakeFiles/CMakeOutput.log". See also "/home/kewey/src/blender-deps/OpenShadingLanguage-1.4.0/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `clean'. Stop. ERROR! OpenShadingLanguage-1.4.0 failed to compile, exiting ```

Grmll… stupid CMake could at least spit out libs he does not find, instead of stupid var names!

Anyway, thanks for the log, will try and see whether I can reproduce that somehow :/

Grmll… stupid CMake could at least spit out libs he does not find, instead of stupid var names! Anyway, thanks for the log, will try and see whether I can reproduce that somehow :/
Member

Added subscriber: @plasmasolutions

Added subscriber: @plasmasolutions

Added subscriber: @nudelZ

Added subscriber: @nudelZ

This issue was referenced by blender/blender-addons-contrib@9fb4c487ed

This issue was referenced by blender/blender-addons-contrib@9fb4c487ed09da6f10248896952f147fafb51970

This issue was referenced by 9fb4c487ed

This issue was referenced by 9fb4c487ed09da6f10248896952f147fafb51970

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 9fb4c487ed.

Closed by commit 9fb4c487ed.

Added subscriber: @sunnystormy

Added subscriber: @sunnystormy

Tried compiling version 2.75a on Fedora 22 today and got this:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find IlmBase (missing: ILMBASE_IEX-2_2_LIBRARIES
  ILMBASE_IMATH-2_2_LIBRARIES ILMBASE_ILMTHREAD-2_2_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/cmake/externalpackages.cmake:37 (find_package)
  CMakeLists.txt:200 (include)

After testing with a "sudo dnf install ilmbase" I found that I already have this package installed:


Package ilmbase-2.2.0-1.fc22.x86_64 is already installed, skipping.

Any thoughts?

Tried compiling version 2.75a on Fedora 22 today and got this: ``` CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find IlmBase (missing: ILMBASE_IEX-2_2_LIBRARIES ILMBASE_IMATH-2_2_LIBRARIES ILMBASE_ILMTHREAD-2_2_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE) src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) src/cmake/externalpackages.cmake:37 (find_package) CMakeLists.txt:200 (include) ``` After testing with a "sudo dnf install ilmbase" I found that I already have this package installed: ``` Package ilmbase-2.2.0-1.fc22.x86_64 is already installed, skipping. ``` Any thoughts?

Added subscriber: @heath_petty

Added subscriber: @heath_petty

I'm seeing the exact same issue on Fedora 22:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find IlmBase (missing: ILMBASE_IEX-2_2_LIBRARIES
  ILMBASE_IMATH-2_2_LIBRARIES ILMBASE_ILMTHREAD-2_2_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/cmake/externalpackages.cmake:37 (find_package)
  CMakeLists.txt:200 (include)

I'm seeing the exact same issue on Fedora 22: ``` CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find IlmBase (missing: ILMBASE_IEX-2_2_LIBRARIES ILMBASE_IMATH-2_2_LIBRARIES ILMBASE_ILMTHREAD-2_2_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) src/cmake/modules/FindIlmBase.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) src/cmake/externalpackages.cmake:37 (find_package) CMakeLists.txt:200 (include) ```
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#39938
No description provided.