* [ptxdist] util-linux build error with meson and older glibc
@ 2024-09-10 7:07 Alexander Dahl
2024-09-10 10:00 ` Michael Olbrich
2024-09-10 10:45 ` Karel Zak
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Dahl @ 2024-09-10 7:07 UTC (permalink / raw)
To: util-linux, ptxdist
Hello everyone,
building util-linux with ptxdist [1] here. After switching to meson
build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
which contains gcc-10.2.1 and glibc-2.32. Building for architecture
arm-v5te-linux-gnueabi here, console output below.
Autotools build was fine. Build with a more recent toolchain
(OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful.
From looking at the linker options I suspect -lutil missing?
According to manpage that's a BSD function present in glibc.
I suspect a change in glibc 2.34 integrating libutil in core glibc,
which makes it work with recent version 2.37. So this is probably a
flaw in meson build not setting the necessary linker options for glibc
up to 2.33? Could anyone point me how to fix this or does anyone by
chance already have a patch for this? (Disclaimer: I have zero
experience with meson.)
% p -v -j1 compile util-linux
--------------------------
target: util-linux.compile
--------------------------
ptxdist: executing: PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD https_proxy=PTXDIST-UNALLOWED-DOWNLOAD http_proxy=PTXDIST-UNALLOWED-DOWNLOAD PKGCONFIG_WHITELIST_HOST='' PKGCONFIG_WHITELIST_TARGET='' PKGCONFIG_WHITELIST_SRC='util-linux' SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' V=1 VERBOSE=1 LC_ALL='C.utf8' KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist ninja -C /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build -v -j1
ninja: Entering directory `/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
[1/75] arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
FAILED: test_pty
arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':
platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198: undefined reference to `openpty'
/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188: undefined reference to `openpty'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile.make:20: /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/util-linux.compile] Error 1
Greets
Alex
[1] https://www.ptxdist.org/
[2] https://git.pengutronix.de/cgit/ptxdist/commit/?id=18c9c0f89c4148f3007b9fcc7833d99af60084dc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] util-linux build error with meson and older glibc
2024-09-10 7:07 [ptxdist] util-linux build error with meson and older glibc Alexander Dahl
@ 2024-09-10 10:00 ` Michael Olbrich
2024-09-10 11:01 ` Alexander Dahl
2024-09-10 10:45 ` Karel Zak
1 sibling, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2024-09-10 10:00 UTC (permalink / raw)
To: util-linux, ptxdist
On Tue, Sep 10, 2024 at 09:07:01AM +0200, Alexander Dahl wrote:
> Hello everyone,
>
> building util-linux with ptxdist [1] here. After switching to meson
> build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
> which contains gcc-10.2.1 and glibc-2.32. Building for architecture
> arm-v5te-linux-gnueabi here, console output below.
>
> Autotools build was fine. Build with a more recent toolchain
> (OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful.
>
> From looking at the linker options I suspect -lutil missing?
> According to manpage that's a BSD function present in glibc.
> I suspect a change in glibc 2.34 integrating libutil in core glibc,
> which makes it work with recent version 2.37. So this is probably a
> flaw in meson build not setting the necessary linker options for glibc
> up to 2.33? Could anyone point me how to fix this or does anyone by
> chance already have a patch for this? (Disclaimer: I have zero
> experience with meson.)
There is a -Dlibutil=disabled in rules/util-linux.make. Maybe try to
enable that?
Michael
> % p -v -j1 compile util-linux
>
> --------------------------
> target: util-linux.compile
> --------------------------
>
> ptxdist: executing: PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD https_proxy=PTXDIST-UNALLOWED-DOWNLOAD http_proxy=PTXDIST-UNALLOWED-DOWNLOAD PKGCONFIG_WHITELIST_HOST='' PKGCONFIG_WHITELIST_TARGET='' PKGCONFIG_WHITELIST_SRC='util-linux' SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' V=1 VERBOSE=1 LC_ALL='C.utf8' KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist ninja -C /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build -v -j1
>
> ninja: Entering directory `/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
> [1/75] arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
> FAILED: test_pty
> arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
> /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':
> platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198: undefined reference to `openpty'
> /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188: undefined reference to `openpty'
> collect2: error: ld returned 1 exit status
> ninja: build stopped: subcommand failed.
> make: *** [/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile.make:20: /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/util-linux.compile] Error 1
>
> Greets
> Alex
>
> [1] https://www.ptxdist.org/
> [2] https://git.pengutronix.de/cgit/ptxdist/commit/?id=18c9c0f89c4148f3007b9fcc7833d99af60084dc
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] util-linux build error with meson and older glibc
2024-09-10 7:07 [ptxdist] util-linux build error with meson and older glibc Alexander Dahl
2024-09-10 10:00 ` Michael Olbrich
@ 2024-09-10 10:45 ` Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2024-09-10 10:45 UTC (permalink / raw)
To: util-linux, ptxdist
On Tue, Sep 10, 2024 at 09:07:01AM GMT, Alexander Dahl wrote:
> building util-linux with ptxdist [1] here. After switching to meson
> build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
> which contains gcc-10.2.1 and glibc-2.32. Building for architecture
> arm-v5te-linux-gnueabi here, console output below.
Which version of util-linux are you currently using? Is it the current
git tree?
> From looking at the linker options I suspect -lutil missing?
It seems so.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] util-linux build error with meson and older glibc
2024-09-10 10:00 ` Michael Olbrich
@ 2024-09-10 11:01 ` Alexander Dahl
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2024-09-10 11:01 UTC (permalink / raw)
To: Michael Olbrich; +Cc: util-linux, ptxdist
Hello,
Am Tue, Sep 10, 2024 at 12:00:26PM +0200 schrieb Michael Olbrich:
> On Tue, Sep 10, 2024 at 09:07:01AM +0200, Alexander Dahl wrote:
> > Hello everyone,
> >
> > building util-linux with ptxdist [1] here. After switching to meson
> > build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
> > which contains gcc-10.2.1 and glibc-2.32. Building for architecture
> > arm-v5te-linux-gnueabi here, console output below.
> >
> > Autotools build was fine. Build with a more recent toolchain
> > (OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful.
> >
> > From looking at the linker options I suspect -lutil missing?
> > According to manpage that's a BSD function present in glibc.
> > I suspect a change in glibc 2.34 integrating libutil in core glibc,
> > which makes it work with recent version 2.37. So this is probably a
> > flaw in meson build not setting the necessary linker options for glibc
> > up to 2.33? Could anyone point me how to fix this or does anyone by
> > chance already have a patch for this? (Disclaimer: I have zero
> > experience with meson.)
>
>
> There is a -Dlibutil=disabled in rules/util-linux.make. Maybe try to
> enable that?
This did it. Sent a patch already:
Link: https://lore.ptxdist.org/ptxdist/20240910105459.3468520-1-ada@thorsis.com/T/#u
Thanks and Greets
Alex
>
> Michael
>
> > % p -v -j1 compile util-linux
> >
> > --------------------------
> > target: util-linux.compile
> > --------------------------
> >
> > ptxdist: executing: PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD https_proxy=PTXDIST-UNALLOWED-DOWNLOAD http_proxy=PTXDIST-UNALLOWED-DOWNLOAD PKGCONFIG_WHITELIST_HOST='' PKGCONFIG_WHITELIST_TARGET='' PKGCONFIG_WHITELIST_SRC='util-linux' SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' V=1 VERBOSE=1 LC_ALL='C.utf8' KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist ninja -C /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build -v -j1
> >
> > ninja: Entering directory `/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
> > [1/75] arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
> > FAILED: test_pty
> > arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
> > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':
> > platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198: undefined reference to `openpty'
> > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188: undefined reference to `openpty'
> > collect2: error: ld returned 1 exit status
> > ninja: build stopped: subcommand failed.
> > make: *** [/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile.make:20: /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/util-linux.compile] Error 1
> >
> > Greets
> > Alex
> >
> > [1] https://www.ptxdist.org/
> > [2] https://git.pengutronix.de/cgit/ptxdist/commit/?id=18c9c0f89c4148f3007b9fcc7833d99af60084dc
> >
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-10 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-10 7:07 [ptxdist] util-linux build error with meson and older glibc Alexander Dahl
2024-09-10 10:00 ` Michael Olbrich
2024-09-10 11:01 ` Alexander Dahl
2024-09-10 10:45 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox