public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiler Error Indication. What is wrong?[2] - Please ignore my previous email
@ 2002-10-02  7:59 George Thanos
  2002-10-02 11:39 ` John Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: George Thanos @ 2002-10-02  7:59 UTC (permalink / raw)
  To: gcc-help

Regarding my previous email, I send a fuller version of it...

I initiate a uCLinux porting procedure for Hyperstone's E1-32X processsor.

Trying to compile..
typedef unsigned short umode_t;

I receive...
/mnt/disk2/home/gthanos/HyLinux/src/uClinux-2.4.x/include/asm/types.h:14: 
long, short, signed or unsigned invalid for 'umode_t'

Also, in the following lines...
36 typedef struct {
37         unsigned long fds_bits [__FDSET_LONGS];
38 } __kernel_fd_set;

I receive the compiler error...
/mnt/disk2/home/gthanos/HyLinux/src/uClinux-2.4.x/include/linux/posix_types.h:38: 
two or more data types in declaration of `__kernel_fd_set'

I use version 2.95.2 of  gcc/egcs, ported (not by me) for Hyperstone's 
E1-32X processor.

Can anybody indicate the source of error? I don't understand the 
compiler message, thus I don't know what to fix.
The list of included files is too big, thus there may be something else 
that I am missing (don't know where to search). I tried to eliminate the 
compiler error output information to the minimum..

Thanks,

George

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler Error Indication. What is wrong?[2] - Please ignore my previous email
  2002-10-02  7:59 Compiler Error Indication. What is wrong?[2] - Please ignore my previous email George Thanos
@ 2002-10-02 11:39 ` John Love-Jensen
  2002-10-03  1:38   ` George Thanos
  0 siblings, 1 reply; 3+ messages in thread
From: John Love-Jensen @ 2002-10-02 11:39 UTC (permalink / raw)
  To: George Thanos, gcc-help

Hi George,

Use this bash trick to search the source files header files:

grep -n -w __kernel_fd_set $(
 echo $(g++ -M foo.cpp)
 | sed -e 's@ \\ @ @g'
 | cut -d ' ' -f3-
)

It's a bit easier if it's put into your .bashrc as a helper function.  I'll
leave that as an exercise for the reader.  NOTE:  I'm ASSUMING you don't
have spaces in your files and paths.  Handling spaces is possible, but
trickier.

This may help you locate the duplicate definition is the mystery header
file.

A breakdown:
First line, search for whole-word __kernel_fd_set, with line numbers.
Second line, display included header files, the 'echo' removes newlines.
Third line, trims out ' \ ' sequences.
Fourth line, removes the makefile target name and source file name.

If you don't use bash, other shells can solve the same need in their own
peculiar ways.  (I don't consider Microsoft's CMD a "shell".)

--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler Error Indication. What is wrong?[2] - Please ignore my previous email
  2002-10-02 11:39 ` John Love-Jensen
@ 2002-10-03  1:38   ` George Thanos
  0 siblings, 0 replies; 3+ messages in thread
From: George Thanos @ 2002-10-03  1:38 UTC (permalink / raw)
  To: John Love-Jensen; +Cc: gcc-help

John Love-Jensen wrote:

>Hi George,
>
>Use this bash trick to search the source files header files:
>
>grep -n -w __kernel_fd_set $(
> echo $(g++ -M foo.cpp)
> | sed -e 's@ \\ @ @g'
> | cut -d ' ' -f3-
>)
>
>  
>
Thanks, I really appreciate your effort. Using your script I receive..
bash-2.05a$  grep -n -w __kernel_fd_set $(echo $(g++ -M init/main.c)| 
sed -e 's@ \\ @ @g'| cut -d ' ' -f3-)
/usr/include/linux/types.h:13:typedef __kernel_fd_set           fd_set;
/usr/include/linux/posix_types.h:38:} __kernel_fd_set;
/usr/lib/gcc-lib/i386-slackware-linux/2.95.3/include/asm/posix_types.h:14:                        
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
/usr/include/asm/posix_types.h:52:                      "=m" 
(*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
/usr/include/asm/posix_types.h:57:                      "=m" 
(*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
/usr/include/asm/posix_types.h:64:                      "m" 
(*(__kernel_fd_set *) (fdsetp))); \
/usr/include/asm/posix_types.h:72:                      :"=m" 
(*(__kernel_fd_set *) (fdsetp)), \
/usr/include/asm/posix_types.h:75:                      "2" 
((__kernel_fd_set *) (fdsetp)) : "memory"); \

I search the source file headers for duplicate definition but I don't 
receive any duplicates.
Furthermore the script searches in /usr/include  while the development 
code is  at
/mnt/disk2/home/gthanos/HyLinux/src/uClinux-2.4.x/include

Can I change something in the script in order to search in the desired path?

Thanks,

- Goerge

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-03  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02  7:59 Compiler Error Indication. What is wrong?[2] - Please ignore my previous email George Thanos
2002-10-02 11:39 ` John Love-Jensen
2002-10-03  1:38   ` George Thanos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).