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

David Neuhaus <[email protected]>
Newsgroups gmane.os.apple.fink.beginners
Message-ID <[email protected]>
Hi Derek,

   First up, it is definitely the case that 0.3.6 compiled successfully on (both) my 10.11 machines.  Second, I edited openblas.info as requested (but please see below to check I did it correctly), but unfortunately that didn’t fix the problem - looks like an identical failure.  

   Here are the relevant lines as now edited in openblas.info:
(N.B. this time I did not make the first change you requested first, the "if" block around   export MACOSX_DEPLOYMENT_TARGET="10.$darwin_vers":
Was that correct?  I assumed that was trying a different approach not needed this time).

SetCC: clang

CompileScript: <<
        #!/bin/sh -ev
        # set arch to minimum model supported in OS version
        darwin_vers=$(uname -r | cut -d. -f1)
        if [ "$darwin_vers" -ge 18 ]; then
                        perl -pi -e "s|(COMMON_OPT = -O2)|\$1 -mtune=intel -march=ivybridge|g;" Makefile.system
        else
                        perl -pi -e "s|(COMMON_OPT = -O2)|\$1 -mtune=intel -march=core2|g;" Makefile.system
        fi
        make FC=gfortran-fsf-%type_raw[gcc] USE_THREAD=1 USE_OPENMP=0 libs netlib shared
        cd benchmark
        make FC=gfortran-fsf-%type_raw[gcc] USE_THREAD=1 USE_OPENMP=0 smallscaling veclib goto
        mkdir -m 755 bin
        mv smallscaling *.veclib *.goto bin



Here are the last lines from this last compilation attempt:

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);
      |                   ^~~~~~~~~~~~~~~
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=_zcholesky -DASMFNAME=_zcholesky_ -DNAME=zcholesky_ -DCNAME=zcholesky -DCHAR_NAME=\"zcholesky_\" -DCHAR_CNAME=\"zcholesky\" -DNO_AFFINITY -I.. -c -DCOMPLEX -DDOUBLE -o zcholesky.o cholesky.c
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=_sgemm -DASMFNAME=_sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -c -UCOMPLEX -UDOUBLE -o sgemm.o gemm.c
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=_dgemm -DASMFNAME=_dgemm_ -DNAME=dgemm_ -DCNAME=dgemm -DCHAR_NAME=\"dgemm_\" -DCHAR_CNAME=\"dgemm\" -DNO_AFFINITY -I.. -c -UCOMPLEX -DDOUBLE -o dgemm.o gemm.c
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=_cgemm -DASMFNAME=_cgemm_ -DNAME=cgemm_ -DCNAME=cgemm -DCHAR_NAME=\"cgemm_\" -DCHAR_CNAME=\"cgemm\" -DNO_AFFINITY -I.. -c -DCOMPLEX -UDOUBLE -o cgemm.o gemm.c
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=_zgemm -DASMFNAME=_zgemm_ -DNAME=zgemm_ -DCNAME=zgemm -DCHAR_NAME=\"zgemm_\" -DCHAR_CNAME=\"zgemm\" -DNO_AFFINITY -I.. -c -DCOMPLEX -DDOUBLE -o zgemm.o gemm.c
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=_strmm -DASMFNAME=_strmm_ -DNAME=strmm_ -DCNAME=strmm -DCHAR_NAME=\"strmm_\" -DCHAR_CNAME=\"strmm\" -DNO_AFFINITY -I.. -c -UCOMPLEX -UDOUBLE -o strmm.o trmm.c
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=_dtrmm -DASMFNAME=_dtrmm_ -DNAME=dtrmm_ -DCNAME=dtrmm -DCHAR_NAME=\"dtrmm_\" -DCHAR_CNAME=\"dtrmm\" -DNO_AFFINITY -I.. -c -UCOMPLEX -DDOUBLE -o dtrmm.o trmm.c
make: *** [smallscaling] Error 1
make: *** Waiting for unfinished jobs....
trmm.c: In function 'main':
trmm.c:125:9: warning: unused variable 'beta' [-Wunused-variable]
  125 |   FLOAT beta [] = {1.0, 1.0};
      |         ^~~~
trmm.c: In function 'main':
trmm.c:125:9: warning: unused variable 'beta' [-Wunused-variable]
  125 |   FLOAT beta [] = {1.0, 1.0};
      |         ^~~~
### execution of /tmp/fink.QTBAw failed, exit code 2
### execution of /tmp/fink.__rvF failed, exit code 2
Removing runtime build-lock...
Removing build-lock package...
/sw/bin/dpkg-lockwait -r fink-buildlock-openblas-0.3.7-1
(Reading database ... 201635 files and directories currently installed.)
Removing fink-buildlock-openblas-0.3.7-1 ...
Failed: phase compiling: openblas-0.3.7-1 failed

Before reporting any errors, please run "fink selfupdate" and try again.
Also try using "fink configure" to set your maximum build jobs to 1 and
attempt to build the package again.
If you continue to have issues, please check to see if the FAQ on Fink's 
website solves the problem.  If not, ask on one (not both, please) of
these mailing lists:

	The Fink Users List <[email protected]>
	The Fink Beginners List <[email protected]>,

with a carbon copy to the maintainer:

	Derek Homeier <[email protected]>

Note that this is preferable to emailing just the maintainer directly,
since most fink package maintainers do not have access to all possible
hardware and software configurations.

Please try to include the complete error message in your report.  This
generally consists of a compiler line starting with e.g. "gcc" or "g++"
followed by the actual error output from the compiler.

Also include the following system information:
Package manager version: 0.45.0
Distribution version: selfupdate-git Thu Feb 20 15:02:12 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
Max. Fink build jobs:  8


On 20/02/2020, 16:00, "Homeier, Derek" <[email protected]> wrote:

    Hi David,
    > 
    >  I have not so far been able to find an update for CLT to reach 8.2.1; the only version I see on the Apple Developer site that is listed for use with OSX 10.11 and Xcode 8.2 turns out after re-installation to be the version I already had (8.2.0.0.1.1480973914).  For what it's worth I did see the same version mismatch showing up in at least one message on the fink-beginners archive (https://sourceforge.net/p/fink/mailman/message/35611744), where as far as I could see the mismatch was not related to the problem (but I could well be wrong about that).  I tried editing the install script as you requested even though CLT was not updated (I inserted the new lines immediately after the "if" block that starts "if [ "$darwin_vers" -ge 18 ]"), but that gave the same failure on attempting to compile openblas as before.  If you can guide me to a proper update for CLT I will of course be happy to try again!  Otherwise it's maybe starting to look like restriction might have to be the answer.
    
    I’ve just noticed that version 0.3.8 is out and am testing building that - it is unlikely
    to get us rid of this problem, but maybe I can find some hints how to work around it.
    But did I understand you correctly that the 0.3.6 build succeeded on your 10.11 machine?
    That’s indeed odd, since the entire smallscaling.c with the clock_gettime() call has not
    changed in 4 years. That would really hint to either changes in the compilation options
    I made between 0.3.6 and 0.3.7, or indeed your mismatch in the CLT version.
    But I also remember having similar version mismatches, when there simple was no
    newer version of the CLTs available from Apple…
    
    One more thing I also changed in 0.3.7 was switching to gcc-fsf-9 for the C compilation -
    that because the FSF gfortran is anyway used for the Fortran part, and a few tests were
    giving better results with the FSF C compiler, but generally the compilation with Apple’s
    clang worked just as well. So you might try to switch back to that by simply setting
    
    SetCC: clang
    
    (might seem counterintuitive since it is the CLT clang having the version mismatch,
    but it could be worth just giving a try).
    
    HTH
    				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.