Problems with Imath #98399

Closed
opened 2022-05-26 14:07:14 +02:00 by lenni · 10 comments

Hello everyone,

first of all, I'm sorry if this is the wrong place to report this. This is my first time using Maniphest (?)

I am currently trying to compile Cycles on Windows for Windows. Doing that, I encountered ~two~ three issues

  • Build system was not aware of the separate Imath folder
  • Source files were expecting Imath headers in the root include folder instead of <Imath/*.h>
  • During linking, two libraries were missing: openexr/Half_s.lib and openexr/IlmImf_s.lib

Here's what I did:

  1. Cloned the repo
  2. Opened a "Developer Command Prompt for VS 2022" and moved into that folder
  3. Ran "cmake -B build", moved into the build folder
  4. Ran "cmake --build . --target install --config Release"

Now to my first issue. After generating some oso files, I get this output:

  ies.cpp
D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include
file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj]
  patch.cpp
  log.cpp
D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include
file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj]
  split.cpp
D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include
file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj]
  math_cdf.cpp
  patch_table.cpp
  md5.cpp
  Generating Code...
  murmurhash.cpp
  path.cpp
D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include
file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\util\cycles_util.vcxproj]
  profiling.cpp

With the fatal errors all marked red. cmake eventually finishes, though no final executable is created.

As a temporary workaround, I added the Imath folder (in my case D:\git\lib\win64_vc15\imath\include) to every directive of the affected vcxproj files (util, subd, graph, session, scene).

After fixing all this, I encountered the second error. Some source files (Alembic/Util/Foundation.h, Alembic/Abc/Foundation.h, Alembic/AbcGeom/Foundation.H) were including <Imath*.h> as well as <half.h>. However these files are located in a separate Imath/ folder inside the include folder.

So I changed the source files:

-#include <ImathVec.h>
-#include <ImathBox.h>
-#include <ImathMatrix.h>
-#include <ImathQuat.h>
-#include <ImathColor.h>
+#include <Imath/ImathVec.h>
+#include <Imath/ImathBox.h>
+#include <Imath/ImathMatrix.h>
+#include <Imath/ImathQuat.h>
+#include <Imath/ImathColor.h>

(e.g. Alembic/Abc/Foundation.h)

This resulted in another vcxproj (kernel_osl, integrator, device, ...) being unaware of the Imath folder. I also fixed this issue as described above.

With everything finally compiled, I encoutered the third issue:

  cycles_hydra.vcxproj -> D:\git\cycles\build\lib\Release\cycles_hydra.lib
  cycles_standalone.cpp
LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\win64_vc15\openexr\lib\Half_s.lib' [D:\git\cycles\b
uild\src\hydra\hdCycles.vcxproj]
  cycles_xml.cpp
  oiio_output_driver.cpp
  Generating Code...
LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\win64_vc15\openexr\lib\Half_s.lib' [D:\git\cycles\b
uild\src\app\cycles.vcxproj]

With the fatal errors again highlighted in red.

Now I guess these should somehow be replaced by imath/Imath_s.lib though I'm completely lost how.

Any help would be greatly appreciated! I already tried freshly cloning and building cycles, which did not fix my issues.

Hello everyone, first of all, I'm sorry if this is the wrong place to report this. This is my first time using Maniphest (?) I am currently trying to compile Cycles on Windows for Windows. Doing that, I encountered ~two~ three issues - Build system was not aware of the separate Imath folder - Source files were expecting Imath headers in the root include folder instead of <Imath/*.h> - During linking, two libraries were missing: openexr/Half_s.lib and openexr/IlmImf_s.lib Here's what I did: 1. Cloned the repo 2. Opened a "Developer Command Prompt for VS 2022" and moved into that folder 3. Ran "cmake -B build", moved into the build folder 4. Ran "cmake --build . --target install --config Release" Now to my first issue. After generating some oso files, I get this output: ``` ies.cpp D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj] patch.cpp log.cpp D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj] split.cpp D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\subd\cycles_subd.vcxproj] math_cdf.cpp patch_table.cpp md5.cpp Generating Code... murmurhash.cpp path.cpp D:\git\cycles\..\lib\win64_vc15\openimageio\include\OpenImageIO/Imath.h(16,13): fatal error C1083: Cannot open include file: 'Imath/ImathColor.h': No such file or directory [D:\git\cycles\build\src\util\cycles_util.vcxproj] profiling.cpp ``` With the fatal errors all marked red. cmake eventually finishes, though no final executable is created. As a temporary workaround, I added the Imath folder (in my case D:\git\lib\win64_vc15\imath\include) to every <AdditionalIncludeDirectories> directive of the affected vcxproj files (util, subd, graph, session, scene). After fixing all this, I encountered the second error. Some source files (Alembic/Util/Foundation.h, Alembic/Abc/Foundation.h, Alembic/AbcGeom/Foundation.H) were including <Imath*.h> as well as <half.h>. However these files are located in a separate Imath/ folder inside the include folder. So I changed the source files: ``` -#include <ImathVec.h> -#include <ImathBox.h> -#include <ImathMatrix.h> -#include <ImathQuat.h> -#include <ImathColor.h> +#include <Imath/ImathVec.h> +#include <Imath/ImathBox.h> +#include <Imath/ImathMatrix.h> +#include <Imath/ImathQuat.h> +#include <Imath/ImathColor.h> ``` (e.g. Alembic/Abc/Foundation.h) This resulted in another vcxproj (kernel_osl, integrator, device, ...) being unaware of the Imath folder. I also fixed this issue as described above. With everything finally compiled, I encoutered the third issue: ``` cycles_hydra.vcxproj -> D:\git\cycles\build\lib\Release\cycles_hydra.lib cycles_standalone.cpp LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\win64_vc15\openexr\lib\Half_s.lib' [D:\git\cycles\b uild\src\hydra\hdCycles.vcxproj] cycles_xml.cpp oiio_output_driver.cpp Generating Code... LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\win64_vc15\openexr\lib\Half_s.lib' [D:\git\cycles\b uild\src\app\cycles.vcxproj] ``` With the fatal errors again highlighted in red. Now I guess these should somehow be replaced by imath/Imath_s.lib though I'm completely lost how. Any help would be greatly appreciated! I already tried freshly cloning and building cycles, which did not fix my issues.
Author

Added subscriber: @scrouthtv

Added subscriber: @scrouthtv

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

I would probably ask questions about building on blender.chat. I have never built cycles standalone, so I don't think I can help much. Perhaps check out https://developer.blender.org/diffusion/C/browse/master/BUILDING.md?as=remarkup if you have not yet.

Will close since this tracker is only for bugs and errors.

I would probably ask questions about building on blender.chat. I have never built cycles standalone, so I don't think I can help much. Perhaps check out https://developer.blender.org/diffusion/C/browse/master/BUILDING.md?as=remarkup if you have not yet. Will close since this tracker is only for bugs and errors.
Author

Thanks for the link. However, I already read that one as well as the documentation on building Blender itself. I did everything as described in these docs and still facing the issue. That's why I thought it's a bug and reported it in the first place...

Thanks for the link. However, I already read that one as well as the documentation on building Blender itself. I did everything as described in these docs and still facing the issue. That's why I thought it's a bug and reported it in the first place...
Author

I was able to confirm that this issue does not happen with the 3.1.1 release. I think some recent commits introduced it.

I was able to confirm that this issue does not happen with the 3.1.1 release. I think some recent commits introduced it.

Added subscriber: @chewitt

Added subscriber: @chewitt

I'm experiencing the same issue trying to build 3.1.2 on windows - any progress?

I'm experiencing the same issue trying to build 3.1.2 on windows - any progress?
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

Unsure how much progress you are expecting on an archived ticket, but i'll chime in nonetheless, you are likely trying to build cycles standalone, which only gets updated after each release against blender master libs which already has moved on to newer versions of most dependencies.

Try building against the 3.1 libs, you can grab them from https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/win64_vc15/

Unsure how much progress you are expecting on an archived ticket, but i'll chime in nonetheless, you are likely trying to build cycles standalone, which only gets updated after each release against blender master libs which already has moved on to newer versions of most dependencies. Try building against the 3.1 libs, you can grab them from `https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/win64_vc15/`
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
4 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#98399
No description provided.