Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2017 09:20:26 +0300
From:      Gleb Popov <6yearold@gmail.com>
To:        FreeBSD ports list <freebsd-ports@freebsd.org>
Subject:   Using blaslapack
Message-ID:  <CALH631=mEn2p2cmE7t7cWsoDpJceEjFgd_sE2eMe3QRUqx=iDA@mail.gmail.com>
In-Reply-To: <CALH631=c%2BoSuS6=J7G3r8njAmVBQG_oeBb=7EtEZvoO2t=c=zA@mail.gmail.com>
References:  <CALH631nHU9ZSkJKx4ptgcRTDASmi7UnMnjPGHWtaWEEK_Y-8hw@mail.gmail.com> <CALH631=-3haPigeWHeg0807xxmdTzCZh2=tGgpUQVWcGwv8AhQ@mail.gmail.com> <CALH631=aZFViQRfMggDW41U9ki8ijPLxj6sULdZCmwXdWKCpuA@mail.gmail.com> <CALH631mO4jvWn6h-qBdkGfD_%2B5myY18ji0KymvY0_4d_TdhGZg@mail.gmail.com> <CALH631kWrjR%2Bys=3xkvVH36iu=9YFtoKMPfEQC-0uMQZG%2BabYw@mail.gmail.com> <CALH631kYomNBjz-_yOJKY5J_3MwqeNAWenmsNph5r4z-OSUsyA@mail.gmail.com> <CALH631m88eccXqw_X2kFaa4jeSNR5pf46=S-n4%2B79NDC3nKrMA@mail.gmail.com> <CALH631n=7akSdi9%2BPRkQAaJGPzd_vA4KC7q%2B_t1Vz%2Br16EbRyg@mail.gmail.com> <CALH631kPJ_ZZYqAHqr=wwD-E8v1nP9B9WSLE68F3sHgjWd2-Mw@mail.gmail.com> <CALH631kUxfKYLe9zs8icYKtSJ9eyjNLFErGMvODqFPorR7-6FQ@mail.gmail.com> <CALH631nj8OhDJdGrbq%2B-YBdVPjmVtb6eyumPX5fakTjUVdEiUg@mail.gmail.com> <CALH631nkZ4ZxJ1RM%2BZHmhB702Bn6pY-Wog4ZBE7pu9mqBy29hg@mail.gmail.com> <CALH631m7ow1%2Bho-F3WZL-%2BH4xtuh3nuDqSn1iy6ahT5%2Bg7Jg1Q@mail.gmail.com> <CALH631nHbaDo2nYmJ1kmNzY9vR0ZseOoVzLxKNwrF5uO%2B%2B7KUg@mail.gmail.com> <CALH631kiVycknq8NNEu-CemJkEZoTzchgFQoqyk7d88Q2Bjsmg@mail.gmail.com> <CALH631nWkhedW5s=8R-GWZnZ3fsYM4hVN=yXXMe2QFo8vc4KDw@mail.gmail.com> <CALH631k2kAs0qtz36XvY=c2xcsrgetriA_iNqQMhavxTtES1=g@mail.gmail.com> <CALH631=YD2qoTNDh6r%2B0%2Bb-OzADEC-8F9HAQ4uoOWZuPw44zjA@mail.gmail.com> <CALH631mDpr2VFoVnxB5oegkL5UdNmRvmv7i_ZNMfQLLHB=KbUQ@mail.gmail.com> <CALH631=VdJd78ixjGJg1=N=LphTyiBbpk2GAnR34m42EUzdy1Q@mail.gmail.com> <CALH631=NSpx76EVVHWMBtGAKTWzD_nfU5EPUH5EwOkPXaBVRAA@mail.gmail.com> <CALH631kvLSZpRmcVg_zrXTq105zs97LdUvqgXh6QPv64x=U-Tg@mail.gmail.com> <CALH631kYp-7HcGwoeTtzrF%2BZhW4b8c6O-GpCQMLj2JuyWBLUfA@mail.gmail.com> <CALH631=0aW8Ag_khWBUyDE=3kJoHt9zC75YXkqiFXxiHrzo8cA@mail.gmail.com> <CALH631nw1pqoDewgHpm_SQYWa490WiGdYdhqo3tNfiHK_uiPCw@mail.gmail.com> <CALH631=c%2BoSuS6=J7G3r8njAmVBQG_oeBb=7EtEZvoO2t=c=zA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello.

I'm porting an application (DLib, https://reviews.freebsd.org/D12559) that
uses BLAS and LAPACK, and I have some questions.

1. Is there any pure C implementation that does not require Fortran
compiler?

2. My application looks for cblas_ddot function in BLAS library, but the
default library (netlib) doesn't seem to have that. It has ddot, though, so
I'm not sure if it is a wrong check on app's side, or netlib is indeed
doesn't suit there. For now I've used openblas, but I'm also not sure if it
is a right choice.

3. How to link properly to any of BLAS libraries? All BLAS implementations
blaslapack.mk features require Fortran. This implies USE_GCC=yes, so these
are compiled with GCC, not Clang. Now when I try to link Clang-compiled
DLib to GCC-compiled openblas, I get undefined references:

//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__getf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatunditf@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__subtf3@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__multf3@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__unordtf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__lttf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__addtf3@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__gttf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__divtf3@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__letf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__netf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatditf@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__eqtf2@GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatsitf@GCC_4.6.0'

I've tracked these symbols to /usr/local/lib/gcc6/libgcc_s.so. But there is
also /usr/lib/libgcc_s.so and it doesn't have such symbols. I suspect this
is the source of the error, but I wasn't able to fix it. Passing -Wl,-rpath
as advised by lang/gcc6 pkg-message doesn't help. The only workaround I
came up with is USE_GCC=yes to compile DLib itself, but that's pretty
unsatisfactory.

Thanks in advance.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631=mEn2p2cmE7t7cWsoDpJceEjFgd_sE2eMe3QRUqx=iDA>