The Asbsoft Fortran 95 compiler for linux is giving an error which started recently in rawhide. Which library is errno in now? Thanks ================================================= f95 -o ../../run/dws.exe grid_def_2d_cyl_v32.o spinor_def_2d_cyl_v24.o special_functions_v12.o dws_v35.o ../spline90/spline90.a /usr/lib/lapack95_intel.a /usr/lib/libmkl_lapack.a /usr/lib/libmkl_p4.a -lf2c -lm -lpthread /usr/absoft/lib/libfio.a(ioerr.o)(.text+0x233): In function `_ioerr': : `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead /usr/absoft/lib/libfio.a(open.o)(.text+0xdbd): In function `_f_open3': : undefined reference to `errno' /usr/absoft/lib/libfio.a(lowlevel.o)(.text+0xf9): In function `_getfile': : undefined reference to `errno' /usr/absoft/lib/libfio.a(lowlevel.o)(.text+0x141): In function `_releasefile': : undefined reference to `errno' /usr/absoft/lib/libfio.a(lowlevel.o)(.text+0x16c): In function `_releasefile': : undefined reference to `errno' /usr/absoft/lib/libfio.a(lowlevel.o)(.text+0x1dc): In function `_f_seek': : undefined reference to `errno' /usr/absoft/lib/libfio.a(lowlevel.o)(.text+0x223): more undefined references to `errno' follow
errno is not a symbol anything should use. All users of errno need to properly #include <errno.h> to get errno definition, seems Asbsoft is broken in this regard and needs to be fixed.
Perhaps the new upgrade fixes it but the same compiler did not give this error until recently. Anyway, if I add /usr/lib/libc.a to the link line it is fixed (not -lc). FYI
*** Bug 80017 has been marked as a duplicate of this bug. ***
It has been intentionally removed from glibc (well, with the exception of TLS enabled glibc build it is kept there for compatibility as runtime only symbol, but newly linked programs aren't allowed to reference it. errno in linux has been *__errno_location() for some 4 years or how long, this is the only way how to get the bugs fixed). With TLS enabled glibc which is going to rawhide RSN it is technically impossible to leave errno in (ld.so will automatically take care of GLIBC 2.0 compiled binaries and libs they use because __errno_location did not exist in there) and for more recent but buggy applications one can use LD_ASSUME_KERNEL=2.2.5 at runtime.
Some info for people with this problem: Absoft provides a patch fixing this bug (in their software). You can download it at http://www.absoft.com/download/pub/linux/profortran8.0/ProFortran80QFIO.tar.gz This is a fix for ProFortran 8.0, but I've tested it also on ProFortran 6.0 and orks
(In reply to comment #5) > Some info for people with this problem: > Absoft provides a patch fixing this bug (in their software). You can download it at > http://www.absoft.com/download/pub/linux/profortran8.0/ProFortran80QFIO.tar.gz > > This is a fix for ProFortran 8.0, but I've tested it also on ProFortran 6.0 and orks After I used the patch which downloaded at http://www.absoft.com/download/pub/linux/profortran8.0/ProFortran80QFIO.tar.gz but when I compiled. the err still exist. My PC is RHAS update2, the version of absoft compiler which I using is 7.5.