Hello

The procps package was building successfully on one of my machines, but was 
failing to build on another machine, reporting errors similar to the 
following:

display.c:(.text+0x290): undefined reference to `readtask'
display.c:(.text+0x2b4): undefined reference to `readtask'
ps/display.o: In function `want_this_proc_pcpu':
display.c:(.text+0x3ac): undefined reference to `Hertz'
ps/display.o: In function `signal_handler':
display.c:(.text+0x3d0): undefined reference to `signal_number_to_name'
display.c:(.text+0x404): undefined reference to `procps_version'
.
<snip>

This is apparently related to the order in which files are included when 
processing the 'include */module.mk' line in the Makefile. When 'ps/module.mk' 
is included before 'proc/module.mk' the build fails. See
http://lists.gnu.org/archive/html/bug-make/2010-07/msg00153.html

The attached patches are as follows:

procps-3.2.7-makefile.patch - changes the Makefile to include the files in the 
desired order.

procps-spec-makefile.patch - updates the spec file to apply the above patch.

Regards

Mark
diff --exclude CVS --exclude .git -uNr procps-3.2.7/Makefile procps-3.2.7.modified/Makefile
--- procps-3.2.7/Makefile	2006-06-24 10:02:25.000000000 +0100
+++ procps-3.2.7.modified/Makefile	2011-06-23 13:06:58.435157856 +0100
@@ -174,7 +174,7 @@
 # want this rule first, use := on ALL, and ALL not filled in yet
 all: do_all
 
--include */module.mk
+-include proc/module.mk ps/module.mk
 
 do_all:    $(ALL)
--- dist/lfs-5.1/procps/procps.spec.bak	2011-06-27 16:23:38.000000000 +0100
+++ dist/lfs-5.1/procps/procps.spec	2011-06-27 16:26:11.720708719 +0100
@@ -9,6 +9,7 @@
 Packager        : Stuart Hughes
 Group           : Applications/System
 Source          : %{name}-%{version}.tar.gz
+Patch0          : procps-3.2.7-makefile.patch
 BuildRoot       : %{_tmppath}/%{name}
 Prefix          : %{pfx}
 
@@ -17,6 +18,7 @@
 
 %Prep
 %setup
+%patch0 -p1
 
 %Build
 make -j1 CPPFLAGS= m64= lib64=
_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib

Reply via email to