2001-10-07 13:43:32

by Marc Lehmann

[permalink] [raw]
Subject: zisofs doesn't compile in 2.4.10-ac7

In file included from uncompress.c:21:
/localvol/usr/src/linux-2.4/include/linux/zlib_fs.h:34:19: zconf.h: No such file or directory

but the only zconf.h file is in /opt/include (and shouldn't be used anyways).

(just another datapoint on why linux should be tested on distributions
that do NOT put everything into /usr/include ;)

--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / [email protected] |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|


2001-10-07 14:11:40

by Christoph Hellwig

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7

In article <[email protected]> you wrote:
> In file included from uncompress.c:21:
> /localvol/usr/src/linux-2.4/include/linux/zlib_fs.h:34:19: zconf.h: No such file or directory
>
> but the only zconf.h file is in /opt/include (and shouldn't be used anyways).
>
> (just another datapoint on why linux should be tested on distributions
> that do NOT put everything into /usr/include ;)

It should be tested with the following patch instead:

--- linux/Makefile~ Wed Oct 3 15:31:07 2001
+++ linux/Makefile Sun Oct 7 17:04:39 2001
@@ -94,7 +94,8 @@
# standard CFLAGS
#

-CPPFLAGS := -D__KERNEL__ -I$(HPATH)
+GCCINC := $(shell $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/\1include/gp')
+CPPFLAGS := -D__KERNEL__ -nostdinc -I$(HPATH) -I$(GCCINC)

CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fomit-frame-pointer -fno-strict-aliasing -fno-common


2001-10-07 14:39:21

by Keith Owens

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7

On Sun, 7 Oct 2001 15:43:24 +0200,
<pcg( Marc)@goof(A.).(Lehmann )com> wrote:
>In file included from uncompress.c:21:
>/localvol/usr/src/linux-2.4/include/linux/zlib_fs.h:34:19: zconf.h: No such file or directory

Against 2.4.10-ac7.

Index: 10.37/fs/cramfs/Makefile
--- 10.37/fs/cramfs/Makefile Sat, 22 Sep 2001 14:41:20 +1000 kaos (linux-2.4/h/b/0_Makefile 1.2 644)
+++ 10.37(w)/fs/cramfs/Makefile Mon, 08 Oct 2001 00:10:13 +1000 kaos (linux-2.4/h/b/0_Makefile 1.2 644)
@@ -8,4 +8,6 @@ obj-y := inode.o uncompress.o

obj-m := $(O_TARGET)

+CFLAGS_uncompress.o := -I $(TOPDIR)/fs/inflate_fs
+
include $(TOPDIR)/Rules.make
Index: 10.37/fs/isofs/Makefile
--- 10.37/fs/isofs/Makefile Sat, 22 Sep 2001 14:41:20 +1000 kaos (linux-2.4/o/b/29_Makefile 1.2 644)
+++ 10.37(w)/fs/isofs/Makefile Mon, 08 Oct 2001 00:14:56 +1000 kaos (linux-2.4/o/b/29_Makefile 1.2 644)
@@ -15,4 +15,6 @@ obj-$(CONFIG_ZISOFS) += compress.o

obj-m := $(O_TARGET)

+CFLAGS_compress.o := -I $(TOPDIR)/fs/inflate_fs
+
include $(TOPDIR)/Rules.make
Index: 10.37/fs/inflate_fs/Makefile
--- 10.37/fs/inflate_fs/Makefile Sat, 22 Sep 2001 14:41:20 +1000 kaos (linux-2.4/p/f/9_Makefile 1.1 644)
+++ 10.37(w)/fs/inflate_fs/Makefile Mon, 08 Oct 2001 00:23:44 +1000 kaos (linux-2.4/p/f/9_Makefile 1.1 644)
@@ -28,4 +28,6 @@ obj-y := adler32.o infblock.o infcodes.o
inftrees.o infutil.o
obj-m := $(O_TARGET)

+EXTRA_CFLAGS += -I $(TOPDIR)/fs/inflate_fs
+
include $(TOPDIR)/Rules.make

2001-10-08 05:53:37

by Keith Owens

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7

On Sun, 7 Oct 2001 16:11:04 +0200,
Christoph Hellwig <[email protected]> wrote:
>It should be tested with the following patch instead:
>
>--- linux/Makefile~ Wed Oct 3 15:31:07 2001
>+++ linux/Makefile Sun Oct 7 17:04:39 2001
>@@ -94,7 +94,8 @@
> # standard CFLAGS
> #
>
>-CPPFLAGS := -D__KERNEL__ -I$(HPATH)
>+GCCINC := $(shell $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/\1include/gp')
>+CPPFLAGS := -D__KERNEL__ -nostdinc -I$(HPATH) -I$(GCCINC)
>
> CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
> -fomit-frame-pointer -fno-strict-aliasing -fno-common
>

Good idea. kbuild 2.5 starting with 2.4.11-pre5 forces the kernel to
only use its own includes plus gcc install includes. No more scanning
/usr/include for kernel compiles.

2001-10-08 06:23:14

by Keith Owens

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7

On Mon, 08 Oct 2001 15:53:20 +1000,
Keith Owens <[email protected]> wrote:
>Good idea. kbuild 2.5 starting with 2.4.11-pre5 forces the kernel to
>only use its own includes plus gcc install includes. No more scanning
>/usr/include for kernel compiles.

Guess what the first bit of code was that broke? Yep, aic7xxx strikes
again, it includes endian.h :(. I am not going to fix it, the aic7xxx
maintainer is not interested in conforming to kernel build procedures,
aic7xxx is a shambles.

The code might be the best thing since SCSI-1 but the build of aic7xxx
causes more problems for kbuild than the rest of the system put
together.

2001-10-08 15:33:45

by David Woodhouse

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7


[email protected] said:
> Against 2.4.10-ac7.

> +CFLAGS_uncompress.o := -I $(TOPDIR)/fs/inflate_fs

> +CFLAGS_compress.o := -I $(TOPDIR)/fs/inflate_fs

> +EXTRA_CFLAGS += -I $(TOPDIR)/fs/inflate_fs

Why not just move the offending file into $(TOPDIR)/include/linux instead?

While we're at it, why not move $(TOPDIR)/fs/inflate_fs/ to $(TOPDIR)/lib/zlib
too? It's not really a filesystem-specific piece of library code, is it?

--
dwmw2


2001-10-08 21:59:25

by H. Peter Anvin

[permalink] [raw]
Subject: Re: zisofs doesn't compile in 2.4.10-ac7

Followup to: <[email protected]>
By author: David Woodhouse <[email protected]>
In newsgroup: linux.dev.kernel
>
> While we're at it, why not move $(TOPDIR)/fs/inflate_fs/ to $(TOPDIR)/lib/zlib
> too? It's not really a filesystem-specific piece of library code, is it?
>

It's at the best questionable if it is actually usable for anything
else. Unfortunately the memory management issues for various clients
of zlib are rather painful.

-hpa
--
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <[email protected]>