package/gmpc: needs -lm
PATCH 1/2 package/gmpc: needs -lm
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0' /home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command line
Fixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4
--- package/gmpc/gmpc.mk | 1 + 1 file changed, 1 insertion(+)
package/gmpc/gmpc.mk +1 -0
@@ -14,5 +14,6 @@ GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkgconf host-vala \ libglib2 libgtk2 libmpd libsoup sqlite \ xlib_libICE xlib_libSM xlib_libX11 \ $(TARGET_NLS_DEPENDENCIES) +GMPC_CONF_ENV = LIBS=-lm $(eval $(autotools-package))
Signature · 1 line
2.23.0
PATCH 2/2 package/gmpc: fix build with NLS
Fixes:
- http://autobuild.buildroot.net/results/3de60bd9a9f8f2ad94a7d12e03263cdaea918251
--- package/gmpc/gmpc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gmpc/gmpc.mk +1 -1
@@ -14,6 +14,6 @@ GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkgconf host-vala \ libglib2 libgtk2 libmpd libsoup sqlite \ xlib_libICE xlib_libSM xlib_libX11 \ $(TARGET_NLS_DEPENDENCIES) -GMPC_CONF_ENV = LIBS=-lm +GMPC_CONF_ENV = LIBS="-lm $(TARGET_NLS_LIBS)" $(eval $(autotools-package))
Signature · 1 line
2.23.0
PATCH 1/2 package/gmpc: needs -lm
In reply to Fabrice FontaineQuoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>
We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 package/gmpc: needs -lm
Hello Fabrice, Thomas,
Quoted 11 lines · Thomas Petazzoni
Quoted 8 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4
Quoted 7 lines
Quoted 1 line
Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
Regards,
Peter
[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 8 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Thanks!
Thomas
PATCH 1/2 package/gmpc: needs -lm
Quoted 22 lines · Peter Seiderer
Hello Fabrice, Thomas,
Quoted 18 lines · Thomas Petazzoni
Quoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
And this one because of PIC_PIE.
Regards,
Arnout
Quoted 20 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 8 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Thanks!
Thomas
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/gmpc: needs -lm
Hello Arnout,
Quoted 24 lines · Arnout Vandecappelle
Quoted 22 lines · Peter Seiderer
Hello Fabrice, Thomas,
Quoted 18 lines · Thomas Petazzoni
Quoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
Quoted 7 lines
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
And this one because of
PIC_PIE.
Any hints to one/more related commits (so I can check by reverting if it changes/fix the problems)?
Are the RELRO/PIC_PIE options related to evaluating *.la files?
Regards,
Peter
Quoted 28 lines
Regards,
ArnoutQuoted 11 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 5 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Quoted 9 lines
Quoted 3 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/gmpc: needs -lm
Hello *,
Quoted 34 lines · Peter Seiderer
Hello Arnout,
Quoted 30 lines · Arnout Vandecappelle
Quoted 22 lines · Peter Seiderer
Hello Fabrice, Thomas,
Quoted 18 lines · Thomas Petazzoni
Quoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
Quoted 6 lines
Quoted 1 line
And this one because of
PIC_PIE.Any hints to one/more related commits (so I can check by reverting if it changes/fix the problems)?
Are the RELRO/PIC_PIE options related to evaluating *.la files?
Did a quick search by the date (October 21, 2019) and the info from the libv4l case [1] and would suspect the commit 'pkgconf: Add pkgconf system lib and include path' [2], will do a test with this commit reverted....
Regards,
Peter
[2] https://git.buildroot.net/buildroot/commit/?id=9cc8680fe54c0b8f5008158e36e2157127f03a7e
Quoted 37 lines
Regards,
PeterQuoted 24 lines
Regards,
ArnoutQuoted 11 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 5 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Quoted 9 lines
Quoted 3 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/gmpc: needs -lm
Quoted 40 lines · Peter Seiderer
Hello *,
Quoted 36 lines · Peter Seiderer
Hello Arnout,
Quoted 31 lines · Arnout Vandecappelle
Quoted 22 lines · Peter Seiderer
Hello Fabrice, Thomas,
Quoted 18 lines · Thomas Petazzoni
Quoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
And this one because of
PIC_PIE.
Quoted 8 lines
Quoted 4 lines
Any hints to one/more related commits (so I can check by reverting if it changes/fix the problems)?
Are the RELRO/PIC_PIE options related to evaluating *.la files?
Did a quick search by the date (October 21, 2019) and the info from the libv4l case [1] and would suspect the commit 'pkgconf: Add pkgconf system lib and include path' [2], will do a test with this commit reverted....
Good point. Also there's a failure without PIC_PIE or RELRO [3].
Regards,
Arnout
Quoted 5 lines
Regards,
Peter[2] https://git.buildroot.net/buildroot/commit/?id=9cc8680fe54c0b8f5008158e36e2157127f03a7e
[3]
http://autobuild.buildroot.net/results/e7f/e7f37080c20e2131613517c3007b4569c28dbcf2
Quoted 39 lines
Quoted 38 lines
Regards,
PeterQuoted 24 lines
Regards,
ArnoutQuoted 11 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 5 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Quoted 9 lines
Quoted 3 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/gmpc: needs -lm
Hello *,
Quoted 44 lines · Arnout Vandecappelle
Quoted 43 lines · Peter Seiderer
Hello *,
Quoted 39 lines · Peter Seiderer
Hello Arnout,
Quoted 24 lines · Arnout Vandecappelle
Quoted 22 lines · Peter Seiderer
Hello Fabrice, Thomas,
Quoted 18 lines · Thomas Petazzoni
Quoted 9 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
Quoted 7 lines
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
And this one because of
PIC_PIE.Any hints to one/more related commits (so I can check by reverting if it changes/fix the problems)?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Are the RELRO/PIC_PIE options related to evaluating *.la files?
Did a quick search by the date (October 21, 2019) and the info from the libv4l case [1] and would suspect the commit 'pkgconf: Add pkgconf system lib and include path' [2], will do a test with this commit reverted....
Good point. Also there's a failure without
PIC_PIEor RELRO [3].
Can confirm, reverting [2] fixes the libv4l and the gmpc linking problems...
Regards,
Peter
Quoted 57 lines
Regards,
ArnoutQuoted 5 lines
Regards,
Peter[2] https://git.buildroot.net/buildroot/commit/?id=9cc8680fe54c0b8f5008158e36e2157127f03a7e
[3]
http://autobuild.buildroot.net/results/e7f/e7f37080c20e2131613517c3007b4569c28dbcf2Quoted 34 lines
Quoted 34 lines
Regards,
PeterQuoted 28 lines
Regards,
ArnoutQuoted 11 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2019-October/264928.html
Quoted 5 lines
I think I already asked this in the past: when you fix an issue, don't just fix the issue, but explain why the issue is happening, especially in situations like these.
Quoted 9 lines
Quoted 3 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootQuoted 5 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/gmpc: needs -lm
Hello,
Adding Thomas Preston in the loop. Thomas: one of your patch causes some regression, see below.
Quoted 32 lines · On Mon, 18 Nov 2019 23:42:38 +0100 Peter Seiderer <[email protected]> wrote:
Quoted 32 lines
Quoted 32 lines
Quoted 31 lines
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines · On Tue, 29 Oct 2019 22:40:45 +0100 Fabrice Fontaine…
gmpc forgets to link with -lm:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/../../../../mips-linux-gnu/bin/ld: GmpcVolume.o: undefined reference to symbol 'ceil@@GLIBC_2.0'/home/buildroot/autobuild/instance-2/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/lib64/libm.so.6: error adding symbols: DSO missing from command lineFixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Signed-off-by Fabrice Fontaine <[email protected]>We need to understand why this is happening now. This package has not been modified since July 2017, but suddenly, on October 21, 2019, it started failing like this. Why? Was there a change in one of the dependencies, that is no longer linked with libm, and that causes this problem ?
Quoted 7 lines
It started because of RELRO, I think.
Quoted 3 lines
Maybe the same cause/problem as in the libv4l case regarding libatomic, evaluating vs. not evaluationg the *.la files (see [1])?
And this one because of
PIC_PIE.Any hints to one/more related commits (so I can check by reverting if it changes/fix the problems)?
Are the RELRO/PIC_PIE options related to evaluating *.la files?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Did a quick search by the date (October 21, 2019) and the info from the libv4l case [1] and would suspect the commit 'pkgconf: Add pkgconf system lib and include path' [2], will do a test with this commit reverted....
Good point. Also there's a failure without
PIC_PIEor RELRO [3].Can confirm, reverting [2] fixes the libv4l and the gmpc linking problems...
Thanks for the investigation Peter!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 package/gmpc: needs -lm
Hi Thomas Petazzoni, all,
Thanks for bringing this to my attention.
Quoted 3 lines · Thomas Petazzoni
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 \
valaWORKDIR /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?
PATCH 1/2 package/gmpc: needs -lm
Dear all,
Le mar. 19 nov. 2019 ? 17:18, Thomas Preston
<[email protected]> a ?crit :
Quoted 65 lines
Hi Thomas Petazzoni, all,
Thanks for bringing this to my attention.Quoted 3 lines · Thomas Petazzoni
Adding Thomas Preston in the loop. Thomas: one of your patch causes some regression, see below.
Before the pkgconf patch,
-lmsomehow 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 libtoolIn 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/includeAfter 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-toolsRUN dnf install -y \ gob2 \ harfbuzz \ harfbuzz-devel \ intltool \ libICE \ libICE-devel \ libmpd-devel \ libSM \ libSM-devel \ libsoup-devel \ libvala \ libvala-devel \ pkgconf \ unique-devel \ valaWORKDIR /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/gmpcSeems 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
Quoted 3 lines
So I don't understand two things:
1. Where did-lmin 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
PATCH 1/2 package/gmpc: needs -lm
Quoted 11 lines · Fabrice Fontaine
Le mar. 19 nov. 2019 ? 17:18, Thomas Preston
<[email protected]> a ?crit :Quoted 3 lines
So I don't understand two things:
1. Where did-lmin 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.
Ah, when I said upstream I actually meant "the gmpc-11.8.16 tar from upstream", as opposed to building within the Buildroot environment. I should have been more clear.
There are no -lm flags:
gmpc-11.8.16$ grep -lwr "\-lm" ltmain.sh m4/libtool.m4 libtool
But I can successfully build gmpc:
gmpc-11.8.16$ strings src/gmpc | grep ceil lceil rceil
This is outside of buildroot.
Maybe we should focus on building the latest development version of gmpc from github?
To be clear, I don't think the pkgconf patch has caused a regression, I think that gmpc in buildroot is broken. Although, I'm still trying to build a solid case for this.
PATCH 1/2 package/gmpc: needs -lm
In reply to Fabrice FontaineHello *,
Quoted 32 lines · Fabrice Fontaine
Dear all,
Le mar. 19 nov. 2019 ? 17:18, Thomas Preston
<[email protected]> a ?crit :Quoted 28 lines
Hi Thomas Petazzoni, all,
Thanks for bringing this to my attention.Quoted 3 lines · Thomas Petazzoni
Adding Thomas Preston in the loop. Thomas: one of your patch causes some regression, see below.
Before the pkgconf patch,
-lmsomehow 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 libtoolIn 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/includeAfter 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)....
Quoted 40 lines
Quoted 37 lines
gmpc-11.8.16$ cat fedora.Dockerfile
FROM fedora:30
RUN dnf install -y @development-toolsRUN dnf install -y \ gob2 \ harfbuzz \ harfbuzz-devel \ intltool \ libICE \ libICE-devel \ libmpd-devel \ libSM \ libSM-devel \ libsoup-devel \ libvala \ libvala-devel \ pkgconf \ unique-devel \ valaWORKDIR /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/gmpcSeems 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 isQuoted 3 lines
So I don't understand two things:
1. Where did-lmin the .la files come from before the pkgconf patch?
2. Why does upsteam gmpc build without-lm?
Quoted 6 lines
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
Quoted 4 lines
Best Regards,
Fabrice
PATCH 1/2 package/gmpc: needs -lm
Quoted 87 lines · Peter Seiderer
Hello *,
Quoted 32 lines · Fabrice Fontaine
Dear all,
Le mar. 19 nov. 2019 ? 17:18, Thomas Preston
<[email protected]> a ?crit :Quoted 28 lines
Hi Thomas Petazzoni, all,
Thanks for bringing this to my attention.Quoted 3 lines · Thomas Petazzoni
Adding Thomas Preston in the loop. Thomas: one of your patch causes some regression, see below.
Before the pkgconf patch,
-lmsomehow 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 libtoolIn 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/includeAfter 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)....
Quoted 40 lines
Quoted 37 lines
gmpc-11.8.16$ cat fedora.Dockerfile
FROM fedora:30
RUN dnf install -y @development-toolsRUN dnf install -y \ gob2 \ harfbuzz \ harfbuzz-devel \ intltool \ libICE \ libICE-devel \ libmpd-devel \ libSM \ libSM-devel \ libsoup-devel \ libvala \ libvala-devel \ pkgconf \ unique-devel \ valaWORKDIR /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/gmpcSeems 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 isQuoted 3 lines
So I don't understand two things:
1. Where did-lmin the .la files come from before the pkgconf patch?
2. Why does upsteam gmpc build without-lm?Quoted 6 lines
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.
Quoted 3 lines
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...
The gmpc package appears to be fixed with the same kind of patch as libv4l:
diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk index 40b77eb189..9c725db39d 100644 --- a/package/gmpc/gmpc.mk +++ b/package/gmpc/gmpc.mk @@ -6,7 +6,8 @@ GMPC_VERSION = 11.8.16 GMPC_SITE = http://download.sarine.nl/Programs/gmpc/$(GMPC_VERSION) -GMPC_CONF_ENV = ac_cv_path_GOB2=$(GOB2_HOST_BINARY) +GMPC_CONF_ENV = ac_cv_path_GOB2=$(GOB2_HOST_BINARY) \ + PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 GMPC_CONF_OPTS = --disable-mmkeys --disable-unique GMPC_LICENSE = GPL-2.0+ GMPC_LICENSE_FILES = COPYING
This is because this package uses libtool, which expects to find .la files in the system library dir.
Another solution might be to configure the main pkg-config wrapper so that it always includes the system lib dirs (for libtool), but not system include dirs (which breaks -isystem ordering).