Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 747475 - media-libs/osl 1.11.8.0: version bump (EBUILD)
Summary: media-libs/osl 1.11.8.0: version bump (EBUILD)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Adrian
URL:
Whiteboard:
Keywords: EBUILD, PullRequest
Depends on:
Blocks:
 
Reported: 2020-10-09 18:57 UTC by Luke A. Guest
Modified: 2020-12-03 07:32 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
osl ebuild (osl-1.11.8.0.ebuild,1.93 KB, text/plain)
2020-10-09 18:58 UTC, Luke A. Guest
Details
diff media-libs/osl/osl-1.10.10 osl-1.11.9.0.ebuild (osl-1.10.10-to-1.11.9.0.diff,910 bytes, patch)
2020-11-19 00:15 UTC, mehw
Details | Diff
media-libs/osl-1.11.9.0.ebuild (version bump) (osl-1.11.9.0.ebuild,2.09 KB, text/plain)
2020-11-19 00:19 UTC, mehw
Details
diff osl-1.11.8.0.ebuild osl-1.11.9.0.ebuild (osl-1.11.8.0-to-1.11.9.0.diff,898 bytes, patch)
2020-11-19 00:22 UTC, mehw
Details | Diff
media-libs/osl/Manifest (for osl-1.11.9.0.tar.gz) (Manifest,307 bytes, text/plain)
2020-11-19 00:24 UTC, mehw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke A. Guest 2020-10-09 18:57:34 UTC
Here is a ebuild for the latest OSL release, it's a modified 1.10.10 ebuild.

There is a slight hack to get the LLVM_ROOT, I don't know if there is another proper way to do this.

Doesn't compile with LLVM 10 due to only one library.

Enabled linking with shared libs for LLVM as they are installed that way.


Reproducible: Always
Comment 1 Luke A. Guest 2020-10-09 18:58:30 UTC
Created attachment 664480 [details]
osl ebuild
Comment 2 Joonas Niilola gentoo-dev 2020-10-10 07:52:11 UTC
Comment on attachment 664480 [details]
osl ebuild

># Copyright 1999-2020 Gentoo Authors
># Distributed under the terms of the GNU General Public License v2
>
>EAPI=7
>inherit cmake llvm toolchain-funcs
>
># check this on updates
>LLVM_MAX_SLOT=9

Is this correct? I'd imagine llvm-9 is looking into being removed and we wouldn't want to add "new" packages depending on it.

>
>DESCRIPTION="Advanced shading language for production GI renderers"
>HOMEPAGE="http://opensource.imageworks.com/?p=osl"

Please also add the Github page here as 2ndary HOMEPAGE.

>SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
>
>LICENSE="BSD"
>SLOT="0"
>KEYWORDS="amd64 ~x86"

Do not put direct stable keywords, use ~amd64.

>
>X86_CPU_FEATURES=(
>	sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2
>	avx:avx avx2:avx2 avx512f:avx512f f16c:f16c
>)
>CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} )
>
>IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*}"
>
>RDEPEND="
>	dev-libs/boost:=
>	dev-libs/pugixml
>	media-libs/openexr:=
>	media-libs/openimageio:=
>	<sys-devel/clang-10:=
>	sys-libs/zlib:=

zlib doesn't need a subslot binder, remove := from here.

>	partio? ( media-libs/partio )
>	qt5? (
>		dev-qt/qtcore:5
>		dev-qt/qtgui:5
>		dev-qt/qtwidgets:5
>	)
>	dev-python/pybind11

Put this with the unconditional dependency list.

>"
>
>DEPEND="${RDEPEND}"
>BDEPEND="
>	sys-devel/bison
>	sys-devel/flex
>	virtual/pkgconfig
>"
>
># PATCHES=(
># 	"${FILESDIR}/${PN}-1.10.5-fix-install-shaders.patch"
># )

You can just remove these lines no need to comment.

>
># Restricting tests as Make file handles them differently
>RESTRICT="test"

Can you patch/sed whatever Makefile is doing weirdly? Doesn't sound too complicated.

>
>S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
>
>llvm_check_deps() {
>	has_version -r "sys-devel/clang:${LLVM_SLOT}"
>}
>
>src_configure() {
>	local cpufeature
>	local mysimd=()
>	for cpufeature in "${CPU_FEATURES[@]}"; do
>		use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}")
>	done
>
>	# If no CPU SIMDs were used, completely disable them
>	[[ -z ${mysimd} ]] && mysimd=("0")
>
>	local gcc=$(tc-getCC)
>	# LLVM needs CPP11. Do not disable.
>	local mycmakeargs=(
>		-DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
>		-DENABLERTTI=OFF
>		-DINSTALL_DOCS=$(usex doc)
>		-DLLVM_STATIC=OFF
>		-DOSL_BUILD_TESTS=$(usex test)
>		-DSTOP_ON_WARNING=OFF
>		-DUSE_PARTIO=$(usex partio)
>		-DUSE_QT=$(usex qt5)
>		-DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")"
>		-DLLVM_ROOT=/usr/lib/llvm/${LLVM_MAX_SLOT}

You should be able to get this using a function from llvm.eclass that takes PREFIX into account.

>	)
>
>	cmake_src_configure
>}

All the above being said, biggest blocker for not being able to merge this is a missing sign-off tag from you. Please read all the disclaimer text when you make an attachment in bugzilla, or read https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin - making a git-style patch is preferred because it allows you to easily add your sign-off tag there, and us to easily merge it into the tree.
Comment 3 Luke A. Guest 2020-10-10 14:48:25 UTC
I didn't write this, I copied it from the gentoo portage tree and modified it to work.
Comment 4 Reggie 2020-10-12 11:57:56 UTC
(In reply to Joonas Niilola from comment #2)
> Comment on attachment 664480 [details]
> osl ebuild
> 
> ># Copyright 1999-2020 Gentoo Authors
> ># Distributed under the terms of the GNU General Public License v2
> >
> >EAPI=7
> >inherit cmake llvm toolchain-funcs
> >
> ># check this on updates
> >LLVM_MAX_SLOT=9
> 
> Is this correct? I'd imagine llvm-9 is looking into being removed and we
> wouldn't want to add "new" packages depending on it.

I would not think that this release depends on <=LLVM-9.
As mentioned here:
https://github.com/imageworks/OpenShadingLanguage/blob/RB-1.11/INSTALL.md
... in the section "Dependencies"...
"OSL should compile also properly with C++14 or C++17, but they are not required (unless you are using LLVM >= 10, in which case at least C++14 is needed)."
Notice the text within the parenthesis...

Putting -DCMAKE_CXX_STANDARD=14 in the "mycmakeargs" fixes this.

Not sure why LLVM-10 needs that special treatment but...

See also https://bugs.gentoo.org/735750

<snip>

> >	partio? ( media-libs/partio )

For some reason the OSL package has trouble finding "partio" if not handled properly. I think I made it compile with partio using environment variables but the configure part gives a dubious message; i.e. first it says it fails to find partio and then it says partio found:

Configure output:
"-- Could NOT find partio (missing: partio_DIR)
 -- Found partio"  

<the rest is snipped>
Comment 5 Luke A. Guest 2020-10-12 12:23:34 UTC
@Reggie have you tried building it?

LLVM 10 installed as fewer libraries than the other versions. I didn't look into the build too much, maybe there is a switch to change this build to use the fewer libs version of LLVM over the many LLVM libraries it checks for.
Comment 6 Reggie 2020-10-12 13:16:29 UTC
(In reply to Luke A. Guest from comment #5)
> @Reggie have you tried building it?

Yep, builds fine... as mentioned, I *think*, I got it compiled with partio support but not sure how to test it... mainly interested in this for Blender support.

> LLVM 10 installed as fewer libraries than the other versions. I didn't look
> into the build too much, maybe there is a switch to change this build to use
> the fewer libs version of LLVM over the many LLVM libraries it checks for.

Not sure what possible ramifications LLVM 10 having fewer libs installed have on this...
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-18 20:16:34 UTC
(In reply to Luke A. Guest from comment #3)
> I didn't write this, I copied it from the gentoo portage tree and modified
> it to work.

One is still needed for the modifications.
Comment 8 Luke A. Guest 2020-11-18 20:24:50 UTC
(In reply to Sam James from comment #7)
> (In reply to Luke A. Guest from comment #3)
> > I didn't write this, I copied it from the gentoo portage tree and modified
> > it to work.
> 
> One is still needed for the modifications.

If you tell me what I need to do, I'll do it, but I've never done it before.
Comment 9 mehw 2020-11-19 00:15:30 UTC
Created attachment 672691 [details, diff]
diff media-libs/osl/osl-1.10.10 osl-1.11.9.0.ebuild

Bump media-libs/osl-1.11.9.0.

Compiles fine with both sys-devel/llvm-10.0.1 and sys-devel/llvm-11.0.0.



Kudos to:
- cyrillic https://bugs.gentoo.org/735750#c2 for -DCMAKE_CXX_STANDARD=14
- Luke A. Guest https://bugs.gentoo.org/747475#c1 for media-libs/osl-1.11.8.0
- Joonas Niilola https://bugs.gentoo.org/747475#c2 for media-libs/osl-1.11.8.0 improvements



Summary of media-libs/osl-1.11.9.0.ebuild amendments compared to media-libs/os-1.10.10.ebuild (see also the attached diff):

Add https://github.com/imageworks/OpenShadingLanguage to HOMEPAGE.

Allow max sys-devel/llvm-11, and add dev-python/pybind11 as DEPEND.

Use -DCMAKE_CXX_STANDARD=14, and remove -DENABLERTTI=OFF (ENABLERTTI was renamed ENABLE_RTTI, and then removed with https://github.com/imageworks/OpenShadingLanguage/commit/9e64b14a354f5b657d0664b2ebedfb2bfe8b0f7a).

Use -DLLVM_STATIC=OFF. It doesn't compile with -DLLVM_STATIC=ON (see errors reported at the bottom about missing static *.a libraries).

The patch osl-1.10.5-fix-install-shaders.patch is replaced by -DOSL_SHADER_INSTALL_DIR. -DOSL_PTX_INSTALL_DIR works in a similar way.

Add CMAKE_REMOVE_MODULES_LIST and leave an empty PATCHES just as a remainder (Findpugixml gives some trouble, see below).

There is also an error about partio (note that media-libs/partio-1.10.1 doesn't provide any cmake file):

-- Could NOT find partio (missing: partio_DIR)
-- Found partio



TODO:
- https://bugs.gentoo.org/747475#c2
  > ># Restricting tests as Make file handles them differently
  > >RESTRICT="test"
  >
  > Can you patch/sed whatever Makefile is doing weirdly? Doesn't sound too complicated.



New files/directories installed in respect to media-libs/osl-1.10.10:
- /usr/lib64/cmake
- /usr/lib64/pkgconfig
- /usr/lib64/python3.9/oslquery.so (it will not be built/installed if SANITIZE_ON_LINUX is set, but that cannot be defined directly via the command line)



There are some errors/warnings about src/cmake/modules/Findpugixml.cmake:

CMake Warning at src/cmake/modules/Findpugixml.cmake:14 (find_package):
  Could not find a configuration file for package "pugixml" that is
  compatible with requested version "1.8".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/pugixml/pugixml-config.cmake, version: unknown

Call Stack (most recent call first):
  src/cmake/checked_find_package.cmake:81 (find_package)
  src/cmake/externalpackages.cmake:105 (checked_find_package)
  CMakeLists.txt:139 (include)


-- Found pugixml 1.10



Doesn't compile with -DLLVM_STATIC=ON:

llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUInfo.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBinaryFormat.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBitstreamReader.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMRemarks.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMCore.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDebugInfoMSF.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDebugInfoCodeView.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMC.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUUtils.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUDesc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMCParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUAsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBitReader.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMTextAPI.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMObject.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMProfileData.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAnalysis.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBitWriter.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMTransformUtils.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAggressiveInstCombine.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMInstCombine.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMScalarOpts.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMTarget.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMCodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDebugInfoDWARF.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAsmPrinter.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMIRReader.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMLinker.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMVectorize.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMInstrumentation.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMipo.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMSelectionDAG.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMGlobalISel.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMIRParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUCodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMCDisassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAMDGPUDisassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64Info.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64Utils.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64Desc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64AsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMCFGuard.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64CodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMAArch64Disassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMNVPTXInfo.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMNVPTXDesc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMNVPTXCodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMInfo.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMUtils.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMDesc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMAsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMCodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMARMDisassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86Info.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86Utils.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86Desc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86CodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86AsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMX86Disassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBPFInfo.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBPFDesc.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBPFAsmParser.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBPFCodeGen.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMBPFDisassembler.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMCoroutines.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMCoverage.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDebugInfoGSYM.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMOption.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDlltoolDriver.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDWARFLinker.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMRuntimeDyld.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMExecutionEngine.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMCJIT.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMFrontendOpenMP.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMFuzzMutate.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMInterpreter.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMLibDriver.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMLineEditor.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMExtensions.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMObjCARCOpts.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMPasses.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMLTO.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMMCA.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMObjectYAML.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMJITLink.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMOrcError.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMOrcJIT.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMDebugInfoPDB.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMSymbolize.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMWindowsManifest.a
llvm-config: error: missing: /usr/lib/llvm/10/lib64/libLLVMXRay.a
-- LLVM library not found
--     Try setting LLVM_ROOT ?
--     Maybe this will help:  src/build-scripts/build_llvm.bash
CMake Error at src/cmake/checked_find_package.cmake:128 (message):
  LLVM is required, aborting.
Call Stack (most recent call first):
  src/cmake/externalpackages.cmake:109 (checked_find_package)
  CMakeLists.txt:139 (include)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-19 00:18:35 UTC
(In reply to Luke A. Guest from comment #8)
> (In reply to Sam James from comment #7)
> > (In reply to Luke A. Guest from comment #3)
> > > I didn't write this, I copied it from the gentoo portage tree and modified
> > > it to work.
> > 
> > One is still needed for the modifications.
> 
> If you tell me what I need to do, I'll do it, but I've never done it before.

Post a comment as:
Signed-off-by: Real Name <email>

(Others need to do this too if they want to use their work, but we have got a lot of people going here!)
Comment 11 mehw 2020-11-19 00:19:20 UTC
Created attachment 672694 [details]
media-libs/osl-1.11.9.0.ebuild (version bump)

Bump version.

Feel free to amend.
Comment 12 mehw 2020-11-19 00:22:40 UTC
Created attachment 672697 [details, diff]
diff osl-1.11.8.0.ebuild osl-1.11.9.0.ebuild

Diff of Luke A. Guest's osl-1.11.8.0.ebuild with osl-1.11.9.0.ebuild.
Comment 13 mehw 2020-11-19 00:24:40 UTC
Created attachment 672700 [details]
media-libs/osl/Manifest (for osl-1.11.9.0.tar.gz)

Manifest file just for osl-1.11.9.0.ebuild (aka osl-1.11.9.0.tar.gz).
Comment 14 mehw 2020-11-19 00:44:19 UTC
(In reply to Sam James from comment #10)
> (In reply to Luke A. Guest from comment #8)
> > (In reply to Sam James from comment #7)
> > > (In reply to Luke A. Guest from comment #3)
> > > > I didn't write this, I copied it from the gentoo portage tree and modified
> > > > it to work.
> > > 
> > > One is still needed for the modifications.
> > 
> > If you tell me what I need to do, I'll do it, but I've never done it before.
> 
> Post a comment as:
> Signed-off-by: Real Name <email>
> 
> (Others need to do this too if they want to use their work, but we have got
> a lot of people going here!)

Hi Sam James,

I'm just concerned about privacy... What do you suggest?

Use instead a PR on github, or attach `git format-patch` about the commits?

Main email or the email you use with bugs.gentoo.org (which is a different email to deal with possible spamming, in order to protect the main email)?

Can the email be "masked" like "<my.email at provider.org>"?

Thanks.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-19 01:32:19 UTC
(In reply to mehw from comment #14)
> (In reply to Sam James from comment #10)
> > (In reply to Luke A. Guest from comment #8)
> > > (In reply to Sam James from comment #7)
> > > > (In reply to Luke A. Guest from comment #3)
> > > > > I didn't write this, I copied it from the gentoo portage tree and modified
> > > > > it to work.
> > > > 
> > > > One is still needed for the modifications.
> > > 
> > > If you tell me what I need to do, I'll do it, but I've never done it before.
> > 
> > Post a comment as:
> > Signed-off-by: Real Name <email>
> > 
> > (Others need to do this too if they want to use their work, but we have got
> > a lot of people going here!)
> 
> Hi Sam James,
> 
> I'm just concerned about privacy... What do you suggest?
> 
> Use instead a PR on github, or attach `git format-patch` about the commits?
> 
> Main email or the email you use with bugs.gentoo.org (which is a different
> email to deal with possible spamming, in order to protect the main email)?
> 
> Can the email be "masked" like "<my.email at provider.org>"?
> 
> Thanks.

I think we could use one of the GitHub forwarder emails. A few other people have done this.
Comment 16 Adrian 2020-11-20 05:58:08 UTC
Upgrading from osl 1.10.13 to 1.11.9 leaves behind preseved libraries.

!!! existing preserved libs:
>>> package: media-libs/osl-1.11.9.0
 *  - /usr/lib64/liboslcomp.so.1.10
 *  - /usr/lib64/liboslcomp.so.1.10.13
 *      used by /usr/bin/blender (media-gfx/blender-2.90.1-r1)
 *      used by /usr/bin/cycles (media-gfx/blender-2.90.1-r1)
 *  - /usr/lib64/liboslexec.so.1.10
 *  - /usr/lib64/liboslexec.so.1.10.13
 *      used by /usr/bin/blender (media-gfx/blender-2.90.1-r1)
 *      used by /usr/bin/cycles (media-gfx/blender-2.90.1-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries

I think this means that osl should use SLOT operators 0/10 and 0/11 and use := to enforce rebuilds.

Updating between 1.10.10 and 1.10.13 appears to work without needing to recompile blender, so I think the granularity of the slots at the minor version level are correct.
Comment 17 Adrian 2020-11-20 08:22:08 UTC
The osl-1.11.9.0 (thanks mehw and others) compiles, and I am able to compile shaders manually with oslc -I/usr/include/OSL/shaders -o xxxx.oso xxxx.osl regardless of whether I use C++11 or 14, and for LLVM 9 through 11.

However I am testing these using my setup in bug 751580 but can't get LLVM10 or LLVM 11 with C++14 to work with blender.

When only the osl file is present, requiring blender to compile to produce the oso file before rendering, using LLVM 11/C++14 fails with
# Blender 2.90.1, Commit date: 1970-01-01 00:00, Hash unknown

# backtrace
blender(BLI_system_backtrace+0x33) [0x55ac7c4df5c3]
blender(+0xd7c979) [0x55ac7a143979]
/lib64/libc.so.6(+0x388f0) [0x7f1b204ce8f0]
/usr/lib64/libjemalloc.so.2(+0x25b1c) [0x7f1b256fab1c]
/usr/lib64/libjemalloc.so.2(+0x12555) [0x7f1b256e7555]
/usr/lib64/libjemalloc.so.2(+0x131fb) [0x7f1b256e81fb]
/usr/lib64/libjemalloc.so.2(+0x3335d) [0x7f1b2570835d]
/usr/lib64/libjemalloc.so.2(+0x103b5) [0x7f1b256e53b5]
/usr/lib64/liboslcomp.so.1.11(_ZN9OSL_v1_113pvt11SymbolTable11delete_symsEv+0x49) [0x7f1b24bfca49]
/usr/lib64/liboslcomp.so.1.11(_ZN9OSL_v1_113pvt15OSLCompilerImplD1Ev+0x133) [0x7f1b24bec173]
/usr/lib64/liboslcomp.so.1.11(_ZN9OSL_v1_1111OSLCompilerD1Ev+0x11) [0x7f1b24bec261]
blender(+0x29fe0b6) [0x55ac7bdc50b6]
blender(+0x29fe866) [0x55ac7bdc5866]
blender(+0x29ff9e8) [0x55ac7bdc69e8]
blender(+0x1fe9ff6) [0x55ac7b3b0ff6]
blender(+0x1fecaec) [0x55ac7b3b3aec]
blender(_ZN3ccl11BlenderSync14sync_materialsERN2BL9DepsgraphEb+0x7e4) [0x55ac7b3b4eb4]
blender(_ZN3ccl11BlenderSync9sync_dataERN2BL14RenderSettingsERNS1_9DepsgraphERNS1_11SpaceView3DERNS1_6ObjectEiiPPv+0xd3) [0x55ac7b390573]
blender(_ZN3ccl14BlenderSession6renderERN2BL9DepsgraphE+0xbbf) [0x55ac7b388fcf]
blender(+0x1fb6e95) [0x55ac7b37de95]
/usr/lib64/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x2c1) [0x7f1b22772a01]
/usr/lib64/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x28) [0x7f1b22772ac8]
/usr/lib64/libpython3.7m.so.1.0(+0x6896e) [0x7f1b2274d96e]
/usr/lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x5b88) [0x7f1b227535d8]
/usr/lib64/libpython3.7m.so.1.0(+0x67549) [0x7f1b2274c549]
/usr/lib64/libpython3.7m.so.1.0(+0x68795) [0x7f1b2274d795]
/usr/lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x5b88) [0x7f1b227535d8]
/usr/lib64/libpython3.7m.so.1.0(+0x67549) [0x7f1b2274c549]
/usr/lib64/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2e1) [0x7f1b22772471]
blender(+0x13c917d) [0x55ac7a79017d]
blender(+0x134bad0) [0x55ac7a712ad0]
blender(RE_engine_render+0x3ab) [0x55ac7bee5e7b]
blender(+0x2b27e71) [0x55ac7beeee71]
blender(+0x2b2b020) [0x55ac7bef2020]
blender(RE_RenderFrame+0xea) [0x55ac7bef273a]
blender(+0x1fa57b4) [0x55ac7b36c7b4]
blender(+0x1062732) [0x55ac7a429732]
/lib64/libpthread.so.0(+0x7e4e) [0x7f1b256bce4e]
/lib64/libc.so.6(clone+0x3f) [0x7f1b2058dfaf]

# Python backtrace
  File "/usr/share/blender/2.90/scripts/addons/cycles/engine.py", line 168 in render
  File "/usr/share/blender/2.90/scripts/addons/cycles/__init__.py", line 83 in render

If I use LLVM 10 or LLVM 9 with C++14 I get a similar error.


If osl is compiled from the command line using
oslc -I/usr/include/OSL/shaders -o simple_shader.oso simple_shader.osl
so that blender just has to use the compiled file

under LLVM11/C++14 blender fails to render with

found bundled python: /usr/share/blender/2.90/python
Read blend: /home/adrian/Documents/test/test_osl.blend
/var/tmp/portage/media-libs/osl-1.11.9.0/work/OpenShadingLanguage-Release-1.11.9.0/src/liboslexec/llvm_util.cpp:2451: call_function: Assertion 'llvm::isa<llvm::Function>(func)' failed.
/var/tmp/portage/media-libs/osl-1.11.9.0/work/OpenShadingLanguage-Release-1.11.9.0/src/liboslexec/llvm_util.cpp:2451: call_function: Assertion 'llvm::isa<llvm::Function>(func)' failed.
Aborted (core dumped)

although it rendered successfully when using LLVM10/C++14 and LLVM9/C++11

So really only LLVM 9/C++11 seems to work properly for me for both osl 1.10 and 1.11.

I think we need another program to test the shaders compiled by osl to help determine whether the issue is with osl or blender.
Comment 18 Adrian 2020-11-27 00:15:38 UTC
Adding the correct include for stdosl.h to my test shader results in it working with blender using osl-1.11.9 and LLVM 10, but it still fails with LLVM 11 as the assert in LLVM_Util::call_function in src/liboslexec/llvm_util.cpp triggers for LLVM 11 and upwards.

So I will put osl-1.11.9.0 through with LLVM 10 for now, upgrading to LLVM 11 will require further work.
Comment 19 Larry the Git Cow gentoo-dev 2020-12-01 11:24:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf4b1ff64f961b0fd360e4f74351fa3325081890

commit cf4b1ff64f961b0fd360e4f74351fa3325081890
Author:     Adrian Grigo <agrigo2001@yahoo.com.au>
AuthorDate: 2020-11-27 00:27:24 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-01 11:22:09 +0000

    media-libs/osl: Version bump to 1.11.9.0
    
    Version bump to 1.11.9.0, using LLVM 10 and C++14
    using shared libraries to prevent compilation error
    
    New dependency on pybind11 added
    
    ENABLERTTI removed as flag removed upstream
    
    LLVM_ROOT set to prevent errors with pugixml
    
    Shader install patch replaced with setting
    OSL_SHADER_INSTALL_DIR and OSL_PTX_INSTALLDIR
    
    Thanks again to Luke A Guest, Sam James, Joonas Niilola,
    Reggie and mehw for contributions to this update.
    
    Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au>
    Closes: https://bugs.gentoo.org/747475
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Closes: https://github.com/gentoo/gentoo/pull/18418
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-libs/osl/Manifest            |  1 +
 media-libs/osl/osl-1.11.9.0.ebuild | 93 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)
Comment 20 Larry the Git Cow gentoo-dev 2020-12-03 07:32:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26d4e3a2801d9bcfb870022af121f2a95afe1b65

commit 26d4e3a2801d9bcfb870022af121f2a95afe1b65
Author:     Adrian Grigo <agrigo2001@yahoo.com.au>
AuthorDate: 2020-11-27 02:13:22 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-03 07:32:12 +0000

    media-gfx/blender: Use subslot binder for media-libs/osl
    
    Existing versions of blender need to use the subslot binder
    to prevent preserved libraries being left behind when osl
    is upgraded from 1.10 to 1.11.
    
    This will also ensure that the osl shaders within blender
    are compiled with the version of osl used to execute them.
    
    Osl now declares a subslot 0/10 and 0/11 in my latest PR.
    
    Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au>
    Bug: https://bugs.gentoo.org/747475
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-gfx/blender/blender-2.83.4-r1.ebuild | 2 +-
 media-gfx/blender/blender-2.90.1-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)