Opened 16 years ago

Closed 14 years ago

#15420 closed enhancement (fixed)

pdftk: add newer gcc variant

Reported by: jochen@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: avs@…, freeed@…, jamal@…, thomas.lohschmidt@…, twalpole@…, massimo.bernaschi@…, zahanm@…, Markus.Ueberall@…, matteocorti (Matteo Corti), electronjunction-misc@…, lopusz@…, henx@…, jjstickel@…, pinny@…, joefitz@…, jklymak@…
Port: pdftk

Description

Please add a gcc43 variant as in the attached patch

Attachments (2)

pdftk.diff (1.9 KB) - added by jochen@… 16 years ago.
Portfile patch
osx-gcc45.patch (10.8 KB) - added by pinny@… 14 years ago.
diff for 10.6.4 using gcc45

Download all attachments as: .zip

Change History (37)

Changed 16 years ago by jochen@…

Attachment: pdftk.diff added

Portfile patch

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned

I already did this locally but didn't commit it yet. The problem was that gcc43 doesn't supply gcj, and thus doesn't support building pdftk, on Mac OS X 10.4. gcc42, meanwhile, doesn't supply gcj, and thus doesn't support building pdftk, on Mac OS X 10.5 PowerPC (#13553). I guess I'll add the gcc43 variant to pdftk, and make it the default on Leopard, and keep gcc42 the default on Tiger and earlier.

comment:2 Changed 16 years ago by raimue (Rainer Müller)

gcc43 provides gcj-mp-4.3, gcc42 provides gcj-mp-4.2. What is the problem?

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

The problem is that gcc43 does not provide gcj-mp-4.3 on Mac OS X 10.5 PowerPC and gcc42 does not provide gcj-mp-4.2 on Mac OS X 10.4.

comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Gah, other way around. gcc43 does not provide gcj-mp-4.3 on Mac OS X 10.4 (see the platform darwin 8 section of the gcc43 portfile and the comment "Java support does not compile on 10.4"), and gcc42 does not provide gcj-mp-4.2 on Mac OS X 10.5 PowerPC (see #13553).

comment:5 Changed 16 years ago by raimue (Rainer Müller)

Okay, sorry for the noise, I did not know there were platform specific restrictions (should have followed that ticket link earlier...).

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Port: pdftk added

Here is the current situation with pdftk +gcc43 when using the gcc 4.3.2_0 port:

  • 10.4 Intel:
    • gcc43 does not provide gcj-mp-4.3 because it does not compile; see #16409
  • 10.4 PowerPC:
  • 10.5 Intel:
  • 10.5 PowerPC:
    • gcj-mp-4.3: error trying to exec 'ecj1': execvp: No such file or directory

Even if gcc43 or another port provided ecj1, I've read that pdftk still won't compile with it. See this gcc bug report and this message on the gcc java mailing list, which were brought to my attention via #16440. Apparently pdftk is programmed incorrectly, and gcc42 and earlier compiled it successfully only by coincidence. gcc43 now considers this programming method a fatal error so we cannot add gcc43 support to the pdftk port until the developers of pdftk fix their code.

comment:7 Changed 15 years ago by bcbarnes@…

Any news on this? pdftk is available on linux distros which ship gcc43 by default. It would be nice to have on 10.5/Intel. thanks!

comment:8 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Nothing has changed, that I know of. I see no new release of pdftk since 1.41 on November 28, 2006, so I assume their code is still incompatible with anything greater than gcc42. I do not use any package manager other than MacPorts. If you know of another package manager, such as one in a Linux distribution, which is able to build pdftk with gcc43 or greater, and you can send me the patches they are using, please do so. Or if you would like to discuss the issue with the developers of pdftk and get them to provide a solution upstream, please do that; I have not done so.

comment:9 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:10 in reply to:  8 ; Changed 15 years ago by avs@…

Replying to ryandesign@…:

If you know of another package manager, such as one in a Linux distribution, which is able to build pdftk with gcc43 or greater, and you can send me the patches they are using, please do so.

Here's a related Gentoo bug that has a pdftk patch for gcc43, if it's of any value: http://bugs.gentoo.org/show_bug.cgi?id=251796

comment:11 Changed 15 years ago by avs@…

Cc: avs@… added

Cc Me!

comment:12 in reply to:  10 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to avs@…:

pdftk patch for gcc43

Thank you very much, I'll take a look at that.

comment:13 in reply to:  10 Changed 15 years ago by avs@…

Replying to avs@…:

Here's a related Gentoo bug that has a pdftk patch for gcc43, if it's of any value: http://bugs.gentoo.org/show_bug.cgi?id=251796

In addition, also Gentoo bugs #225709 and #235645, and #269312 seem to have related patches. It seems those would bring it to gcc44.

comment:14 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

I have now had a chance to look at these Gentoo tickets.

I am unable to test these patches however because gcc43, gcc44 and gcc45 in MacPorts don't appear to provide a working gcj. I filed #22065 and #22066 for these problems.

comment:15 Changed 15 years ago by freeed@…

Cc: freeed@… added

Cc Me!

comment:16 Changed 14 years ago by jamal@…

Cc: jamal@… added

Cc Me!

comment:17 Changed 14 years ago by thomas.lohschmidt@…

Cc: thomas.lohschmidt@… added

Cc Me!

comment:18 Changed 14 years ago by twalpole@…

Cc: twalpole@… added

Cc Me!

comment:19 in reply to:  description Changed 14 years ago by massimo.bernaschi@…

Replying to jochen@…: Cc Me!

comment:20 Changed 14 years ago by massimo.bernaschi@…

Cc: massimo.bernaschi@… added

Cc Me!

comment:21 Changed 14 years ago by zahanm@…

Cc: zahanm@… added

Cc Me!

comment:22 Changed 14 years ago by jsnuverink@…

Cc Me!

comment:23 Changed 14 years ago by Markus.Ueberall@…

Cc: Markus.Ueberall@… added

Cc Me!

comment:24 Changed 14 years ago by matteocorti (Matteo Corti)

Cc: matteo.corti@… added

Cc Me!

comment:25 Changed 14 years ago by electronjunction-misc@…

Cc: electronjunction-misc@… added

Cc Me!

comment:26 Changed 14 years ago by lopusz@…

Cc: lopusz@… added

Cc Me!

comment:27 Changed 14 years ago by henx@…

Cc: henx@… added

Cc Me!

comment:28 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… added

Cc Me!

comment:29 Changed 14 years ago by pinny@…

gcc45 in macports seems to work fine for me in 10.6.4. I had to patch the makefiles somewhat differently than in Gentoo (couldn't get objcopy working for osx, so I used nmedit instead), and I had to change the libiconv link directory for the final output, but the outputted pdftk is working!

comment:30 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Can you provide the patches you used to make this work?

comment:31 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pinny@… added

pinny, please see my comment above.

comment:32 Changed 14 years ago by joefitz@…

Cc: joefitz@… added

Cc Me!

Changed 14 years ago by pinny@…

Attachment: osx-gcc45.patch added

diff for 10.6.4 using gcc45

comment:33 Changed 14 years ago by pinny@…

There was an issue getting the build past a certain point (perhaps caused by circular dependency between text.a and pdf.a?), but regenerating the .class files for text.a seemed to fix it. I'm not sure how to keep the .class files intact to compile it in one pass.

comment:34 Changed 14 years ago by jklymak@…

Cc: jklymak@… added

Cc Me!

comment:35 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Summary: RFE: add gcc43 variant for pdftkpdftk: add newer gcc variant

In r72412 pdftk has been updated to version 1.43 and a gcc45 variant has been added. I have tested that pdftk 1.43 compiles fine with gcc45 on Snow Leopard and with gcc42 on Tiger. I did not test other gcc/OS version combinations.

gcc43 and gcc44 variants are not added because of #22066.

Note: See TracTickets for help on using tickets.