AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage

Error: assigning to 'OpenImageIO_v2_6_5::TextureSystem *' from incompatible type 'std::shared_ptr<TextureSystem>'

Open
#1,864 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
414
Avg merge
3d 1h
Merged PRs (30d)
10

Description

### Problem
**Actual behavior:**

FAILED: src/liboslexec/CMakeFiles/oslexec.dir/shadingsys.cpp.o
/usr/lib/llvm14/bin/clang++ -DCUDA_TARGET_ARCH=\"sm_60\" -DOIIO_DISABLE_DEPRECATED=900000 -DOIIO_HIDE_FORMAT=1 -DOSL_CUDA_VERSION=\"\" -DOSL_EXPORTS -DOSL_FAST_MATH=1 -DOSL_INTERNAL=1 -DOSL_LLVM_FULL_VERSION=\"14.0.6\" -DOSL_LLVM_VERSION=140 -DOSL_OPTIX_VERSION=\"\" -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Doslexec_EXPORTS -Doslparse=OSL_v1_14_1_oslparse -Dosoparse=OSL_v1_14_1_osoparse -I./OpenShadingLanguage/build/include -I./OpenShadingLanguage/build/src/include -I./OpenShadingLanguage/src/include -I./OpenShadingLanguage/ext/dist/include -I./OpenShadingLanguage/src/liboslexec -I./OpenShadingLanguage/src/liboslcomp -isystem /usr/lib/llvm14/include -isystem /usr/include/Imath -march=native -mtune=native -O2 -pipe -fpermissive -fno-plt -fexceptions -Wformat -Wno-deprecated-declarations -Wno-stringop-overflow -Wno-unknown-pragmas -Wno-error=incompatible-pointer-types -fPIC -Wp,-D_GLIBCXX_ASSERTIONS -Wno-template-id-cdtor -Wno-zero-as-null-pointer-constant -fPIC -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -Wall -Wno-unused-function -Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-private-field -Wno-tautological-compare -Wno-unknown-pragmas -Wno-format-security -Qunused-arguments -Wunknown-warning-option -Wno-unused-local-typedefs -Wno-expansion-to-defined -Wno-bitwise-instead-of-logical -Wno-null-conversion -Wno-error=strict-overflow -fno-math-errno -fno-reciprocal-math -MD -MT src/liboslexec/CMakeFiles/oslexec.dir/shadingsys.cpp.o -MF src/liboslexec/CMakeFiles/oslexec.dir/shadingsys.cpp.o.d -o src/liboslexec/CMakeFiles/oslexec.dir/shadingsys.cpp.o -c ./OpenShadingLanguage/src/liboslexec/shadingsys.cpp
./OpenShadingLanguage/src/liboslexec/shadingsys.cpp:1204:24: error: assigning to 'OpenImageIO_v2_6_5::TextureSystem *' from incompatible type 'std::shared_ptr'
m_texturesys = TextureSystem::create(true /* shared */);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

### Steps to Reproduce

I could overcome this error by patching https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1848 in reverse.

### Versions

* OSL branch/version: git master (1.13.11.0+)
* OS: Linux
* C++ compiler: 14.2.1
* LLVM version: 14 (went back from 18)
* OIIO version: git master - shall I get behind https://github.com/OpenImageIO/oiio.git#commit=135e659301a3f767a05da1d6a3cc472d1563402d ?

Contributor guide

Open the contributing guide

Research direction

Start in src/liboslexec/shadingsys.cpp around line 1204 and compare the TextureSystem::create API used there with the reported OpenImageIO version. Review the reverse of pull request 1848 and reproduce the build with the listed LLVM, compiler, and OIIO setup. Done means the project compiles without the incompatible-pointer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.