This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Problem with linking step
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: Alessandro Vicini <alessandro dot vicini at sitael dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Mon, 4 Sep 2017 11:34:54 +0200
- Subject: Re: Problem with linking step
- Authentication-results: sourceware.org; auth=none
- References: <1504274730.107065.ezmlm@gcc.gnu.org> <32ae06249ab041f8a53f9ce16bde9a57@mail.angeloinv.net> <6c471e29-7240-5f3b-1399-0f2a0e6c3386@netcologne.de>
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