[Buildroot] [PATCH 1/2] package/gmpc: needs -lm
Fabrice Fontaine
fontaine.fabrice at gmail.com
Tue Nov 19 17:58:03 UTC 2019
Dear all,
Le mar. 19 nov. 2019 à 17:18, Thomas Preston
<thomas.preston at 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?
>
> 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.
Best Regards,
Fabrice
More information about the buildroot
mailing list