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

Hanspeter Niederstrasser <[email protected]>
Newsgroups gmane.os.apple.fink.beginners
Organization Snaggled Works
Message-ID <[email protected]>
On 2/19/20 1:57 PM, David Neuhaus wrote:
> Hello.
> 
> I'm getting a compilation failure on openblas-0.3.7-1 during "update all", with the result that the openblas installation remains at 0.3.6-1.  I have been seeing this consistently for a month or more on two machines (early 2009 Mac Pro and mid-2009 MacBook Pro) that are both running OSX 10.11.6 with fink 0.45.0, XCode 8.2.1 and xQuartz 2.7.11 (xorg-server 1.18.4); also, I get the same error whether I use maximum build jobs set to 1 or to 8 (as in the output below).  However, I get no error on a third machine (2017 iMac) that is running OSX 10.13.6 with fink 0.45.0, XCode 10.1 and xQuartz 2.7.11; on that machine openblas was successfully upgraded to 0.3.7-1.  Since I cannot update the OS beyond 10.11.6 on the two machines that show the failure I cannot at present get around this problem. 
  Any help gratefully received.
> 
>   
> 
> Many thanks,
> 
> David Neuhaus.
> 
>   
> 
> I append below the last lines of output showing the compilation failure under OSX 10.11.6:
> 
>   
> 
>   
> 
>   
> 
>   
> 
> gcc-fsf-9 -O2 -mtune=intel -march=core2 -DMAX_STACK_ALLOC=2048 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -DMAX_PARALLEL_NUMBER=1 -DVERSION=\"0.3.7\" -DASMNAME=_ccholesky -DASMFNAME=_ccholesky_ -DNAME=ccholesky_ -DCNAME=ccholesky -DCHAR_NAME=\"ccholesky_\" -DCHAR_CNAME=\"ccholesky\" -DNO_AFFINITY -I.. -c -DCOMPLEX -UDOUBLE -o ccholesky.o cholesky.c
> 
> cholesky.c: In function 'main':
> 
> cholesky.c:176:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
> 
>    176 |    for(i = 0; i < j; i++)     a[i + j * m] = 0.;
> 
>        |    ^~~
> 
> cholesky.c:177:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
> 
>    177 |                               a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.;
> 
>        |                               ^
> 
> cholesky.c: In function 'main':
> 
> cholesky.c:182:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
> 
>    182 |    for(i = 0; i < j; i++)     a[i + j * m] = ((double) rand() / (double) RAND_MAX) - 0.5;
> 
>        |    ^~~
> 
> cholesky.c:176:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
> 
>    176 |    for(i = 0; i < j; i++)     a[i + j * m] = 0.;
> 
>        |    ^~~
> 
> cholesky.c:183:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
> 
>    183 |                               a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.;
> 
>        |                               ^
> 
> cholesky.c:177:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
> 
>    177 |                               a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.;
> 
>        |                               ^
> 
> cholesky.c:182:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
> 
>    182 |    for(i = 0; i < j; i++)     a[i + j * m] = ((double) rand() / (double) RAND_MAX) - 0.5;
> 
>        |    ^~~
> 
> cholesky.c:183:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
> 
>    183 |                               a[j + j * m] = ((double) rand() / (double) RAND_MAX) + 8.;
> 
>        |                               ^
> 
> smallscaling.c: In function 'delta_time':
> 
> smallscaling.c:121:2: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
> 
>    121 |  clock_gettime(CLOCK_MONOTONIC, &tock);
> 
>        |  ^~~~~~~~~~~~~
> 
> smallscaling.c:121:16: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
> 
>    121 |  clock_gettime(CLOCK_MONOTONIC, &tock);
> 
>        |                ^~~~~~~~~~~~~~~
> 
> smallscaling.c:121:16: note: each undeclared identifier is reported only once for each function it appears in
> 
> smallscaling.c: In function 'pthread_bench':
> 
> smallscaling.c:135:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
> 
>    135 |     clock_gettime(CLOCK_MONOTONIC, &tick);
> 
>        |                   ^~~~~~~~~~~~~~~
> 
> smallscaling.c: In function 'seq_bench':
> 
> smallscaling.c:152:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
> 
>    152 |     clock_gettime(CLOCK_MONOTONIC, &tick);
> 
>        |                   ^~~~~~~~~~~~~~~
> 
> 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.

Hanspeter


_______________________________________________
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.