Bug 19287 - a protoize bug (directory string is duplicated.)
Summary: a protoize bug (directory string is duplicated.)
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.2.3
: P5 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-06 04:46 UTC by TAKATSURU Tetsuya
Modified: 2009-03-30 15:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.1.1
Last reconfirmed: 2008-01-25 20:53:01


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TAKATSURU Tetsuya 2005-01-06 04:46:48 UTC
My first bug report :-)

$ protoize subdir/test.c
protoize: compiling `subdir/test.c'
protoize: subdir/subdir/test.c: can't get status: No such file or directory
protoize: warning: missing SYSCALLS file `/usr/local/lib/gcc-lib/i686-pc-linux-
gnu/3.2.3/SYSCALLS.c.X'
$


I think following modification is better :

in gcc-3.2.3/gcc/protoize.c

1478c1478
<   fi_p = find_file (abspath (invocation_filename, filename), 0);
---
>   fi_p = find_file (abspath (getpwd(), filename), 0);
1548c1548
<     def_dec_p->file = find_file (abspath (invocation_filename, filename), 
is_syscalls);
---
>     def_dec_p->file = find_file (abspath (getpwd(), filename), is_syscalls);

Thank you.

----
Tetsuya Takatsuru
NTT COMWARE
Japan
Comment 1 Andrew Pinski 2005-01-06 06:16:06 UTC
Well there is not enough information to reproduce this bug, can you provide a simple example to 
reproduce this one?

Also try 3.4.3 since that this the latest released version.
Comment 2 TAKATSURU Tetsuya 2005-01-06 07:42:37 UTC
(In reply to comment #1)
> Well there is not enough information to reproduce this bug, can you provide 
a simple example to 
> reproduce this one?
> Also try 3.4.3 since that this the latest released version.

ok. please try this one:

$ mkdir subdir
$ echo "main() { foo(); }" > test1.c
$ echo "foo() { }" > subdir/test2.c
$ protoize test1.c subdir/test2.c
protoize: compiling `test1.c'
protoize: compiling `subdir/test2.c'
protoize: subdir/subdir/test2.c: can't get status: No such file or directory
protoize: warning: missing SYSCALLS file `/usr/local/lib/gcc-lib/i686-pc-linux-
gnu/3.2.3/SYSCALLS.c.X'
protoize: converting file `test1.c'
protoize: `subdir/subdir/test2.c' not converted


I also tried 3.4.3, and that was reproduced.
Comment 3 Joe Buck 2007-01-12 07:59:49 UTC
Confirmed, I can get the failure in 4.1.1.  It seems protoize only works right on files in the current directory.

That said, it doesn't appear that anyone's done any work on protoize in years.  It no longer installs by default, in 4.1.1 you need to do "make proto" in the gcc directory to build it.  Confusingly, if you say "make protoize" the SYSCALLS file isn't built, and you get the message about the missing SYSCALLS.c.X.

Reconfirming, but setting to lowest priority.

Comment 4 Joseph S. Myers 2009-03-30 15:26:58 UTC
protoize has been removed for GCC 4.5.