pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: math/blas not compiling due to gcc7 error



On Mon, 24 Aug 2020 at 22:54, Connor McLaughlan <cont6pro3%gmail.com@localhost> wrote:
>
> On Mon, Aug 24, 2020 at 1:36 PM Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> >
> > On Mon, 24 Aug 2020 at 09:30, Connor McLaughlan <cont6pro3%gmail.com@localhost> wrote:
> > >
> > > On Mon, Aug 24, 2020 at 9:29 AM Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> > > >
> > > > On Mon, 24 Aug 2020 at 06:44, Martin Husemann <martin%duskware.de@localhost> wrote:
> > > > >
> > > > > On Sun, Aug 23, 2020 at 09:31:08PM +0200, Connor McLaughlan wrote:
> > > > > > bash-5.0# nm /lib/libm.so |grep cab
> > > > > > 000000000001f300 T __c99_cabs
> > > > > > 000000000001f2e0 T __c99_cabsf
> > > > > > 000000000001f2c0 T __c99_cabsl
> > > > > > 000000000001f340 T cabs
> > > > > > 000000000001f320 T cabsf
> > > > > >
> > > > > > So it seems the problem is cabsl missing in /lib/lim.so which then is
> > > > > > a problem of the base system?
> > > > >
> > > > > The same is true for both amd64 and sparc64 in -current, the symbol used
> > > > > in libm is __c99_cabsl, our <complex.h> has:
> > > > >
> > > > >         long double cabsl(long double complex) __RENAME(__c99_cabsl);
> > > > >
> > > > > but apparently gfortran does not know about that. How does it work on
> > > > > NetBSD/amd64? Or does it fail there just the same?
> > > >
> > > > FWIW I have
> > > >
> > > > PKGSRC_FORTRAN=gfortran
> > > > GFORTRAN_VERSION=8
> > > >
> > > > in /etc/mk.conf and math/blas builds just fine under -current amd64.
> > > >
> > > > >
> > > > > Martin
> > > >
> > > > Chavdar
> > > >
> > >
> > > Does this mean i need to compile/install gcc8?
> > > Will try what happens on sparc64 when i have the time...
> >
> > Don't know, I switched to gfortran8 quite some times ago on somebody's
> > advice; all the maths packages which use it seem to build ok. The blas
> > tests complete as follows:
> > ...
> > 100% tests passed, 0 tests failed out of 12
> > ...
> >
> > The test program is linked so:
> >
> >  ldd work/lapack-3.9.0/obj/bin/xblat2z
> > work/lapack-3.9.0/obj/bin/xblat2z:
> >         -lblas.3 => /usr/pkg/lib/libblas.so.3
> >         -lgfortran.5 => /usr/pkg/gcc8//lib/./libgfortran.so.5
> >         -lquadmath.0 => /usr/pkg/gcc8//lib/./libquadmath.so.0
> >         -lm.0 => /usr/lib/libm.so.0
> >         -lc.12 => /usr/lib/libc.so.12
> >         -lz.1 => /usr/lib/libz.so.1
> >         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
> >
> >
>
> I think you will find /usr/lib/libm.so.0 links to /lib/libm.so

Sure,

> In any case, could you please check with nm if libm.so has "cabsl"?

~ nm /lib/libm.so |grep cab
000000000000d516 T __c99_cabs
000000000000d4ff T __c99_cabsf
000000000001957b T __c99_cabsl
000000000000d52d T cabs
000000000000d51b T cabsf

so, no.

>
> Still trying to figure out if it is a problem of the base system or
> the gfortran configuration.
> But those things linking and symbol things are not exactly my
> expertise, so i'm just trying around.
>
> I also tried gcc8 gfortran by setting it in mk.conf and compiling
> math/blas as suggested.
> gcc8  gets installed and applied, but yields the same cabsl problem again:
>
> bash-5.0# bmake install
> => Bootstrap dependency digest>=20010302: found digest-20190127
> => Checksum SHA1 OK for lapack-3.9.0.tgz
> => Checksum RMD160 OK for lapack-3.9.0.tgz
> => Checksum SHA512 OK for lapack-3.9.0.tgz
> ===> Installing dependencies for blas-3.9.0
> => Tool dependency bsdtar-[0-9]*: found bsdtar-3.4.3
> => Tool dependency cmake>=2.8.1nb1: found cmake-3.17.3

FWIW my cmake is 3.18.1.

> => Build dependency cwrappers>=20150314: found cwrappers-20180325
> => Full dependency gcc8>=8.0: found gcc8-8.4.0
> ===> Skipping vulnerability checks.
> WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
> WARNING: To fix run: `/usr/pkg/sbin/pkg_admin -K /usr/pkg/pkgdb
> fetch-pkg-vulnerabilities'.
> ===> Overriding tools for blas-3.9.0
> ===> Extracting for blas-3.9.0
> ===> Patching for blas-3.9.0
> => Applying pkgsrc patches for blas-3.9.0
> ===> Creating toolchain wrappers for blas-3.9.0
> ===> Configuring for blas-3.9.0
> cd /usr/pkgsrc/math/blas/work/lapack-3.9.0 && /bin/mkdir -p obj
> => Fixing CMAKE_MODULE_PATH in CMakeLists.txt
> -- The Fortran compiler identification is GNU 8.4.0
> -- The C compiler identification is GNU 7.4.0
> -- Check for working Fortran compiler:
> /usr/pkgsrc/math/blas/work/.cwrapper/bin/gfortran
> -- Check for working Fortran compiler:
> /usr/pkgsrc/math/blas/work/.cwrapper/bin/gfortran - broken
> CMake Error at /usr/pkg/share/cmake-3.17/Modules/CMakeTestFortranCompiler.cmake:45
> (message):
>   The Fortran compiler
>
>     "/usr/pkgsrc/math/blas/work/.cwrapper/bin/gfortran"
>
>   is not able to compile a simple test program.
>
>   It fails with the following output:
>
>     Change Dir: /usr/pkgsrc/math/blas/work/lapack-3.9.0/obj/CMakeFiles/CMakeTmp
>
>     Run Build Command(s):/usr/pkg/bin/gmake cmTC_9a3a7/fast && make
> -f CMakeFiles/cmTC_9a3a7.dir/build.make
> CMakeFiles/cmTC_9a3a7.dir/build
>     Building Fortran object CMakeFiles/cmTC_9a3a7.dir/testFortranCompiler.f.o
>     /usr/pkgsrc/math/blas/work/.cwrapper/bin/gfortran   -O -c
> /usr/pkgsrc/math/blas/work/lapack-3.9.0/obj/CMakeFiles/CMakeTmp/testFortranCompiler.f
> -o CMakeFiles/cmTC_9a3a7.dir/testFortranCompiler.f.o
>     Linking Fortran executable cmTC_9a3a7
>     /usr/pkg/bin/cmake -E cmake_link_script
> CMakeFiles/cmTC_9a3a7.dir/link.txt --verbose=1
>     /usr/pkgsrc/math/blas/work/.cwrapper/bin/gfortran  -L/usr/pkg/lib
> -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib  -O
> CMakeFiles/cmTC_9a3a7.dir/testFortranCompiler.f.o  -o cmTC_9a3a7
>     /usr/bin/ld:
> /usr/pkg/gcc8/lib/gcc/sparc64--netbsd/8.4.0/../../../libgfortran.so:
> warning: warning: reference to compatibility cabsf()
>     /usr/bin/ld:
> /usr/pkg/gcc8/lib/gcc/sparc64--netbsd/8.4.0/../../../libgfortran.so:
> warning: warning: reference to compatibility cabs()
>     /usr/bin/ld:
> /usr/pkg/gcc8/lib/gcc/sparc64--netbsd/8.4.0/../../../libgfortran.so:
> undefined reference to `cabsl'
>     collect2: error: ld returned 1 exit status
>     *** Error code 1
>
>     Stop.
>     make[1]: stopped in
> /usr/pkgsrc/math/blas/work/lapack-3.9.0/obj/CMakeFiles/CMakeTmp
>     gmake: *** [Makefile:141: cmTC_9a3a7/fast] Error 1
>
>
>
>
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:3 (project)
>
>
> -- Configuring incomplete, errors occurred!
> See also "/usr/pkgsrc/math/blas/work/lapack-3.9.0/obj/CMakeFiles/CMakeOutput.log".
> See also "/usr/pkgsrc/math/blas/work/lapack-3.9.0/obj/CMakeFiles/CMakeError.log".
> *** Error code 1
>
> Stop.
> bmake[1]: stopped in /usr/pkgsrc/math/blas
> *** Error code 1
>
>
> Regards,
> Connor



-- 
----


Home | Main Index | Thread Index | Old Index