Error: OSL script compilation failed #86928

Closed
opened 2021-03-25 11:26:46 +01:00 by Paolo Furani · 13 comments

System Information
Operating system: Linux-4.15.0-136-generic-x86_64-with-glibc2.27 64 Bits
Graphics card: Mesa DRI Intel(R) HD Graphics 5500 (BDW GT2) Intel Open Source Technology Center 4.6 (Core Profile) Mesa 20.0.8

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-24 17:47, hash: 9ac7946dd0
Worked: (2.92.0)

Short description of error
When I try to compile any OSL shader I get an error below

blender-2.93.0/2.93/scripts/addons/cycles/shader/stdcycles.h:31:10: fatal error: 'stdosl.h' file not found
#include "stdosl.h"
         ^~~~~~~~~~
Error: OSL script compilation failed, see console for errors

I tryed with this OSL shader on manual

shader simple_material(
    color Diffuse_Color = color(0.6, 0.8, 0.6),
    float Noise_Factor = 0.5,
    output closure color BSDF = diffuse(N))
{
    color material_color = Diffuse_Color * mix(1.0, noise(P * 10.0), Noise_Factor);
    BSDF = material_color * diffuse(N);
}

Exact steps for others to reproduce the error
after I added a new text file inside Blender with code of simple OSL I added a script node with the OSL shader but this isn't compiled.
attached .blend file
Simple_material_OSL_293_version.blend

**System Information** Operating system: Linux-4.15.0-136-generic-x86_64-with-glibc2.27 64 Bits Graphics card: Mesa DRI Intel(R) HD Graphics 5500 (BDW GT2) Intel Open Source Technology Center 4.6 (Core Profile) Mesa 20.0.8 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-24 17:47, hash: `9ac7946dd0` Worked: (2.92.0) **Short description of error** When I try to compile any OSL shader I get an error below ``` blender-2.93.0/2.93/scripts/addons/cycles/shader/stdcycles.h:31:10: fatal error: 'stdosl.h' file not found #include "stdosl.h" ^~~~~~~~~~ Error: OSL script compilation failed, see console for errors ``` I tryed with this OSL shader on manual ``` shader simple_material( color Diffuse_Color = color(0.6, 0.8, 0.6), float Noise_Factor = 0.5, output closure color BSDF = diffuse(N)) { color material_color = Diffuse_Color * mix(1.0, noise(P * 10.0), Noise_Factor); BSDF = material_color * diffuse(N); } ``` **Exact steps for others to reproduce the error** after I added a new text file inside Blender with code of simple OSL I added a script node with the OSL shader but this isn't compiled. attached .blend file [Simple_material_OSL_293_version.blend](https://archive.blender.org/developer/F9909053/Simple_material_OSL_293_version.blend)
Author

Added subscriber: @pafurijaz-4

Added subscriber: @pafurijaz-4

#87279 was marked as duplicate of this issue

#87279 was marked as duplicate of this issue
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

Works ok for me.

image.png

Works ok for me. ![image.png](https://archive.blender.org/developer/F9909847/image.png)
Author

Hi on Linux and in my Notebook seem not working, here the screenshot
Test_now.png

Hi on Linux and in my Notebook seem not working, here the screenshot ![Test_now.png](https://archive.blender.org/developer/F9909858/Test_now.png)

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

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

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

I can verify that this happens in the alpha builds available on https://builder.blender.org/download/.

The install process is supposed to locate those headers from the OSL library's installation, however, the path that is resolved by FindOSL.cmake is libdir/osl/shaders, when they are in libdir/osl/share/OSL/shaders since the latest library update (rBL62577 for Linux, but is the same for other platforms).

My CMake skills are apparently lacking so I am going to let anyone of the platform maintainers fix this.

I can verify that this happens in the alpha builds available on https://builder.blender.org/download/. The install process is supposed to locate those headers from the OSL library's installation, however, the path that is resolved by `FindOSL.cmake` is `libdir/osl/shaders`, when they are in `libdir/osl/share/OSL/shaders` since the latest library update (rBL62577 for Linux, but is the same for other platforms). My CMake skills are apparently lacking so I am going to let anyone of the platform maintainers fix this.
Member

Added subscribers: @IPv6, @lichtwerk

Added subscribers: @IPv6, @lichtwerk
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

@dr.sybren: does this ring a bell?

@dr.sybren: does this ring a bell?
Sybren A. Stüvel self-assigned this 2021-04-09 13:15:56 +02:00

This issue was referenced by a631a9eb1f

This issue was referenced by a631a9eb1f0b81b4e38e5465434ddda50079a343

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
6 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#86928
No description provided.