Mac OS

Discussion related to the LuxCore functionality, implementations and API.
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe »

See what i posted in "wanted" thread: viewtopic.php?f=5&t=22&sid=0062960d1188 ... rt=10#p427

Also do yourself a favour and start using xcode for now ( newer cmake will even set it automatically as first choice generator)
Its possible to use cmake-makefiles as well, but beleave me, xcode often overcomes the typical macOS fu.. eh problems.

Jens
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Mac OS

Post by Dade »

Pthread is POSIX thread library (https://en.wikipedia.org/wiki/POSIX_Threads), it is something should be standard on any *NIX system including MacOS :?:
Support LuxCoreRender project with salts and bounties
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe »

Dade wrote: Sun Jan 28, 2018 9:24 pm Pthread is POSIX thread library (https://en.wikipedia.org/wiki/POSIX_Threads), it is something should be standard on any *NIX system including MacOS :?:
It is, lemme lookup if i had to tweak something...

... nope, should work as is.
Last edited by jensverwiebe on Sun Jan 28, 2018 9:35 pm, edited 1 time in total.
patrickwalker
Posts: 28
Joined: Sun Jan 28, 2018 2:10 pm
Location: Canada

Re: Mac OS

Post by patrickwalker »

Not sure how one uses Xcode without a project file to start from. Usually, cmake is used to generate that from a local git clone.

The problem with the GUI version of cmake is not working for me. Keeps telling me that it cannot find "Ninja" and tells me to select a different build tool. When I try to specify Xcode as a generator (cmake -G Xcode <location of CMakeList>) it generates an error.

CLI version of cmake keeps telling me it cannot find <pthread.h>, but there are pthread.h header files inside Xcode for the various Apple platforms. You'd think it would be able to see them but maybe not. Should they be copied out into the source tree somewhere? Not like there's a /usr/include in macOS that is easily changed.
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe »

patrickwalker wrote: Sun Jan 28, 2018 9:35 pm Not sure how one uses Xcode without a project file to start from. Usually, cmake is used to generate that from a local git clone.

The problem with the GUI version of cmake is not working for me. Keeps telling me that it cannot find "Ninja" and tells me to select a different build tool. When I try to specify Xcode as a generator (cmake -G Xcode <location of CMakeList>) it generates an error.

Error keeps telling me it cannot find <pthread.h>, but there are pthread.h header files inside Xcode for the various Apple platforms.
Gosh always the same with Crapple updates. Therefor i stay on 10.11/xcode8.1.
But i gave up serious macOS development, so only give hints here.

Hint1: always use the macOS from last year for dev :P, hint2: use the lastmost cmake version.
Make sure also read this readme, it still applies but must be c++11 now and embree is updated: https://bitbucket.org/luxrender/macos

Jens
Last edited by jensverwiebe on Sun Jan 28, 2018 9:54 pm, edited 2 times in total.
patrickwalker
Posts: 28
Joined: Sun Jan 28, 2018 2:10 pm
Location: Canada

Re: Mac OS

Post by patrickwalker »

I thought copying the macOS-specific pthread.h header from inside Xcode into /usr/local/include would allow cmake to find it. pthread.h error remains.

Using cmake 3.10.2 (Posted 28 Dec 2017, if I remember correctly)
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe »

patrickwalker wrote: Sun Jan 28, 2018 9:40 pm I thought copying the macOS-specific pthread.h header from inside Xcode into /usr/local/include would allow cmake to find it. pthread.h error remains.
OMG, don't start such cp mess, rather try set the pathes correct.
The not found pthread is a known thing and 'am sure again it comes from not correct set cmake policies.
For example i had this when updating from cmake 2.8 to 3.5 on linux too. Setting the policy fixed it.
Use the same blender uses, i will post it here in a minute


Jens
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Mac OS

Post by jensverwiebe »

Try adding those in main cmake: ( under version requirement)

Code: Select all

cmake_policy(Version 3.0)
cmake_policy(SET CMP0043 OLD)
+ eventually
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0010 NEW)
cmake_policy(SET CMP0014 NEW)
Depends on the cmaake version you use.
patrickwalker
Posts: 28
Joined: Sun Jan 28, 2018 2:10 pm
Location: Canada

Re: Mac OS

Post by patrickwalker »

My knowledge of cmake internals is limited.

I added it into the Apple section of PlatformSpecific.cmake.

Same issue.

How much compilation and linking should there even be at this point? I'm seeing some a.out entries in the log files.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Mac OS

Post by Dade »

patrickwalker wrote: Sun Jan 28, 2018 9:54 pm How much compilation and linking should there even be at this point? I'm seeing some a.out entries in the log files.
I'm afraid you have not even started.
Support LuxCoreRender project with salts and bounties
Post Reply