Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#2721 closed defect (fixed)

pdftk build failed caused by wrong path to gcj

Reported by: opendarwin@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

Overview:

On a Mac running MacOS X 10.3.8 and darwinports checked out from CVS a few weeks ago 'port install pdftk' fails. The location of gcj seems to be hardcoded as '/bin/gcj'?

Steps to reproduce:

Without having gcj linked to or installed in /bin/ a 'port install pdftk' leads to the following messages:

---> Fetching pdftk ---> Attempting to fetch pdftk-1.12.tar.bz2 from http://www.pdfhacks.com/pdftk/ ---> Verifying checksum(s) for pdftk ---> Extracting pdftk ---> Configuring pdftk ---> Building pdftk with target all Error: Target com.apple.build returned: shell command "cd "/usr/local/src/darwinports/dports/

textproc/pdftk/work/pdftk-1.12/pdftk" && make all -f Makefile.MacOSX TOOLPATH=/bin/" returned error 2

Command output: make -C ../java_libs make -C "/usr/local/src/darwinports/dports/textproc/pdftk/work/pdftk-1.12/java_libs/

gnu_local/java/security";

/bin/gcj --encoding=UTF-8 -I"/usr/local/src/darwinports/dports/textproc/pdftk/work/pdftk

-1.12/java_libs" -c Engine.java -o Engine.o

/bin/sh: line 1: /bin/gcj: No such file or directory make[2]: * [Engine.o] Error 127 make[1]: * [libgcj_local] Error 2 make: * [java_libs] Error 2

Temporary (ugly) workaround:

Create a symlink from gcj (installed via darwinports before) from /opt/local/bin/gcj to /bin/gcj

# ln -s /opt/local/bin/gcj /bin/gcj # port install pdftk ---> Building pdftk with target all ---> Staging pdftk into destroot ---> Packaging tgz archive for pdftk 1.12_0 ---> Installing pdftk 1.12_0 ---> Activating pdftk 1.12_0 ---> Cleaning pdftk #

Expected behaviour:

Correctly determine the location of gcj

Change History (4)

comment:1 Changed 19 years ago by blb@…

Owner: changed from darwinports-bugs@… to blb@…
Summary: pdftk build failed caused by wrong path to gcj pdftk build failed caused by wrong path to gcj

It's actually not hardcoded to /bin but attempts to glob the correct path; from the Portfile it does:

[glob -nocomplain ${prefix}/gcj34-*]/bin/

to set TOOLPATH. If it's coming back as just /bin/ my first question would be whether you have gcj34 installed as a port (as opposed to gcj being satisfied via some other install). However I see you do have it installed, so what does this say:

ls -d /opt/local/gcj*

comment:2 Changed 19 years ago by opendarwin@…

I've installed gcj as part of my 'port install pdftk'. 'ls -d /opt/local/gcj*' spits out: /opt/local/gcj34 -3.4.3

comment:3 Changed 19 years ago by blb@…

Resolution: fixed
Status: newclosed

I'm guessing that the run of port which though /bin/ was correct was the same run that dealt with installing the gcj34 dependency? If so, what basically happened was that glob I mentioned earlier was run PRIOR to gcj34's installation, hence it came back empty and /bin/ was used.

I've committed a fix which should avoid this funky issue in the future.

Thanks for the report.

comment:4 Changed 19 years ago by opendarwin@…

Verified it with a clean install. It works now when gcj is build together with pdftk. Thanks a bunch for the fix.

Note: See TracTickets for help on using tickets.