This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with linking step


On Sun, Sep 3, 2017 at 11:58 AM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hi Allesandro,
>
>> gcc-6 -static-libgcc -o myprogram.exe myprogram.o  $(GRAPHIC_LIBS)
>> -Wl,-Bstatic -lgfortran -lquadmath -lgomp -Wl,-Bdynamic  -lm
>>
>> This works fine.
>> However, when I move under a Suse Sles12 system, I get the following
>> error:
>>
>> /usr/x86_64-suse-linux/bin/ld:
>> /usr/lib64/gcc/x86_64-suse-linux/7/libgomp.a(target.o): undefined reference
>> to symbol 'dlclose@@GLIBC_2.2.5'
>> /lib64/libdl.so.2: error adding symbols: DSO missing from command line
>> collect2: error: ld returned 1 exit status
>
>
> Like I wrote on c.l.f., this seems to be an OpenSuse issue,
> gfortran compiled from sources doesn't exhibit this
> behavior.
>
>
> See https://bugzilla.opensuse.org/show_bug.cgi?id=1056956 .

This is due to plugins of libgomp not being disabled for the static build.
I suppose you won't get any offloading support in a static libgomp.

Please file a GCC bug.

Richard.

> Regards
>
>         Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]