hidden symbol __cpu_model is referenced by DSO
Thomas Koenig
tkoenig@netcologne.de
Sun Nov 25 12:42:00 GMT 2018
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
More information about the Fortran
mailing list