LuxCore static on macOS .. finally

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

LuxCore static on macOS .. finally

Post by u3dreal »

So finally i managed to compile almost static on osx. Everything exept tbb embree and nvida libs is static now.

Tbb is not supposed to be static i read and i get crashes with embree static on my Xenon.
In the Linux release i see that also OIIO is dynamic and i wonder if there is a particular reason for that.?
I get a warning ...

Code: Select all

ld: warning: direct access in function '___cxx_global_var_init.8' from file '../../lib/Release/libslg-core.a(texture.cpp.o)' to global weak symbol 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_significands_128' from file '../../../macos/lib/libOpenImageIO.a(ustring.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
I wonder if this could be a problem in future. @Dade @acasta69
So far all seems to work fine.

I will update the repo and the scripts .. but still would like to stick with 10.13 as build target since if not we would lock out nvidia functionaltity on osx. Also i think at some day it will be dropped. maybe 2.7 :?

Hmm now it should be rather possible to build the SDK for osx .. or should absolutely all libs be static then.

So long
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Could someone give me his opinion here ?

I really wanna make shure not to break averything so i would need some feedback from
@Dade and @acasta69 about this issue.
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: LuxCore static on macOS .. finally

Post by acasta69 »

Hi, OpenImageIO used to be linked dynamically on Windows, then TAO found that version compatibility problem with the 3DSMax plugin and when upgrading to version 2.2.13.1 I began to use a statically linked version (for some reason I had problems with static linking of the previously used version).
This happened last April, no problems have been reported since then.

Regarding the warning you showed...
u3dreal wrote: Tue Sep 14, 2021 4:44 pm

Code: Select all

<omissis> This was likely caused by different translation units being compiled with different visibility settings.
I guess you have already verified this.
I had this problem of forgetting to specify the static linkage when building LuxCore, but VS error messages are totally different (unresolved external), because different symbols are generated for static and dynamic linkage. No idea how it works on MacOS or Linux.

I had to add this to Config_Windows.cmake:
https://github.com/LuxCoreRender/LuxCor ... .cmake#L33

Not sure if yours is a similar problem. Probably not, or it wold have been an error and not a warning...
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Thanks for the reply acasta69,

i do not have problems compiling .. it all compiles well but was unsure what this warning is about.

static linking works like this on macos.
If a .dylib is present the compiler will prefer that and only link the static version if no dylib is present.
This is not something the user can not decide. It took me a while to understand this but now all links as expected.

Also i added libz to the deps in order to have a static version since the one delivered with osx is dynamic.

Maybe i will come up with a test version for macusers to test.

Of course this makes bundeling the package much easier since there are only two ( or tree if you count cuda ) dylib to take care of.

From what i read it is strongly advised not to compile tbb statically i decided to leave embree dynamic as well since i was expiriencing
some segfaults on the hackintosh. Not sure about openmp as well ... i read something about shedulling being a problem with static linking
but never had a problem. Guess we will just have to try.

Also i found a version of embree beening forked for arm64 which includes building statically and including tbb there as well.

Any idea will be helpfull :D
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Here is a test version for all macOS users.

http://q3de.com/wp-content/uploads/2021 ... static.zip
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: LuxCore static on macOS .. finally

Post by epilectrolytics »

u3dreal wrote: Tue Nov 16, 2021 1:05 am Here is a test version for all macOS users.
I needed to manually permit several files but then Blender opened and rendered two different scenes.
I'll keep it installed and report if a problem occurs.
On MacBook Air M1, OS 12.0.1, Blender 2.93.5 Intel (Rosetta).

Edit: There is one difference to the GitHub latest version:
M1 GPU is accessible as Film device in preferences, GitHub was CPU only.
Viewport render with GPU & Rosetta OIDN works including Bloom and vignetting filters, looks ok so far.
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Nice thanks for your testing !
epilectrolytics wrote: Tue Nov 16, 2021 7:30 am I needed to manually permit several files but then Blender opened and rendered two different scenes.
This should be the case with any version since we do not have a propper developer license just a personal one.
epilectrolytics wrote: Tue Nov 16, 2021 7:30 am Edit: There is one difference to the GitHub latest version:
M1 GPU is accessible as Film device in preferences, GitHub was CPU only.
Viewport render with GPU & Rosetta OIDN works including Bloom and vignetting filters, looks ok so far.
Interesting i did not change anything here ... as far as i know. But good there are more options now :D
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Is now in master.
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: LuxCore static on macOS .. finally

Post by epilectrolytics »

u3dreal wrote: Wed Jan 26, 2022 3:10 pm Is now in master.
Awesome, works like a charm!

Tested latest build BlendLuxCore 2.61 on Blender 3.0.1-macos-x64 on MacOS 12.1 on MacBookAir M1, various scenes, CPU and OCL.

Looks like Blender 2.93 can now get retired, thanks very much!

I don't know about the state of the Windows and Linux versions but there should be an official release of LuxCore 2.61 when everything works on Blender 3.0 finally.
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: LuxCore static on macOS .. finally

Post by u3dreal »

Thanks again for testing !
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
Post Reply