Page MenuHome

OSL script comilation fails
Closed, ResolvedPublic

Description

System Information
Operating system: Darwin-19.5.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 555 OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.9.15

Blender Version
Broken: version: 2.83.0, branch: master, commit date: 2020-06-03 14:38, hash: rB211b6c29f771
Worked: (newest version of Blender that worked as expected)

Short description of error
OSL script compilation fails, Also when using the Blender documentation example

https://docs.blender.org/manual/en/latest/render/shader_nodes/osl.html#script-node

Exact steps for others to reproduce the error
See if OSL works on your mac.


Event Timeline

Nico (hemdrup) renamed this task from OSL script comilation failes to OSL script comilation failes and no message in the console..Jun 20 2020, 1:26 PM
Nico (hemdrup) updated the task description. (Show Details)

That isn't the console. On MacOS you have to start Blender from a terminal window to see the console prints. Only Windows opens from a console by default. You should use a terminal anyways-- you can't have multiple instances otherwise (well, on a Mac).

This probably isn't a bug, but if the OSL documentation example fails to compile, *that* is a problem that is worth fixing.

@Joseph Gofton (Joseph) Brandenburg (TheAngerSpecialist)

Opened Blender with the terminal. The terminal says;

ERROR: /Applications/Blender.app/Contents/Resources/2.83/scripts/addons/cycles/shader/stdcycles.h:31: error: error: could not find include file: stdosl.h

Nico (hemdrup) renamed this task from OSL script comilation failes and no message in the console. to OSL script comilation fails.Jun 22 2020, 4:02 PM
Nico (hemdrup) updated the task description. (Show Details)

Odd, If I'm not mistaken, that is what Cycles says when it has not been built with OSL support. Did you build Blender or download it?

I suppose this sort of thing may also happen if a package is not found on the system, but I don't know if that's true in Mac like it is in the Linux world. I doubt Blender would rely on system packages like that on a Mac... Even on Linux, Blender is available as a snap package.

I had no problem compiling this shader on windows. Can't check on mac really

Nico (hemdrup) added a comment.EditedJun 23 2020, 1:47 PM

@Joseph Gofton (Joseph) Brandenburg (TheAngerSpecialist)

I download Blender and then drag it into the application folder to replace the previous version of Blender in the Application folder.

No expert on how the Mac apps work. But, this is how I understand it.
Each application is like an app on Mac with all its content inside like a folder, why the drag and drop works, and why there is no uninstall or install on Mac. Just drag and drop.

Have same problem on Mac... OSL shaders are not compilable anymore

I have the same problem in MacOs (Catalina 10.15.16). Compilation of any OLS-script is failed with error message "Unable to find stdosl.h". The problem exists in current official release 2.83.4 and an latest 2.91
This OSL files was perfectly compilable on same machine in 2.82a (!)

i managed to workaround problem, may be this can help:

I checked content of "/scripts/addons/cycles/shader/" folders and there is no stdosl.h, see screenshots -

But the file present in same path in 2.82a, see screenshots -

after copying stdosl.h, oslutil.h, vector2.h, vector4.h from 2.82 into 2.83 on same location - OSL shaders started to compile without errors
So probably dmg bundling miss some OSL-related files... with missing files compilation works as expected