Bug 2192 - antlr: gcj4: unrecognized option '-sourcepath'
Summary: antlr: gcj4: unrecognized option '-sourcepath'
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 2188
  Show dependency treegraph
 
Reported: 2006-01-21 22:12 UTC by Andrew Cagney
Modified: 2006-01-27 04:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-01-21 22:12:37 UTC
Seen this?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> make -C ./antlr all
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
make[1]: Entering directory
`/usr/src/build/683384-ppc64/BUILD/build-frysk-0.0.1.2006.01.13/antlr-2.7.5/antlr'
basename: too many arguments
Try `basename --help' for more information.
*** compiling 209 Java file(s)
gcj4: unrecognized option '-sourcepath'
actions/java/ActionLexer.java:31: error: Can't find default package 'antlr'.
Check the CLASSPATH environment variable and the access to the archives
/usr/src/build/683384-ppc64/BUILD/antlr-2.7.5/antlr/debug/DebuggingCharScanner.java:4:
error: Package 'antlr.collections' not found in import.   import
antlr.collections.*;
          ^
2 errors

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                      >> E R R O R <<
============================================================

/usr/bin/gcj4 -C -mminimal-toc -d . -sourcepath
/usr/src/build/683384-ppc64/BUILD/antlr-2.7.5 -classpath
/usr/src/build/683384-ppc64/BUILD/build-frysk-0.0.1.2006.01.13/antlr-2.7.5/antlr/antlr.jar
Version.java

perhaphs it's fixed in a newer antlr?
Comment 1 Wu Zhou 2006-01-23 15:36:50 UTC
I didn't see this on ppc64 with the old source rpms.  But while I try to build
the latest one, it didn't got that far.  It stoped at an earlier place...  Will
try to see whether I can work around them.  

BTW, did you run the test on a ppc64 machine?  I am just curious about how did
you get that far. :-)
Comment 2 Andrew Cagney 2006-01-23 17:11:43 UTC
(In reply to comment #1)
> I didn't see this on ppc64 with the old source rpms.  But while I try to build
> the latest one, it didn't got that far.  It stoped at an earlier place...  Will
> try to see whether I can work around them.

Perhaphs try building just antlr?  The bug will likely either be me botching the
config.* update, or a bug in the config stuff.

frysk-imports/antlr should contain 2.7.5 antlr with patches applied.  The RPM
antlr patch created using:

cvs -d :ext:sources.redhat.com:/cvs/frysk rdiff \
    -u \
    -r ANTLR_2_7_5 \
    -r HEAD \
    frysk-imports/antlr \
    > antlr.patch

You could also create a bug for the other problem and hang that off of 2188
(this bug's blocker).

> BTW, did you run the test on a ppc64 machine?  I am just curious about how did
> you get that far. :-)

I got curious and tried pushing the RPM through a PPC-64 RHEL 4 U3 build machine :-)
Comment 3 Wu Zhou 2006-01-25 04:38:31 UTC
I think I found the reason.  It is all the fault of basename.

[root@localhost antlr-2.7.5.new]# basename /usr/bin/gcj4 -mminimal-toc -C
basename: too many arguments
Try `basename --help' for more information.

Building it on x86 don't require "-mminimial-toc", it will output this:
[root@localhost antlr-2.7.5.new]# basename /usr/bin/gcj4 -C
gcj4

Add a quotation mark around will fix this:
[root@localhost antlr-2.7.5.new]# basename "/usr/bin/gcj4 -mminimal-toc -C"
gcj4 -mminimal-toc -C

Can I get the write access of the CVS, then I can commit that myself?
Comment 4 Andrew Cagney 2006-01-27 04:45:27 UTC
2006-01-26  Andrew Cagney  <cagney@redhat.com>

	Fix from Wu Zhou <woodzltc@cn.ibm.com>:
	* configure.in: Correctly quote basename applied to commands.
	* scripts/cpp.sh.in: Ditto.
	* scripts/cxx.sh.in: Ditto.
	* scripts/jar.sh.in: Ditto.
	* scripts/javac.sh.in: Ditto.
	* scripts/lib.sh.in: Ditto.
	* scripts/link.sh.in: Ditto.
Comment 5 Andrew Cagney 2006-01-27 04:55:10 UTC
* Fri Jan 27 2006 Andrew Cagney <cagney@redhat.com> 0.0.1.2006.01.22-0.EL4.5
- Update antlr.patch, update includes Wu Zhou's basename fix, and
  up-to-date config.guess and config.sub.