public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gfortran | 9.3.1 missing FINDLOC?
@ 2021-03-28 18:27 Evan Cooch
  2021-03-30 15:08 ` Jim Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Evan Cooch @ 2021-03-28 18:27 UTC (permalink / raw)
  To: gcc-help

Weird one (perhaps). Colleague and I trade back a large slug of FORTRAN 
code -- he is on a Windows machine, running mingw gfortran 9.2. Code 
compiles fine on his end.

But, on my end, no such luck -- I'm on Linux boxes (CentOS 7), running 
gfortran 9.3.1 under scl devtoolset. When I try to compile the exact 
same code, I get a fail at the end -- a few lines referring to a call to 
FINDLOC in one of the modules (something called estmat).

/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: 
estmat.o: in function `filldm.3876': estmat.f90:(.text+0x1201): 
undefined reference to `_gfortran_findloc0_s1'


Was wondering if anyone can give me some advice? Is there a way to 'look 
for' FINDLOC on my box (irony accidental), or (more likely) if there is 
a packaging issue with devtoolkit for CentOS, is there something I can 
do to correct the problem?

Many thanks in advance...


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-28 18:27 gfortran | 9.3.1 missing FINDLOC? Evan Cooch
@ 2021-03-30 15:08 ` Jim Wilson
  2021-03-30 15:11   ` Evan Cooch
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Wilson @ 2021-03-30 15:08 UTC (permalink / raw)
  To: Evan Cooch; +Cc: gcc-help

On Sun, Mar 28, 2021 at 11:28 AM Evan Cooch via Gcc-help <
gcc-help@gcc.gnu.org> wrote:

> Was wondering if anyone can give me some advice? Is there a way to 'look
> for' FINDLOC on my box (irony accidental), or (more likely) if there is
> a packaging issue with devtoolkit for CentOS, is there something I can
> do to correct the problem?
>

findloc0_s1 should be in the libgfortran.so file.  This is a new function
in GCC 9, so maybe you are linking with the wrong library version?  You can
use nm (or nm -D) to look for symbols in a shared library.  You can use
"gcc --print-file-name=libgfortran.so" to find the library file that gcc is
using by default.  The gcc-9 compiler should point at a gcc-9 version of
this library.  You can add -v to a compiler command to see what the
compiler driver is doing, and -Wl,--verbose to see what the linker is
doing, to see exactly which libgfortran.so file that the linker is using.

Jim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-30 15:08 ` Jim Wilson
@ 2021-03-30 15:11   ` Evan Cooch
  2021-03-30 15:22     ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: Evan Cooch @ 2021-03-30 15:11 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gcc-help

On 3/30/2021 11:08 AM, Jim Wilson wrote:
> On Sun, Mar 28, 2021 at 11:28 AM Evan Cooch via Gcc-help 
> <gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org>> wrote:
>
>     Was wondering if anyone can give me some advice? Is there a way to
>     'look
>     for' FINDLOC on my box (irony accidental), or (more likely) if
>     there is
>     a packaging issue with devtoolkit for CentOS, is there something I
>     can
>     do to correct the problem?
>
>
> findloc0_s1 should be in the libgfortran.so file.  This is a new 
> function in GCC 9, so maybe you are linking with the wrong library 
> version?  You can use nm (or nm -D) to look for symbols in a shared 
> library.  You can use "gcc --print-file-name=libgfortran.so" to find 
> the library file that gcc is using by default.  The gcc-9 compiler 
> should point at a gcc-9 version of this library.  You can add -v to a 
> compiler command to see what the compiler driver is doing, and 
> -Wl,--verbose to see what the linker is doing, to see exactly which 
> libgfortran.so file that the linker is using.
>
> Jim
>

Many thanks. That gave me a clue. Turns out that if I statically link 
libgfortran (-static-libgfortran), findloc is found (unavoidable irony). 
But, if I use a dynamic link, it is not staying with the scl env, and is 
using the libgfortran that CentOS 7 (and RHEL 7) defaults to, which is 
<< gcc 9. Which, if I'd stoped to think about it, sort of makes sense.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-30 15:11   ` Evan Cooch
@ 2021-03-30 15:22     ` Jonathan Wakely
  2021-03-30 16:42       ` Evan Cooch
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2021-03-30 15:22 UTC (permalink / raw)
  To: Evan Cooch; +Cc: Jim Wilson, gcc-help

On Tue, 30 Mar 2021 at 16:14, Evan Cooch wrote:
> Many thanks. That gave me a clue. Turns out that if I statically link
> libgfortran (-static-libgfortran), findloc is found (unavoidable irony).
> But, if I use a dynamic link, it is not staying with the scl env, and is
> using the libgfortran that CentOS 7 (and RHEL 7) defaults to, which is
> << gcc 9. Which, if I'd stoped to think about it, sort of makes sense.

If you're using gfortran from devtoolset then linking to the
libgfortran.so from the base OS is the whole point of devtoolset. New
symbols that aren't in the base libgfortran.so are supposed to be
statically linked into the executable. Please open a bug at
bugzilla.redhat.com about this.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-30 15:22     ` Jonathan Wakely
@ 2021-03-30 16:42       ` Evan Cooch
  2021-03-30 17:55         ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: Evan Cooch @ 2021-03-30 16:42 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Jim Wilson, gcc-help



On 3/30/2021 11:22 AM, Jonathan Wakely wrote:
> On Tue, 30 Mar 2021 at 16:14, Evan Cooch wrote:
>> Many thanks. That gave me a clue. Turns out that if I statically link
>> libgfortran (-static-libgfortran), findloc is found (unavoidable irony).
>> But, if I use a dynamic link, it is not staying with the scl env, and is
>> using the libgfortran that CentOS 7 (and RHEL 7) defaults to, which is
>> << gcc 9. Which, if I'd stoped to think about it, sort of makes sense.
> If you're using gfortran from devtoolset then linking to the
> libgfortran.so from the base OS is the whole point of devtoolset. New
> symbols that aren't in the base libgfortran.so are supposed to be
> statically linked into the executable. Please open a bug at
> bugzilla.redhat.com about this.

OK, will do once I've worked out the details.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-30 16:42       ` Evan Cooch
@ 2021-03-30 17:55         ` Jonathan Wakely
  2021-03-30 18:26           ` Evan Cooch
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2021-03-30 17:55 UTC (permalink / raw)
  To: Evan Cooch; +Cc: Jim Wilson, gcc-help

On Tue, 30 Mar 2021 at 17:42, Evan Cooch <evan.cooch@gmail.com> wrote:
>
>
>
> On 3/30/2021 11:22 AM, Jonathan Wakely wrote:
> > On Tue, 30 Mar 2021 at 16:14, Evan Cooch wrote:
> >> Many thanks. That gave me a clue. Turns out that if I statically link
> >> libgfortran (-static-libgfortran), findloc is found (unavoidable irony).
> >> But, if I use a dynamic link, it is not staying with the scl env, and is
> >> using the libgfortran that CentOS 7 (and RHEL 7) defaults to, which is
> >> << gcc 9. Which, if I'd stoped to think about it, sort of makes sense.
> > If you're using gfortran from devtoolset then linking to the
> > libgfortran.so from the base OS is the whole point of devtoolset. New
> > symbols that aren't in the base libgfortran.so are supposed to be
> > statically linked into the executable. Please open a bug at
> > bugzilla.redhat.com about this.
>
> OK, will do once I've worked out the details.

I'm told that this is already fixed in devtoolset-10.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gfortran | 9.3.1 missing FINDLOC?
  2021-03-30 17:55         ` Jonathan Wakely
@ 2021-03-30 18:26           ` Evan Cooch
  0 siblings, 0 replies; 7+ messages in thread
From: Evan Cooch @ 2021-03-30 18:26 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Jim Wilson, gcc-help



On 3/30/2021 1:55 PM, Jonathan Wakely wrote:
> On Tue, 30 Mar 2021 at 17:42, Evan Cooch <evan.cooch@gmail.com> wrote:
>>
>>
>> On 3/30/2021 11:22 AM, Jonathan Wakely wrote:
>>> On Tue, 30 Mar 2021 at 16:14, Evan Cooch wrote:
>>>> Many thanks. That gave me a clue. Turns out that if I statically link
>>>> libgfortran (-static-libgfortran), findloc is found (unavoidable irony).
>>>> But, if I use a dynamic link, it is not staying with the scl env, and is
>>>> using the libgfortran that CentOS 7 (and RHEL 7) defaults to, which is
>>>> << gcc 9. Which, if I'd stoped to think about it, sort of makes sense.
>>> If you're using gfortran from devtoolset then linking to the
>>> libgfortran.so from the base OS is the whole point of devtoolset. New
>>> symbols that aren't in the base libgfortran.so are supposed to be
>>> statically linked into the executable. Please open a bug at
>>> bugzilla.redhat.com about this.
>> OK, will do once I've worked out the details.
> I'm told that this is already fixed in devtoolset-10.

...which, I've heard, won't be available for CentOS 7. And probably not 
CentOS 8 since its gone to a rolling distro model.

Ah well.

Thanks for the update.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-30 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-28 18:27 gfortran | 9.3.1 missing FINDLOC? Evan Cooch
2021-03-30 15:08 ` Jim Wilson
2021-03-30 15:11   ` Evan Cooch
2021-03-30 15:22     ` Jonathan Wakely
2021-03-30 16:42       ` Evan Cooch
2021-03-30 17:55         ` Jonathan Wakely
2021-03-30 18:26           ` Evan Cooch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).