public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Xiaogeng (Shawn) Jin" <xjin@redswitch.com>
To: linux-mtd@lists.infradead.org
Subject: latest mtd code from CVS cannot be compiled with the latest linuxppc_2_4_devel tree? Weird???
Date: Thu, 09 Jan 2003 10:51:12 -0800	[thread overview]
Message-ID: <3E1DC4A0.3000009@redswitch.com> (raw)

Hi,

I had a compilation error when compiling linuxppc_2_4_devel 
(v2.4.21-pre3) with the latest mtd code. Here is the error message.

ppc_8xx-gcc -D__KERNEL__ 
-I/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_
devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 
-fno-strict-aliasing
-fno-common -fomit-frame-pointer 
-I/u/xjin/2_4_devel/Software/Linux/MPC855/linux
ppc_2_4_devel/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 
-Wno-uninitia
lized -mmultiple -mstring   -nostdinc -I 
/opt/eldk2.0/usr/lib/gcc-lib/ppc-linux/
2.95.4/include -DKBUILD_BASENAME=mtdblock_core  -c -o mtdblock-core.o 
mtdblock-c
ore.c
In file included from 
/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_devel
/include/linux/blk.h:4,
                  from mtdblock-core.c:18:
/u/xjin/2_4_devel/Software/Linux/MPC855/linuxppc_2_4_devel/include/linux/blkdev.
h:147: parse error before `struct'

I tried to solve the problem by moving #include <linux/blk.h> forward, 
which is originally after #include <linux/mtd/compatmac.h>. So 
mtdblock-core.c became the following.

#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/blk.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.h>
#include "mtdblock.h"

And the error was gone.

However when mtdblock-24.c was compiled, the same error message occured. 
And this time I had no such luck because there seems to be some specific 
sequence to be followed when headers are included. This time 
<linux/blk.h> cannot be moved forward. So I doubt that I solved the 
compilation error in mtdblock-core.c.

#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.h>
#include "mtdblock.h"

#define DEVICE_REQUEST mtdblock_request
#define DEVICE_NR(device) (device)
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#define DEVICE_NO_RANDOM
#include <linux/blk.h>

The compiler I used is from ELDK 2.0 (ppc_8xx-gcc 2.95.4). Is it a known 
  problem that already has been solved?

-- 
Shawn Jin
RedSwitch Inc.

                 reply	other threads:[~2003-01-09 18:21 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=3E1DC4A0.3000009@redswitch.com \
    --to=xjin@redswitch.com \
    --cc=linux-mtd@lists.infradead.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