Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] package/gmpc: needs -lm
Date: Tue, 19 Nov 2019 19:42:47 +0100	[thread overview]
Message-ID: <20191119194247.2376e81e@gmx.net> (raw)
In-Reply-To: <CAPi7W83fDiF+iM4FZrPgAXvujqVXMHS66uCjs+s4=9R1F0qVhw@mail.gmail.com>

Hello *,

On Tue, 19 Nov 2019 18:58:03 +0100, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Dear all,
> 
> Le mar. 19 nov. 2019 ? 17:18, Thomas Preston
> <thomas.preston@codethink.co.uk> a ?crit :
> >
> > Hi Thomas Petazzoni, all,
> > Thanks for bringing this to my attention.
> >
> > On 18/11/2019 22:47, Thomas Petazzoni wrote:  
> > > Adding Thomas Preston in the loop. Thomas: one of your patch causes
> > > some regression, see below.
> > >  
> >
> > Before the pkgconf patch, `-lm` somehow made its way into the .la files:
> >
> >         gmpc-11.8.16-before-pkgconf-fix$ grep -lwr "\-lm"
> >         ltmain.sh.orig
> >         ltmain.sh
> >         src/libeggsmclient.la
> >         src/libeggdesktopfile.la
> >         m4/libtool.m4
> >         libtool
> >
> > In addition to this, there are lots of system include and libraries
> > littering the Makefile (which should be handled by --sysroot):
> >
> >         -L/mnt/output/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/lib
> >         -I/mnt/output/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/include
> >
> > After the pkgconf patch, the gmpc build directory more closely resembles
> > building upstream gmpc - which doesn't seem to require `-lm`. So why does
> > it in buildroot?

It is not buildroot specific, but toolchain/libc specific (some implement the math
functions in libc itself, some in the extra libm)....

> >
> > gmpc-11.8.16$ cat fedora.Dockerfile
> > FROM fedora:30
> > RUN dnf install -y @development-tools
> > RUN dnf install -y \
> >         gob2 \
> >         harfbuzz \
> >         harfbuzz-devel \
> >         intltool \
> >         libICE \
> >         libICE-devel \
> >         libmpd-devel \
> >         libSM \
> >         libSM-devel \
> >         libsoup-devel \
> >         libvala \
> >         libvala-devel \
> >         pkgconf \
> >         unique-devel \
> >         vala
> > WORKDIR /mnt
> > CMD "/bin/bash"
> >
> > $ docker build -t build-gmpc - < fedora.Dockerfile
> > $ docker run -it -v$PWD:/mnt build-gmpc ./configure --disable-mmkeys --disable-unique
> > $ docker run -it -v$PWD:/mnt build-gmpc make
> > $ ls -l src/gmpc
> > -rwxr-xr-x 1 root root 5818944 Nov 19 15:52 src/gmpc
> >
> > Seems to work, without a -lm in sight:
> >
> > $ grep -rw "\-lm"
> > ltmain.sh:        # a FreeBSD bug that causes programs to crash when -lm is
> > m4/libtool.m4:  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
> > m4/libtool.m4:  AC_CHECK_LIB(m, cos, LIBM="-lm")
> > libtool:          # a FreeBSD bug that causes programs to crash when -lm is
> >
> > So I don't understand two things:
> > 1. Where did `-lm` in the .la files come from before the pkgconf patch?
> > 2. Why does upsteam gmpc build without `-lm`?  
> This one is easy: we're using the latest release of gmpc that is 8 years old.
> In this release, Math.ceil is used in
> https://github.com/DaveDavenport/gmpc/blob/release-11.8.16/src/Widgets/GmpcVolume.vala.
> Upstream removed this file 6 years ago through
> https://github.com/DaveDavenport/gmpc/commit/11a7d247757dd29b51c77fda7470921fd254aae8#diff-645d920fce926ffdadd85c93c2d2cda2.
> I assume that current gmpc does not use any math functions anymore.

Maybe a workaround for the gmpc case, remains the libvl42/libatomc [1] case which is about
using dependent *.la files vs. ignoring dependent *.la files while linking...

Regards,
Peter

[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html

> 
> Best Regards,
> 
> Fabrice

  parent reply	other threads:[~2019-11-19 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 21:40 [Buildroot] [PATCH 1/2] package/gmpc: needs -lm Fabrice Fontaine
2019-10-29 21:40 ` [Buildroot] [PATCH 2/2] package/gmpc: fix build with NLS Fabrice Fontaine
2019-11-08 21:04 ` [Buildroot] [PATCH 1/2] package/gmpc: needs -lm Thomas Petazzoni
2019-11-08 21:28   ` Peter Seiderer
2019-11-17 19:45     ` Arnout Vandecappelle
2019-11-17 20:20       ` Peter Seiderer
2019-11-17 20:48         ` Peter Seiderer
2019-11-17 20:54           ` Arnout Vandecappelle
2019-11-18 22:42             ` Peter Seiderer
2019-11-18 22:47               ` Thomas Petazzoni
2019-11-19 16:18                 ` Thomas Preston
2019-11-19 17:58                   ` Fabrice Fontaine
2019-11-19 18:31                     ` Thomas Preston
2019-11-19 18:42                     ` Peter Seiderer [this message]
2019-11-21 18:14                       ` Thomas Preston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191119194247.2376e81e@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox