Bug 53587 - pxe sources will not compile
pxe sources will not compile
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: pxe (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-12 08:53 EDT by Bryan Leopard
Modified: 2007-04-18 12:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-12 08:53:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryan Leopard 2001-09-12 08:53:18 EDT
Dist: Red Hat 7.1 shipping media
Kernel: 2.4.2-2smp

The sources contained in the pxe-0.1-22.src.rpm will not compile after 
being installed. The makefile and pxeclienttester.cc require modification.

Installed using:

rpm -ihv /mnt/cdrom/SRPMS/pxe-0.1-22.src.rpm

workaround:
Patch the makefile with the following:

diff -urN a/makefile b/makefile
--- a/makefile	Mon Aug 27 10:50:28 2001
+++ b/makefile	Mon Aug 27 10:49:18 2001
@@ -1,33 +1,34 @@
 all:
-	{ cd classes ; make all }
-	{ cd mtftpd ; make all }
-	{ cd services ; make all }
-	{ cd services/apitestopts ; make all }
-	{ cd services/bstrapopts ; make all }
-	{ cd services/pxeclienttester ; make all }
-	{ cd services/pxeparser ; make all }
+	{ cd classes ; make all ; }
+	{ cd mtftpd ; make all ; }
+	{ cd services ; make all ; }
+	{ cd services/apitestopts ; make all ; }
+	{ cd services/bstrapopts ; make all ; }
+	{ cd services/pxeclienttester ; make all ; }
+	{ cd services/pxeparser ; make all ; }
 
 install:
-	{ cd classes ; make install }
-	{ cd mtftpd ; make install }
-	{ cd services ; make install }
-	{ cd services/apitestopts ; make install }
-	{ cd services/bstrapopts ; make install }
-	{ cd services/pxeclienttester ; make install }
-	{ cd services/pxeparser ; make install }
+	{ cd classes ; make install ; }
+	{ cd mtftpd ; make install ; }
+	{ cd services ; make install ; }
+	{ cd services/apitestopts ; make install ; }
+	{ cd services/bstrapopts ; make install ; }
+	{ cd services/pxeclienttester ; make install ; }
+	{ cd services/pxeparser ; make install ; }
 	mkdir -p $(PREFIX)/tftpboot/X86PC/UNDI/BStrap
-	mkdir -p $(PREFIX)/tftpboot/X86PC/UNDI/redhat-install
-	cp bstrap.0 /tftpboot/X86PC/UNDI/BStrap
-	cp linux.0 /tftpboot/X86PC/UNDI/redhat-install
+	mkdir -p $(PREFIX)/tftpboot/X86PC/UNDI/linux-install
+	# we don't need this; we build our own.
+	# cp bstrap.0 /tftpboot/X86PC/UNDI/BStrap
+	# cp linux.0 /tftpboot/X86PC/UNDI/linux-install
 
 clean:
-	{ cd classes ; make clean }
-	{ cd mtftpd ; make clean }
-	{ cd services ; make clean }
-	{ cd services/apitestopts ; make clean }
-	{ cd services/bstrapopts ; make clean }
-	{ cd services/pxeclienttester ; make clean }
-	{ cd services/pxeparser ; make clean }
+	{ cd classes ; make clean ; }
+	{ cd mtftpd ; make clean ; }
+	{ cd services ; make clean ; }
+	{ cd services/apitestopts ; make clean ; }
+	{ cd services/bstrapopts ; make clean ; }
+	{ cd services/pxeclienttester ; make clean ; }
+	{ cd services/pxeparser ; make clean ; }
 
 remove:
 	{ cd classes ; make remove }

Don't know if adding the semicolons to the end of each line is the 
preferred method, but it works.
Patch the pxeclienttester.cc file with the following:

diff -uN a/pxeclienttester.cc b/pxeclienttester.cc
--- a/pxeclienttester.cc	Mon Aug 27 10:14:31 2001
+++ b/pxeclienttester.cc	Fri Aug 24 11:00:26 2001
@@ -21,7 +21,10 @@
 #include "cpxedebug.h"
 #include "cipaddr.h"
 #include <dlfcn.h>
-
+#include <sys/stat.h>
+#include<sys/types.h>
+#include <fcntl.h>
+#include <time.h>
 
 #define BOOTP_DHCPVEND  312     // DHCP standard vendor field size
 #define MIN_DHCP_SIZE   548
@@ -37,7 +40,7 @@
 void TestPrintGuid(CStringArray& aryBuf, char *str, BYTE* GUID);
 void TestPrintNic(CStringArray& aryBuf, char *str, BYTE* NI);
 void TestPrint(CStringArray& aryBuf, char *str);
-void TestPrint(CStringArray& aryBuf, char* format, char *str);
+void TestPrint(CStringArray& aryBuf, char* format, const char *str);
 void TestPrint(FILE *fp, char* format, char *str);
 void DebugPrint(char *str);
 void OutputTest(FILE *fp, CStringArray& aryBuf);
@@ -462,7 +465,7 @@
 		strTestPath = strTestPath + "/" + strMacFileName;
 		int result=0;
 		DWORD reserr=0;
-		result = mkdir(strTestPath.data());
+		result = mkdir(strTestPath.data(), 0755);
 		if (result!=0)
 		{
 			reserr=errno;

After patching the source will compile cleanly.
Comment 1 Bill Nottingham 2001-10-17 11:03:14 EDT
The version in 7.2 builds fine here (0.1-23).

Note You need to log in before you can comment on or make changes to this bug.