build breaks

2007-02-28 Thread Guyeng Gankhuyag

on PIII 800 PC System, Ubuntu 5.04, kernel 2.6.10-5-386

the build breaks whenever I include the ext2_fs.h header into C file as 
simple as following:


#include 
#include 
#include 
#include 
#include 
#include 

int main()
{

  return 0;
}

I really believe what you guys do is a crap.
Here is the error output from compiler:

[EMAIL PROTECTED]:~/dev/cs360a # make
cc -c main.c
In file included from /usr/include/linux/cpumask.h:8,
from /usr/include/asm/smp.h:11,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/linux/bitmap.h: In function `bitmap_empty':
/usr/include/linux/bitmap.h:15: error: `BITS_PER_LONG' undeclared (first use 
in this function)
/usr/include/linux/bitmap.h:15: error: (Each undeclared identifier is 
reported only once

/usr/include/linux/bitmap.h:15: error: for each function it appears in.)
/usr/include/linux/bitmap.h: In function `bitmap_full':
/usr/include/linux/bitmap.h:29: error: `BITS_PER_LONG' undeclared (first use 
in this function)

/usr/include/linux/bitmap.h: In function `bitmap_equal':
/usr/include/linux/bitmap.h:44: error: `BITS_PER_LONG' undeclared (first use 
in this function)

/usr/include/linux/bitmap.h: In function `bitmap_shift_right':
/usr/include/linux/bitmap.h:85: error: `__shr_tmp' undeclared (first use in 
this function)

/usr/include/linux/bitmap.h: In function `bitmap_shift_left':
/usr/include/linux/bitmap.h:98: error: `__shl_tmp' undeclared (first use in 
this function)

/usr/include/linux/bitmap.h: In function `bitmap_weight':
/usr/include/linux/bitmap.h:144: error: `BITS_PER_LONG' undeclared (first 
use in this function)

In file included from /usr/include/asm/smp.h:11,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:15: error: variable-size type declared outside 
of any function

In file included from /usr/include/asm/smp.h:11,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/linux/cpumask.h: In function `next_online_cpu':
/usr/include/linux/cpumask.h:56: error: structure has no member named `val'
In file included from /usr/include/asm/smp.h:16,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/asm/fixmap.h: At top level:
/usr/include/asm/fixmap.h:72: error: `FIX_ACPI_PAGES' undeclared here (not 
in a function)
/usr/include/asm/fixmap.h:72: error: enumerator value for `FIX_ACPI_END' not 
integer constant

/usr/include/asm/fixmap.h:84: error: syntax error before "pgprot_t"
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:9,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from meta.h:5,
from main.c:1:
/usr/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in 
a function)
/usr/include/asm/mpspec.h:9: error: `MAX_MP_BUSSES' undeclared here (not in 
a function)
/usr/include/asm/mpspec.h:10: error: `MAX_MP_BUSSES' undeclared here (not in 
a function)
/usr/include/asm/mpspec.h:12: error: `MAX_MP_BUSSES' undeclared here (not in 
a function)
/usr/include/asm/mpspec.h:19: error: `MAX_APICS' undeclared here (not in a 
function)
/usr/include/asm/mpspec.h:20: error: `MAX_MP_BUSSES' undeclared here (not in 
a function)
/usr/include/asm/mpspec.h:20: error: conflicting types for 
`mp_bus_id_to_type'
/usr/include/asm/mpspec.h:8: error: previous declaration of 
`mp_bus_id_to_type'
/usr/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not 
in a function)
/usr/include/asm/mpspec.h:24: error: `MAX_MP_BU

Re: build breaks

2007-02-28 Thread Paul Smith
On Wed, 2007-02-28 at 07:36 +, Guyeng Gankhuyag wrote:
> the build breaks whenever I include the ext2_fs.h header into C file
> as simple as following:

This mailing list is for bugs in the GNU make program.  Your problem has
nothing to do with GNU make, so it's not appropriate for this mailing
list.

You need to find a mailing list or forum related to Linux programming to
answer your question.


One short answer is that the headers in the linux/* and asm/*
directories are kernel headers and are not intended to be included
directly into user-space programs, except in very controlled ways.

> I really believe what you guys do is a crap.

Well, I guess we're even then since I really believe that your attitude
is a crap.  Good luck finding help.

Cheers!

-- 
---
 Paul D. Smith <[EMAIL PROTECTED]>  Find some GNU make tips at:
 http://www.gnu.org  http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


Re: build breaks

2007-02-28 Thread Alfred M. Szmidt
   #include 
   #include 
   #include 
   #include 
   #include 
   #include 

   int main()
   {
  return 0;
   }

   I really believe what you guys do is a crap.

PEBKAC.  This for example has nothing to do with GNU Make, and is
completely related to your broken code.  You have forgotten to include
an extra header that is needed by , namley
 which defines BITS_FOR_LONG among other things.

Next time, please use a politer tone.


___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


Re: build breaks

2007-02-28 Thread Sam Ravnborg
On Wed, Feb 28, 2007 at 07:36:27AM +, Guyeng Gankhuyag wrote:
> on PIII 800 PC System, Ubuntu 5.04, kernel 2.6.10-5-386
> 
> the build breaks whenever I include the ext2_fs.h header into C file as 
> simple as following:
> 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 

So you are including a kernel header in your program.

> 
> int main()
> {
> 
>   return 0;
> }
> 
> I really believe what you guys do is a crap.

And report this in a mailing list used to report bugs
in the make program.
This list is not for random build failures.

So a few points to consider:
1) This is not related to problems with make.
2) You have a missing dependency - ext_fs.h needs one
   or a few .h files included to compile.
   grep is your friend here - or look at other
   progrmas that uses ext2_fs.h.
3) Reporting this type of basic
   problem I have the impression you try
   to do something where you do not need
   to deal with the internals of etx2.
   For basic file operations use the glibc
   provided header files.

Sam


___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make