* [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build
@ 2024-02-04 10:11 Fabrice Fontaine
2024-08-06 20:23 ` Thomas Petazzoni via buildroot
2024-09-03 19:14 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-02-04 10:11 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
With BR2_SHARED_STATIC_LIBS=y, the generic infrastructure adds a
--enable-static flags causing htop to be built as a static binary.
Adding a --disable-static reverts this. This will fix the following
build failure with hwloc raised since bump to version 3.3.0 in commit
09243186df3168022f0b23b8a9677c6313033769 and
https://github.com/htop-dev/htop/commit/c8a61850dd31ab64eb8ad83929ce86d2adbeb96c:
/home/autobuild/autobuild/instance-3/output-1/host/bin/mipsel-buildroot-linux-gnu-gcc -std=c99 -pedantic -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/include -I/home/autobuild/autobuild/instance-3/output-1/host/bin/../mipsel-buildroot-linux-gnu/sysroot/usr/include/libxml2 -Wall -Wcast-align -Wcast-qual -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings -Wnull-dereference -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"/etc\"" -I"./linux" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=2 -static -rdynamic -static -o htop htop.o Action.o Affinity.o AffinityPanel.o AvailableColumnsPanel.o AvailableMetersPanel.o BatteryMeter.o CategoriesPanel.o ClockMeter.o ColorsPanel.o ColumnsPanel.o CommandLine.o CommandScreen.
o Compat.o CPUMeter.o CRT.o DateMeter.o DateTimeMeter.o DiskIOMeter.o DisplayOptionsPanel.o DynamicColumn.o DynamicMeter.o DynamicScreen.o EnvScreen.o FileDescriptorMeter.o FunctionBar.o Hashtable.o Header.o HeaderOptionsPanel.o HostnameMeter.o IncSet.o InfoScreen.o ListItem.o LoadAverageMeter.o Machine.o MainPanel.o MemoryMeter.o MemorySwapMeter.o Meter.o MetersPanel.o NetworkIOMeter.o Object.o OpenFilesScreen.o OptionItem.o Panel.o Process.o ProcessLocksScreen.o ProcessTable.o Row.o RichString.o Scheduling.o ScreenManager.o ScreensPanel.o ScreenTabsPanel.o Settings.o SignalsPanel.o SwapMeter.o SysArchMeter.o Table.o TasksMeter.o TraceScreen.o UptimeMeter.o UsersTable.o Vector.o XUtils.o generic/gettime.o generic/hostname.o generic/uname.o linux/CGroupUtils.o linux/HugePageMeter.o linux/IOPriorityPanel.o linux/LibSensors.o linux/LinuxMachine.o linux/LinuxProcess.o linux/LinuxProcessTable.o linux/Platform.o linux/PressureStallMeter.o linux/SELinuxMeter.o linux/SystemdMeter.o linux/Z
ramMeter.o zfs/ZfsArcMeter.o zfs/ZfsCompressedArcMeter.o -lcap -llzma -L/home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib -lncurses -lm -L/home/autobuild/autobuild/instance-3/output-1/host/bin/../mipsel-buildroot-linux-gnu/sysroot/usr/lib -lhwloc
/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: Action.o: in function `Action_setUserOnly':
Action.c:(.text+0x2490): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: Settings.o: in function `Settings_new':
Settings.c:(.text+0x2dd0): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: /home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib/libhwloc.a(topology-xml-libxml.o): in function `hwloc_libxml_free_buffer':
topology-xml-libxml.c:(.text+0x2c): undefined reference to `xmlFree'
Fixes:
- http://autobuild.buildroot.org/results/04bd5633750ff5cef048ea78c9de043d3ffcfa32
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/htop/htop.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/htop/htop.mk b/package/htop/htop.mk
index 6dbaae3796..af8eff4860 100644
--- a/package/htop/htop.mk
+++ b/package/htop/htop.mk
@@ -17,6 +17,13 @@ HTOP_LICENSE_FILES = COPYING
# provided by autoconf relies on wchar_t.
HTOP_CONF_ENV += ac_cv_prog_cc_c99=-std=gnu99
+# With BR2_SHARED_STATIC_LIBS=y, the generic infrastructure adds a
+# --enable-static flags causing htop to be built as a static binary.
+# Adding a --disable-static reverts this
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+HTOP_CONF_OPTS += --disable-static
+endif
+
ifeq ($(BR2_PACKAGE_HWLOC),y)
HTOP_CONF_OPTS += --enable-hwloc
HTOP_DEPENDENCIES += hwloc
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build
2024-02-04 10:11 [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build Fabrice Fontaine
@ 2024-08-06 20:23 ` Thomas Petazzoni via buildroot
2024-09-03 19:14 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-06 20:23 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
Hello Fabrice,
On Sun, 4 Feb 2024 11:11:40 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> With BR2_SHARED_STATIC_LIBS=y, the generic infrastructure adds a
> --enable-static flags causing htop to be built as a static binary.
> Adding a --disable-static reverts this. This will fix the following
> build failure with hwloc raised since bump to version 3.3.0 in commit
> 09243186df3168022f0b23b8a9677c6313033769 and
> https://github.com/htop-dev/htop/commit/c8a61850dd31ab64eb8ad83929ce86d2adbeb96c:
[...]
>
> Fixes:
> - http://autobuild.buildroot.org/results/04bd5633750ff5cef048ea78c9de043d3ffcfa32
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/htop/htop.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
I was initially not sure about this fix, but in the end, I agree that
it's the right one, so I've applied, with a slightly better comment in
the .mk file.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build
2024-02-04 10:11 [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build Fabrice Fontaine
2024-08-06 20:23 ` Thomas Petazzoni via buildroot
@ 2024-09-03 19:14 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-09-03 19:14 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> With BR2_SHARED_STATIC_LIBS=y, the generic infrastructure adds a
> --enable-static flags causing htop to be built as a static binary.
> Adding a --disable-static reverts this. This will fix the following
> build failure with hwloc raised since bump to version 3.3.0 in commit
> 09243186df3168022f0b23b8a9677c6313033769 and
> https://github.com/htop-dev/htop/commit/c8a61850dd31ab64eb8ad83929ce86d2adbeb96c:
> /home/autobuild/autobuild/instance-3/output-1/host/bin/mipsel-buildroot-linux-gnu-gcc
> -std=c99 -pedantic -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600
> -I/home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/include
> -I/home/autobuild/autobuild/instance-3/output-1/host/bin/../mipsel-buildroot-linux-gnu/sysroot/usr/include/libxml2
> -Wall -Wcast-align -Wcast-qual -Wextra -Wfloat-equal -Wformat=2
> -Winit-self -Wmissing-format-attribute -Wmissing-noreturn
> -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes
> -Wundef -Wunused -Wwrite-strings -Wnull-dereference
> -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"/etc\"" -I"./linux"
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
> -g0 -D_FORTIFY_SOURCE=2 -static -rdynamic -static -o htop htop.o
> Action.o Affinity.o AffinityPanel.o AvailableColumnsPanel.o
> AvailableMetersPanel.o BatteryMeter.o CategoriesPanel.o ClockMeter.o
> ColorsPanel.o ColumnsPanel.o CommandLine.o CommandScreen.
> o Compat.o CPUMeter.o CRT.o DateMeter.o DateTimeMeter.o DiskIOMeter.o
> DisplayOptionsPanel.o DynamicColumn.o DynamicMeter.o DynamicScreen.o
> EnvScreen.o FileDescriptorMeter.o FunctionBar.o Hashtable.o Header.o
> HeaderOptionsPanel.o HostnameMeter.o IncSet.o InfoScreen.o ListItem.o
> LoadAverageMeter.o Machine.o MainPanel.o MemoryMeter.o
> MemorySwapMeter.o Meter.o MetersPanel.o NetworkIOMeter.o Object.o
> OpenFilesScreen.o OptionItem.o Panel.o Process.o ProcessLocksScreen.o
> ProcessTable.o Row.o RichString.o Scheduling.o ScreenManager.o
> ScreensPanel.o ScreenTabsPanel.o Settings.o SignalsPanel.o SwapMeter.o
> SysArchMeter.o Table.o TasksMeter.o TraceScreen.o UptimeMeter.o
> UsersTable.o Vector.o XUtils.o generic/gettime.o generic/hostname.o
> generic/uname.o linux/CGroupUtils.o linux/HugePageMeter.o
> linux/IOPriorityPanel.o linux/LibSensors.o linux/LinuxMachine.o
> linux/LinuxProcess.o linux/LinuxProcessTable.o linux/Platform.o
> linux/PressureStallMeter.o linux/SELinuxMeter.o linux/SystemdMeter.o
> linux/Z
> ramMeter.o zfs/ZfsArcMeter.o zfs/ZfsCompressedArcMeter.o -lcap -llzma
> -L/home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib
> -lncurses -lm
> -L/home/autobuild/autobuild/instance-3/output-1/host/bin/../mipsel-buildroot-linux-gnu/sysroot/usr/lib
> -lhwloc
> /home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld:
> Action.o: in function `Action_setUserOnly':
> Action.c:(.text+0x2490): warning: Using 'getpwnam' in statically
> linked applications requires at runtime the shared libraries from the
> glibc version used for linking
> /home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld:
> Settings.o: in function `Settings_new':
> Settings.c:(.text+0x2dd0): warning: Using 'getpwuid' in statically
> linked applications requires at runtime the shared libraries from the
> glibc version used for linking
> /home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld:
> /home/autobuild/autobuild/instance-3/output-1/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib/libhwloc.a(topology-xml-libxml.o):
> in function `hwloc_libxml_free_buffer':
> topology-xml-libxml.c:(.text+0x2c): undefined reference to `xmlFree'
> Fixes:
> - http://autobuild.buildroot.org/results/04bd5633750ff5cef048ea78c9de043d3ffcfa32
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2024.02.x and 2024.05.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-03 19:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 10:11 [Buildroot] [PATCH 1/1] package/htop: fix BR2_SHARED_STATIC_LIBS build Fabrice Fontaine
2024-08-06 20:23 ` Thomas Petazzoni via buildroot
2024-09-03 19:14 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox