mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Bogusz <qboosh@pld-linux.org>
To: linux-kernel@vger.kernel.org
Subject: 2.6.7 compile errors due to include loops on sparc(32)
Date: Wed, 16 Jun 2004 19:36:53 +0200	[thread overview]
Message-ID: <20040616173652.GA10529@satan.blackhosts> (raw)

  CC      init/do_mounts.o
In file included from include/linux/mm.h:29,
                 from include/linux/pagemap.h:7,
                 from include/linux/swap.h:7,
                 from include/linux/suspend.h:7,
                 from init/do_mounts.c:6:
include/asm/pgtable.h:386: warning: parameter names (without types) in function declaration
include/asm/pgtable.h:387: warning: parameter names (without types) in function declaration
include/asm/pgtable.h:388: error: parse error before "___f___swp_entry"
include/asm/pgtable.h:388: warning: type defaults to `int' in declaration of `___f___swp_entry'
include/asm/pgtable.h:388: warning: data definition has no type or storage class
make[1]: *** [init/do_mounts.o] Error 1
make: *** [init] Error 2

That's because swp_entry_t used in BTFIXUPDEF_CALL macro uses in
<asm-sparc/pgtable.h> - swp_entry_t is defined in <linux/swap.h>,
which indirectly includes <asm/pgtable.h> before defining swp_entry_t -
so <linux/swap.h> include in <asm-sparc/pgtable.h> is skipped as
_LINUX_SWAP_H is already defined.

Workaround is to move swp_entry_t typedef on top of <linux/swap.h>,
before includes - but it's ugly.

The next problem is:

  CC      arch/sparc/kernel/process.o
[...]
In file included from include/linux/swap.h:18,
                 from include/asm/pgtable.h:14,
                 from include/linux/mm.h:29,
                 from arch/sparc/kernel/process.c:19:
include/linux/pagemap.h: In function `linear_page_index':
include/linux/pagemap.h:145: error: dereferencing pointer to incomplete type
include/linux/pagemap.h:146: error: dereferencing pointer to incomplete type
include/linux/pagemap.h: In function `lock_page':
include/linux/pagemap.h:155: warning: implicit declaration of function `TestSetPageLocked'
include/linux/pagemap.h: In function `wait_on_page_locked':
include/linux/pagemap.h:174: warning: implicit declaration of function `PageLocked'
include/linux/pagemap.h:175: error: `PG_locked' undeclared (first use in this function)
include/linux/pagemap.h:175: error: (Each undeclared identifier is reported only once
include/linux/pagemap.h:175: error: for each function it appears in.)
include/linux/pagemap.h: In function `wait_on_page_writeback':

quite similar case - struct vma_area_struct is defined in <linux/mm.h>,
which indirectly includes <linux/pagemap.h>, which uses it.
On other archs <asm/pgtable.h> doesn't include <linux/swap.h>, so this
problem is sparc-specific too; but removing #include <linux/swap.h> from
<asm-sparc/pgtable.h> doesn't work without hacking many files, so
I couldn't find any simple workaround...


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/

                 reply	other threads:[~2004-06-16 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040616173652.GA10529@satan.blackhosts \
    --to=qboosh@pld-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®