From: Ralf G. <rg...@hs...> - 2005-02-03 22:53:34
|
Moins, * Carl-Daniel Hailfinger: > Ralf Gerbig schrieb: >> Compiling the source I got: >> >> rge@lapdog2:/usr/src/vbetool-0.2> make >> if gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" >> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"vbetool\" >> -DVERSION=\"0.2\" -I. -I. >> -g -Wall -Werror -pedantic -g -O2 -MT vbetool.o -MD -MP -MF ".deps/vbetool.Tpo" \ >> -c -o vbetool.o `test -f 'vbetool.c' || echo './'`vbetool.c; \ >> then mv -f ".deps/vbetool.Tpo" ".deps/vbetool.Po"; \ >> else rm -f ".deps/vbetool.Tpo"; exit 1; \ >> fi >> In file included from /usr/include/stdlib.h:416, >> from vbetool.c:14: >> /usr/include/sys/types.h:62: error: conflicting types for `dev_t' >> /usr/include/linux/types.h:22: error: previous declaration of `dev_t' >> [...] > Yes, the pci.h shipped by SUSE has problems. Simply move the #include > <pci/pci.h> from the beginning to directly before #include <sys/kd.h> >> after fuzing around with -D, I temporally commented out the >> include. Thereafter adding -lpci to the end of the link command, I got >> a working executable. > This is a bug in Makefile.am. Pseudo-diff: > -AM_LDFLAGS = -lpci > +LIBS = -lpci > Then run aclocal, autoconf and automake again. yup, works with this diff: --- ../vbetool-0.2-orig/Makefile.am 2004-12-30 16:27:07.000000000 +0100 +++ Makefile.am 2005-02-03 23:38:08.000000000 +0100 @@ -12,4 +12,4 @@ $(RM) Makefile.in aclocal.m4 config.h.in stamp-h.in configure AM_CFLAGS = -g -Wall -Werror -pedantic -AM_LDFLAGS = -lpci +LIBS = -lpci --- ../vbetool-0.2-orig/vbetool.c 2004-12-31 16:11:19.000000000 +0100 +++ vbetool.c 2005-02-03 23:38:40.000000000 +0100 @@ -8,7 +8,6 @@ version 2 */ -#include <pci/pci.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> @@ -17,6 +16,7 @@ #include <sys/ioctl.h> #include <sys/types.h> #include <sys/io.h> +#include <pci/pci.h> #include <sys/kd.h> #include <sys/stat.h> #include <errno.h> Ralf |