Re: Compilation failure for openblas-0.3.7-1 under OSX 10.11.6

"Homeier, Derek" <[email protected]>
Newsgroups gmane.os.apple.fink.beginners
Message-ID <[email protected]>
On 20 Feb 2020, at 4:47 am, Hanspeter Niederstrasser <[email protected]> wrote:
> 
>> smallscaling.c: In function 'omp_bench':
>> smallscaling.c:163:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
>>   163 |     clock_gettime(CLOCK_MONOTONIC, &tick);
>>       |                   ^~~~~~~~~~~~~~~
> 
> 
>> Distribution version: selfupdate-git Mon Feb 17 11:41:32 2020, 10.11, x86_64
>> Trees: local/main stable/main unstable/main
>> Xcode.app: 8.2.1
>> Xcode command-line tools: 8.2.0.0.1.1480973914
> 
> Some older versions of OS X did not have CLOCK_MONOTONIC, but I don't remember when OS X acquired it. However, you do have a mismatch between Xcode and the command line tools. Do you still get the failure if you upgrade the CLT to 8.2.1? Sometimes mismatched header versions cause similar failures.
> 
> After upgrading the command line tools, if you run `grep -rn CLOCK_MONOTONIC /usr/include`, hopefully /usr/include.time.h will show up as #defining CLOCK_MONOTONIC. If it does, then openblas should hopefully build. If it's not there, then openblas-0.3.7 might need to be restricted.

I’ve seen some discussion online about OS X prior to 10.12 not making the clock_gettime function available.
I do not have a 10.11 system available at the moment to try and debug this, but if you are still running into the
error after updating your command line tools, could you test if a workaround is perhaps already provided for in
the OpenBLAS build by editing the openblas.info file, to add the lines

        if [ "$darwin_vers" -lt 16 ]; then
                        export MACOSX_DEPLOYMENT_TARGET="10.$darwin_vers"
        fi

to the CompileScript?

Cheers,
					Derek


_______________________________________________
Fink-beginners mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-beginners
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.