Re: dh_shlibdeps warnings concerning undefined OpenMP symbols
- To: email@example.com
- Subject: Re: dh_shlibdeps warnings concerning undefined OpenMP symbols
- From: Dmitry Katsubo <firstname.lastname@example.org>
- Date: Tue, 05 Apr 2011 10:12:56 +0200
- Message-id: <[🔎] 4D9ACF08.email@example.com>
- In-reply-to: <20110331201630.GA9414@jwilk.net>
- References: <4D94A68E.firstname.lastname@example.org> <20110331162023.GA19489@debian.org> <4D94D795.email@example.com> <20110331200907.GD10817@crustytoothpaste.ath.cx> <20110331201630.GA9414@jwilk.net>
On 31.03.2011 22:16, Jakub Wilk wrote:
>> You do need -lgomp.
> You normally don't (need to) link to gomp explicitly. My wild guess is:
> Dmitry used -fopenmp while compiling *.o, but not when linking the
> shared library.
Exactly! Thank you, Jakub, for nice guess.
AC_OPENMP() macro documentation looks to be a bit incomplete (e.g. if it
provides $OPENMP_LDFLAGS I wouldn't mess things), so I believe the
correct sequence looks like this:
On 01.04.2011 14:47, Jakub Wilk wrote:
> I don't think there's anything wrong with this macro. CXXFLAGS should be
> used both for compiling and linking. At least this is what GNU make do
> by default:
> $ make -p 2>/dev/null | grep 'LINK.cc = '
> LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
Thank you! It looks like I need to use $(LINK.cc) to link the .so library.
I also was suggested this resource:
which explains that this warning is raised, when the dependency chain is
like "A -> B -> C", and A needs symbols from C, but has no direct
dependency "A -> C" (which should be introduced as Brian also mentioned).
Thanks a lot for help to everyone!
With best regards,