hidden symbol __cpu_model is referenced by DSO

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

hidden symbol __cpu_model is referenced by DSO

NightStrike
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80600

I am running 8.2.0 on linux, and I see this same problem with a basic
hello world:

$ cat a.f90
program hello
  print *, "hello"
end program

$ gfortran a.f90
/opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
a.out: hidden symbol `__cpu_model' in
/opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc.a(cpuinfo.o)
is referenced by DSO
/opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status


Any idea how to go about troubleshooting this?
Reply | Threaded
Open this post in threaded view
|

Re: hidden symbol __cpu_model is referenced by DSO

Thomas Koenig-6
Hi NightStrike,

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80600
>
> I am running 8.2.0 on linux, and I see this same problem with a basic
> hello world:
>
> $ cat a.f90
> program hello
>    print *, "hello"
> end program
>
> $ gfortran a.f90
> /opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> a.out: hidden symbol `__cpu_model' in
> /opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc.a(cpuinfo.o)
> is referenced by DSO
> /opt/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> final link failed: Bad value
> collect2: error: ld returned 1 exit status
>
>
> Any idea how to go about troubleshooting this?

I've had a look at the PR, and it seems there is some problem
about shared / non-shared values of __cpu_model.

I think your best bet would be to re-open the PR and add the
appropriate info there - how you configured your compiler,
output of gfortran -v, etc.

One think that you could try as a workaround would be to
specify -static-libgcc.

Regards

        Thomas