Subject: bug#68856: .la file dependency_libs dropping sole -lm dependency

From: Ileana Dumitrescu <[email-masked]>
Date: Wed, 31 Jan 2024 21:28:03 +0200

On 31/01/2024 20:57, Bob Friesenhahn wrote:
 > On Wed, 31 Jan 2024, Bob Friesenhahn wrote:
 >>
 >> bin/bash ./libtool  --tag=CXX --mode=link g++-10 -no-undefined
 >> -export-symbols-regex ".*"  -version-info 27:4:24 -L/usr/local/lib
 >> -Wl,-rpath,/usr/local/lib -o magick/libGraphicsMagick.la -rpath
 >> /usr/local/lib [ list of .lo files ] -lm
 >>
 >> An I misunderstanding something, or is this a bug in libtool?  What am
 >> I missing in order for this to work?
 >
 > As further information on this issue, I tried using '-lm -lm' and there
 > was no change in the results:
 >
 >    # Libraries that this one depends upon.
 >    dependency_libs=' -L/usr/local/lib'
 >
 >
 > Then I tried using '-ljpeg -lm' and I see that the -ljpeg gets added,
 > but not the -lm:
 >
 >    # Libraries that this one depends upon.
 >    dependency_libs=' -L/usr/local/lib -ljpeg'
 >
 >
 > and then I tried using '-lm -jpeg', and I see that there are again no
 > dependency libraries at all:
 >
 >    # Libraries that this one depends upon.
 >    dependency_libs=' -L/usr/local/lib'
 >
 > After testing various permutations, I see that anything starting with
 > '-lm' gets removed in entirety.
 >
 > This same thing happens under Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.
 >
 > Bob

Copied from [email-masked] to [email-masked], since this is
unintended behavior.

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354