* [Buildroot] [PATCH 1/1] fixes build crash when building systemd with linux-pam, described in more detail here <http://narkive.com/0RdHHA6A>
[not found] <20170906145409.1085-1-charles@ccxtechnologies.com>
@ 2017-09-06 18:23 ` Yann E. MORIN
[not found] ` <CAAV4SYaGDc79SQ7ONFvkGi_Hsw_4GXHSWwhAJ2ChkTKAcp9hZA@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2017-09-06 18:23 UTC (permalink / raw)
To: buildroot
Charles, All,
Thanks for this patch.
However, I have a few comments about it.
First, the commit log should something like:
package/systemd: fix build against libpam
When built against libpam on Gentoo, systemd fails because it tries
to link against the system's libpam:
/home/ymorin/dev/buildroot/O/host/opt/ext-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold:
error: /lib/libpam.so: incompatible target
/home/ymorin/dev/buildroot/O/host/opt/ext-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.3.1/../../../../arm-linux-gnueabihf/bin/ld.gold:
error: /lib/libpam_misc.so: incompatible target
collect2: error: ld returned 1 exit status
We fix that by telling configure weherfe the sysroot is.
Signed-off-by: Your Name <your@email>
However, this fix is a bit fishy to me, I don't like it. We should not
have to specify the sysroot as the compiler already knows it. And
indeed, on a Debian or Ubuntu, as wel as on Fedora, this is not needed.
But as you can see above, I was also able to reproduce this build
failure on a (minimalist) Gentoo system as well, so the issue does
exist, indeed. That is utterly weird... :-(
So, here is the full build command that fails:
>>> systemd 234 Building
PATH="/home/ymorin/dev/buildroot/O/host/bin:/home/ymorin/dev/buildroot/O/host/sbin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0"
/usr/bin/make -j1 -C /home/ymorin/dev/buildroot/O/build/systemd-234/
/usr/bin/make --no-print-directory all-recursive
Making all in .
/bin/sh ./libtool --tag=CC --mode=link
/home/ymorin/dev/buildroot/O/host/bin/arm-linux-gnueabihf-gcc
-D__SANE_USERSPACE_TYPES__ -pipe -Wall -Wextra -Wundef -Wlogical-op
-Wmissing-include-dirs -Wold-style-definition -Wpointer-arith
-Winit-self -Wdeclaration-after-statement -Wfloat-equal
-Wsuggest-attribute=noreturn -Werror=missing-prototypes
-Werror=implicit-function-declaration -Werror=missing-declarations
-Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2
-Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow
-Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter
-Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness
-Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common
-fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden
-fstack-protector -fstack-protector-strong -fPIE
--param=ssp-buffer-size=4 -Werror=shadow -flto -ffunction-sections
-fdata-sections
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/libmount
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/blkid
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/uuid
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-fno-lto -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro
-Wl,-z,now -pie -Wl,-fuse-ld=gold
-o systemd-analyze src/analyze/systemd_analyze-analyze.o
src/analyze/systemd_analyze-analyze-verify.o libcore.la
libtool: link: /home/ymorin/dev/buildroot/O/host/bin/arm-linux-gnueabihf-gcc
-D__SANE_USERSPACE_TYPES__ -pipe -Wall -Wextra -Wundef -Wlogical-op
-Wmissing-include-dirs -Wold-style-definition -Wpointer-arith
-Winit-self -Wdeclaration-after-statement -Wfloat-equal
-Wsuggest-attribute=noreturn -Werror=missing-prototypes
-Werror=implicit-function-declaration -Werror=missing-declarations
-Werror=return-type -Werror=incompatible-pointer-types
-Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn
-Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result
-Wno-format-signedness -Werror=overflow -Wdate-time -Wnested-externs
-ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing
-fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE
--param=ssp-buffer-size=4 -Werror=shadow -flto -ffunction-sections
-fdata-sections
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/libmount
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/blkid
-I/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/uuid
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-fno-lto -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z
-Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=gold -o systemd-analyze
src/analyze/systemd_analyze-analyze.o
src/analyze/systemd_analyze-analyze-verify.o
./.libs/libcore.a
/home/ymorin/dev/buildroot/O/build/systemd-234/.libs/libsystemd-shared.so
-L/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -lcap
-lresolv/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libblkid.so
/lib/libpam.so
/lib/libpam_misc.so
/home/ymorin/dev/buildroot/O/build/linux-pam-1.3.0/libpam/.libs/libpam.so
-ldl
/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libkmod.so
/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libmount.so
/home/ymorin/dev/buildroot/O/build/util-linux-2.30.1/.libs/libblkid.so
/home/ymorin/dev/buildroot/O/build/util-linux-2.30.1/.libs/libuuid.so-lrt
-pthread
-Wl,-rpath -Wl,/home/ymorin/dev/buildroot/O/build/systemd-234/.libs
-Wl,-rpath -Wl,/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
-Wl,-rpath -Wl,/home/ymorin/dev/buildroot/O/build/linux-pam-1.3.0/libpam/.libs
-Wl,-rpath -Wl,/home/ymorin/dev/buildroot/O/build/util-linux-2.30.1/.libs
-Wl,-rpath -Wl,/lib/systemd
-Wl,-rpath -Wl,/home/ymorin/dev/buildroot/O/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
OK, so we see that it is using /lib/libpam.so. This should not happen,
indeed. Sigh... I'll try to sse if Gentoo is doing something weird
somewhere...
But the patch is definitely no-good (or we would have to add it to all
autotols packages, which we don't).
Regards,
Yann E. MORIN.
On 2017-09-06 10:54 -0400, Charles Eidsness spake thusly:
> Signed-off-by: Charles Eidsness <charles@ccxtechnologies.com>
> ---
> package/systemd/systemd.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 9f286fd54..f15946e8a 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -26,6 +26,7 @@ SYSTEMD_DEPENDENCIES += busybox
> endif
>
> SYSTEMD_CONF_OPTS += \
> + --with-sysroot=$(STAGING_DIR) \
> --with-rootprefix= \
> --enable-blkid \
> --enable-static=no \
> --
> 2.14.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] fixes build crash when building systemd with linux-pam, described in more detail here <http://narkive.com/0RdHHA6A>
[not found] ` <CAAV4SYaGDc79SQ7ONFvkGi_Hsw_4GXHSWwhAJ2ChkTKAcp9hZA@mail.gmail.com>
@ 2017-09-06 19:10 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2017-09-06 19:10 UTC (permalink / raw)
To: buildroot
Charles, All,
On 2017-09-06 14:48 -0400, Charles Eidsness spake thusly:
> It also fails in Arch Linux.
This is interesting to know.
> There are other packages with the same setting, binutils, gcc,
> gutenprint, and thrift.
For gcc and binutils, this is expected and normal: those are components
of the toolcahin, and passing --with-sysroot to them is what makes it
useless to pass to all other packages.
For gutenprint, it's been there since the package was added, with no
explanation why it was needed. It's not much better for thrift, added at
about the same time.
> Maybe it should be set for all autotools
> packages.
I don't think so... If at all, it should be removed from thrift and
gutenprint.
> The issue is that lt_sysroot isn't being set in the libtool script for
> systemd.
Yes, I believe this is a libtool issue.
> It's cool if you find a better way to fix this issue, I have a fix that
> will let me built so I'm happy.
Yes, I am looking into that.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-06 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170906145409.1085-1-charles@ccxtechnologies.com>
2017-09-06 18:23 ` [Buildroot] [PATCH 1/1] fixes build crash when building systemd with linux-pam, described in more detail here <http://narkive.com/0RdHHA6A> Yann E. MORIN
[not found] ` <CAAV4SYaGDc79SQ7ONFvkGi_Hsw_4GXHSWwhAJ2ChkTKAcp9hZA@mail.gmail.com>
2017-09-06 19:10 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox