Skip to contentSkip to conversation

PA-RISC: compile error in include/net/dst.h

DISCUSSION Rolf Eike Beer 4 participants 11 messages May 22, 2011 – May 24, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:25,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/dst.h: In function 'dst_hold':
include/net/dst.h:238:2: error: size of unnamed array is negative
In file included from include/linux/nfs_fs.h:59:0,
                 from init/do_mounts.c:20:

include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58:10: warning: cast to pointer from integer of different size

This is both in 2.6.38.6 and 2.6.39, but is not in 2.6.38.4 when compiling for my C8000.

pioneer src # hppa64-unknown-linux-gnu-gcc --version hppa64-unknown-linux-gnu-gcc (Gentoo 4.5.2 p1.1) 4.5.2

Greetings,

Eike

#1 lore raw

(Cc netdev as well)

Quoted 8 lines · Rolf Eike Beer

from include/net/ipv6.h:16,

                 from include/linux/sunrpc/clnt.h:25,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/dst.h: In function 'dst_hold': include/net/dst.h:238:2:
error: size of unnamed array is negative In file included from
include/linux/nfs_fs.h:59:0,
                 from init/do_mounts.c:20:

Seems someone touched struct dst_entry...

Quoted 13 lines

include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58:10: warning: cast to pointer from integer of different size

This is both in 2.6.38.6 and 2.6.39, but is not in 2.6.38.4 when compiling for my C8000.

pioneer src # hppa64-unknown-linux-gnu-gcc --version hppa64-unknown-linux-gnu-gcc (Gentoo 4.5.2 p1.1) 4.5.2

Greetings,

Eike

#2 lore raw
In reply to Rolf Eike Beer
Quoted 8 lines · Rolf Eike Beer
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:25,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/dst.h: In function 'dst_hold':
include/net/dst.h:238:2: error: size of unnamed array is negative
In file included from include/linux/nfs_fs.h:59:0,
                 from init/do_mounts.c:20:
Quoted 6 lines

include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58:10: warning: cast to pointer from integer of different size

This is both in 2.6.38.6 and 2.6.39, but is not in 2.6.38.4 when compiling for my C8000.

Could you bisect it down to the patch that causes the problem in 2.6.38.6?

thanks,

greg k-h

#3 lore raw

Am Sonntag, 22. Mai 2011, 07:32:22 schrieb Greg KH:

Quoted 15 lines · Rolf Eike Beer
Quoted 14 lines
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:25,
                 from include/linux/nfs_fs.h:50,

                 from init/do_mounts.c:20:

include/net/dst.h: In function 'dst_hold':
include/net/dst.h:238:2: error: size of unnamed array is negative In file included from include/linux/nfs_fs.h:59:0,

                 from init/do_mounts.c:20:

include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58:10: warning: cast to pointer from integer of different size

Quoted 5 lines
Quoted 2 lines

This is both in 2.6.38.6 and 2.6.39, but is not in 2.6.38.4 when compiling for my C8000.

Could you bisect it down to the patch that causes the problem in 2.6.38.6?

I will try if I find time in the next days. Until now I can only confirm that 2.6.38.5 builds fine.

Eike

#4 lore raw
Quoted 18 lines · I wrote:

Am Sonntag, 22. Mai 2011, 07:32:22 schrieb Greg KH:

Quoted 17 lines · Rolf Eike Beer
Quoted 16 lines
                 from include/net/ipv6.h:16,
                 from
                 include/linux/sunrpc/clnt.h:25,
                 from include/linux/nfs_fs.h:50,

                 from init/do_mounts.c:20:

include/net/dst.h: In function 'dst_hold':
include/net/dst.h:238:2: error: size of unnamed array is negative In file included from include/linux/nfs_fs.h:59:0,

                 from init/do_mounts.c:20:

include/linux/mempool.h: In function 'mempool_create_kmalloc_pool':
include/linux/mempool.h:58:10: warning: cast to pointer from integer of
different size

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This is both in 2.6.38.6 and 2.6.39, but is not in 2.6.38.4 when compiling for my C8000.

Could you bisect it down to the patch that causes the problem in 2.6.38.6?

I will try if I find time in the next days. Until now I can only confirm that 2.6.38.5 builds fine.

As 2.6.38.6 does if I use the correct .config. So it is an older issue which is not related to recent changes but likely some general HPPA breakage. We'll discuss the rest on linux-parisc.

Eike

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

#5 lore raw
Quoted 3 lines · Rolf Eike Beer

As 2.6.38.6 does if I use the correct .config. So it is an older issue which is not related to recent changes but likely some general HPPA breakage. We'll discuss the rest on linux-parisc.

If you believe this is a compiler error, I suggest using gcc 4.5.3 or 4.6.0.

All releases prior to 4.5.2 contain bugs in delay slot optimization resulting in incorrect register liveness. 4.3 and 4.4 were seriously broken at -O1, and neither could bootstrap gcc at -O1. I just completed backporting all the reorg fixes that I am aware of, but they aren't included in any 4.3 or 4.4 release.

It's quite possible most gcc 4.3 and 4.4 releases are miscompiled on targets with branch delay slots. As a side, all the fixes that I backported were to the generic code.

I have been using 4.5.3 and haven't seen your problem.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
#6 lore raw

Am Dienstag, 24. Mai 2011, 15:06:14 schrieb John David Anglin:

Quoted 10 lines · Rolf Eike Beer
Quoted 3 lines

As 2.6.38.6 does if I use the correct .config. So it is an older issue which is not related to recent changes but likely some general HPPA breakage. We'll discuss the rest on linux-parisc.

If you believe this is a compiler error, I suggest using gcc 4.5.3 or 4.6.0.

All releases prior to 4.5.2 contain bugs in delay slot optimization resulting in incorrect register liveness.

If you think of PR46915: I was the one that originally stumbled over this although GM took the hard work of bisecting and reporting that upstream. As I said before, the compiler is 4.5.2.

And: no, I don't suspect a compiler error. Only a .config screwup. I'm currently trying to find the culprit. Good luck it breaks rather early in the compile.

To reproduce try to compile for hppa64 with default .config, this seems what has happened to me.

Eike

#7 lore raw
Quoted 2 lines · I wrote:

To reproduce try to compile for hppa64 with default .config, this seems what has happened to me.

Ok, the issue is rather stupid. I passed a 64 bit compiler on the command line but CONFIG_64BIT was not set.

Eike

#8 lore raw
In reply to Rolf Eike Beer
Quoted 3 lines

If you think of PR46915: I was the one that originally stumbled over this although GM took the hard work of bisecting and reporting that upstream. As I said before, the compiler is 4.5.2.

Yes, finding the cause of bugs is often a lot harder than fixing them. I spent about a week debugging PR49007 and then it turned out the problem was the same as PR40086 (one line fix to reorg.c). Hopefully most reorg bugs are now fixed as they are nasty.

Nominally, PR46915 was fixed in 4.5.3.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
#9 lore raw

Am Dienstag, 24. Mai 2011, 16:49:37 schrieben Sie:

Quoted 11 lines
Quoted 4 lines

If you think of PR46915: I was the one that originally stumbled over this
although GM took the hard work of bisecting and reporting that upstream. As I said before, the compiler is 4.5.2.

Yes, finding the cause of bugs is often a lot harder than fixing them. I spent about a week debugging PR49007 and then it turned out the problem was the same as PR40086 (one line fix to reorg.c). Hopefully most reorg bugs are now fixed as they are nasty.

Nominally, PR46915 was fixed in 4.5.3.

Gentoo has backported it to 4.5.2. I know that because otherwise my C3600 wouldn't have any usable swap ;)

Eike

#10 lore raw
Quoted 2 lines · Rolf Eike Beer

Gentoo has backported it to 4.5.2. I know that because otherwise my C3600 wouldn't have any usable swap ;)

My main point was to advise those using older gcc versions to update.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)