Re: Weird compilation problem with glibc system

Richard B. Johnson (root@chaos.analogic.com)
Thu, 23 Jul 1998 13:31:16 -0400 (EDT)


On Thu, 23 Jul 1998, Linux Lists wrote:

>
> Hi, there,
>
> I'm facing a weird (and probably simple to solve for most of you) problem
> with an application compilation. This application compiles fine in libc5
> systems, but in glibc systems (such as the one I'm currently using, a
> RedHat 5.0 system with kernel 2.0.35), I get these errors:
>
> [root@kelly proc]# cc -o cylines cylines.c
> In file included from /usr/include/linux/ufs_fs.h:18,
> from /usr/include/linux/ufs_fs_i.h:16,
> from /usr/include/linux/fs.h:248,
> from /usr/include/linux/tty.h:19,
> from cylines.c:29:
[SNIPPED]

Remove "/linux" from any include-file specification when writing an
application. When you need to find where "FOO" is defined, grep only
the /usr/include... tree, ignoring /usr/include/asm and
/usr/include/linux. Eventually, you should resolve all the symbols.

If and only if, you have something linux-specific such as a certain
board, you resolve those symbols by including a linux-specific file
__after__ the standard headers are included. This should eliminate
any multiply defined symbols because all (should be all) standard
headers are protected against multiple inclusions.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.108 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html