On Sunday 25 November 2007 09:24, Shocky wrote:
> Hi,
>
> I'm new to LinuxBios, and just looking for a way to flash the bios on an HP
> laptop without installing Windoze. None of the tricks I've found through
> Google have worked for me so far, including HP's own utility for making
> bootable usb keys.
>
> I'm trying to compile just the flashrom component of LinuxBios from svn,
> but make gives me an error telling me that I need to install pciutils-devel
> and zlib-devel. The problem is these packages are already installed.
>
> I extracted the little .test.c program from the Makefile, and determined
> that the linker is unable to resolve the call to pci_alloc. The problem is
> I don't know why. The header is there in /usr/include/pci/pci.h,
> and /usr/lib/libpci.a is there (but I don't know how to tell what symbols
> the library provides; reached the limit of my expertise there).
>
> This happens on two different machines, one running Mandriva 2008.0 (the
> laptop in question), and the other Mandriva 2007.0 (my desktop pc). Any
> ideas what's going on and how to resolve it?
>
> Shocky
> --
> These are my opinions. Get your own.

I finally tracked down the problem, and it had nothing to do with libpci.a or 
libzlib1.a, except for the fact that static linking is used.

Mandriva, both 2007 and 2008, has a package called glibc-static-devel which is 
required to do static linking. I guess this is the first time I've tried to 
build a package that used static linking. The clue was the reference to not 
being able to find "-lc". libc.a is part of this package. Once I urpmi'ed 
this package, flashrom built successfully.

I wonder if someone could modify the Makefile message for this possibility, 
something like in the attached patch.

Anyway, thanks to all those who helped me resolve this issue.

Shocky
-- 
These are my opinions. Get your own.
Index: Makefile
===================================================================
--- Makefile	(revision 2993)
+++ Makefile	(working copy)
@@ -37,7 +37,7 @@
 
 distclean: clean
 	rm -f $(PROGRAM) .dependencies
-	
+
 dep:
 	@$(CC) -MM *.c > .dependencies
 
@@ -50,8 +50,10 @@
 	@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null &&	\
 		echo "found." || ( echo "not found."; echo;		\
 		echo "Please install pciutils-devel and zlib-devel.";	\
-		echo "See README for more information."; echo;		\
-		rm -f .test.c .test; exit 1)
+		echo "If you are sure these are installed check that";	\
+		echo "all C compiler and static linker dependencies";	\
+		echo "are installed. See README for more information.";	\
+		echo; rm -f .test.c .test; exit 1)
 	@rm -f .test.c .test
 
 install: $(PROGRAM)
Index: README
===================================================================
--- README	(revision 2993)
+++ README	(working copy)
@@ -14,7 +14,12 @@
 * pciutils-devel / pciutils-dev
 * zlib-devel / zlib1g-dev
 
+If these are installed but make says that they are not, check that all
+required dependencies for compiling and statically linking C programs
+are installed. For example, Mandriva requires glibc-static-devel to
+be able to statically link.
 
+
 Usage
 -----
 
-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to