Page 2 of 22

Re: Mac OS

Posted: Sun Jan 28, 2018 9:04 pm
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

Re: Mac OS

Posted: Sun Jan 28, 2018 9:24 pm
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 :?:

Re: Mac OS

Posted: Sun Jan 28, 2018 9:32 pm
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.

Re: Mac OS

Posted: Sun Jan 28, 2018 9:35 pm
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.

Re: Mac OS

Posted: Sun Jan 28, 2018 9:37 pm
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

Re: Mac OS

Posted: Sun Jan 28, 2018 9:40 pm
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)

Re: Mac OS

Posted: Sun Jan 28, 2018 9:42 pm
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

Re: Mac OS

Posted: Sun Jan 28, 2018 9:46 pm
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.

Re: Mac OS

Posted: Sun Jan 28, 2018 9:54 pm
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.

Re: Mac OS

Posted: Sun Jan 28, 2018 9:57 pm
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.