Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#59134 closed defect (fixed)

pdftk is using libstdc++ (this installation is configured to use libc++) (again)

Reported by: jacobakkerboom (Jacob) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ericmoret
Port: pdftk

Description (last modified by mf2k (Frank Schima))

On the surface, my issue looks exactly the same as ticket:56554#no1

That is, when running sudo port install pdftk, I also get the following

Error: Port pdftk is still broken after rebuilding it more than 3 times.[[br]]
Error: Please run port -d -y rev-upgrade and use the output to report a bug.[[br]]
Error: rev-upgrade failed: Port pdftk still broken after rebuilding 3 times[[br]]
Error: Follow https://guide.macports.org/#project.tickets to report a bug.[[br]]

I have macports 2.6.0 (displayed by port version). So the fix in 2.5.1 did not fix my issue.

I have attached the file created by sudo port -d -y rev-upgrade > rev-upgrade-dump-for-report.txt. Also copied and pasted the DEBUG lines in a separate file and attached it.

Attachments (3)

debug-log-install-pdftk.txt (51.2 KB) - added by jacobakkerboom (Jacob) 5 years ago.
rev-upgrade-install-pdftk-dump.txt (798 bytes) - added by jacobakkerboom (Jacob) 5 years ago.
pdftk_rev-upgrade_log_2019-10-23a.txt (229.9 KB) - added by JDLH (Jim DeLaHunt) 4 years ago.
Result of sudo port -d -y rev-upgrade >& pdftk_rev-upgrade_log_2019-10-23a.txt

Download all attachments as: .zip

Change History (20)

Changed 5 years ago by jacobakkerboom (Jacob)

Attachment: debug-log-install-pdftk.txt added

Changed 5 years ago by jacobakkerboom (Jacob)

comment:1 Changed 5 years ago by mf2k (Frank Schima)

In the future, please add the port maintainer(s) to Cc (port info --maintainers pdftk), if any.

Last edited 5 years ago by mf2k (Frank Schima) (previous) (diff)

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Description: modified (diff)
Owner: set to ryandesign
Status: newassigned

Changed 4 years ago by JDLH (Jim DeLaHunt)

Result of sudo port -d -y rev-upgrade >& pdftk_rev-upgrade_log_2019-10-23a.txt

comment:3 Changed 4 years ago by JDLH (Jim DeLaHunt)

I have also encountered this problem. My port pdftk is still broken after rebuilding it more than 3 times. I am attaching the output from
sudo port -d -y rev-upgrade >& pdftk_rev-upgrade_log_2019-10-23a.txt

The punchline appears to be: "pdftk is using libstdc++ (this installation is configured to use libc++)".

This is with MacPorts 2.6.2 on macOS High Sierra 10.13.4.

comment:4 Changed 4 years ago by JDLH (Jim DeLaHunt)

I was able to work around this by editing the pdftk portfile as described by comment:5:issue:56554. That is, I removed pdftk with:

sudo port uninstall pdftk
sudo port clean pdftk
bbedit `port file pdftk`

Then I added a line after line 83 of pdftk's Portfile. Old contents:

variant gcc5 conflicts gcc45 gcc47 description {Build using gcc5} {
    configure.compiler  macports-gcc-5
    set versuff         -mp-5
}

New contents, with new line configure.cxx_stdlib macports-libstdc++:

variant gcc5 conflicts gcc45 gcc47 description {Build using gcc5} {
    configure.compiler  macports-gcc-5
    configure.cxx_stdlib macports-libstdc++
    set versuff         -mp-5
}

Then I could install pdftk without any complaints about a broken port:

% sudo port install pdftk  
--->  Computing dependencies for pdftk
--->  Fetching archive for pdftk
--->  Attempting to fetch pdftk-2.02_0+gcc5.darwin_17.x86_64.tbz2 from https://packages.macports.org/pdftk
--->  Attempting to fetch pdftk-2.02_0+gcc5.darwin_17.x86_64.tbz2.rmd160 from https://packages.macports.org/pdftk
--->  Installing pdftk @2.02_0+gcc5
--->  Activating pdftk @2.02_0+gcc5
--->  Cleaning pdftk
--->  Updating database of binaries
--->  Updating database of C++ stdlib usage
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

However, my understanding of comment:13:issue:56554 is that MacPorts from 2.5.1 on should have done the equivalent of configure.cxx_stdlib macports-libstdc++ without this statement in the Portfile. This makes me thing that the fix from MacPorts 2.5.1 is missing from 2.6.0 and 2.6.2, or else it doesn't activate in our situations.

comment:5 Changed 4 years ago by hfreville (Hugues Freville)

Hello, Got same problem with pdftk stuck in rebuild/rev-upgrade loop after upgrading from macports 2.5 to 2.6.2

I confirm that editing port file, following your advice, allow building pdftk with 2.6.2

Thank you,

comment:6 Changed 4 years ago by ericmoret

Cc: ericmoret added

comment:7 Changed 4 years ago by tcspestana (Tiago Pestana)

Same for me on macOS 10.12.6 and macports 2.6.2. Editing the port file works.

comment:8 Changed 4 years ago by kencu (Ken)

This is Ryan's port and he knows perfectly well how to fix this, as the MacPorts manager.

Presumably he will get to it in due course of time.

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

pdftk hasn't seen any recent development; I consider it dead. I recommend using pdftk-java instead.

comment:10 Changed 4 years ago by kencu (Ken)

I guess someone should probably obsolete it then so people stop trying to install it....

comment:11 Changed 4 years ago by kencu (Ken)

one thing to ponder, as I tried it out tonight, is that the required OpenJDK8 for pdftk-java requires 10.10. Not a big deal, I guess -- but pdftk would remain the only option for the < 10.10 crowd.

comment:12 Changed 3 years ago by RobK88

I have the same problem trying to install pdftk on my old Mac running Lion (10.7.5) using Macports 2.6.4.

When I edited the portfile by adding "configure.cxx_stdlib macports-libstdc++" as suggested above, pdftk was built and installed without any issues.

bash-3.2$ sudo port install pdftk
--->  Computing dependencies for pdftk
--->  Fetching distfiles for pdftk
--->  Verifying checksums for pdftk
--->  Extracting pdftk
--->  Applying patches to pdftk
--->  Configuring pdftk
--->  Building pdftk
--->  Staging pdftk into destroot
--->  Installing pdftk @2.02_0+gcc5
--->  Activating pdftk @2.02_0+gcc5
--->  Cleaning pdftk
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
bash-3.2$ 
bash-3.2$ pdftk --version

pdftk 2.02 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2003-13 Steward and Lee, LLC - Please Visit: www.pdftk.com
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-3.2$

Someone should update the portfile or delete this port altogether. Most Linux distros (like Debian) seem to be using pdftk-java these days in lieu of pdftk.

FYI -- There are subtle differences between pdftk and pdftk-java. From the pdftk-java website:

The following differences with respect to the original version of
pdftk are intended. Issue reports about other differences are welcome
(when in doubt, open an issue).

Does not ask for owner password if not needed.
Does not report some structure-only form fields.
Reports some missing values in multi-valued form fields.
Does not escape form fields if UTF-8 output is selected.
Report entries may be in a different order.
Reports annotations other than links.

So in some circumstances, users may prefer using pdftk. My vote is to update the portfile and keep the pdftk port. Keep giving Macports users the choice of using either pdftk or pdftk-java.

Last edited 3 years ago by RobK88 (previous) (diff)

comment:13 Changed 3 years ago by kencu (Ken)

we have pdftk-java:

pdftk-java @3.1.1_2 (textproc, graphics, pdf, java)
    A port of pdftk into java

but whether it ever would work on 10.7 is a question. Last we looked pdftk-java was > 10.10 only, so if we did switch to that only, you'd be SOL.

I don't see any issues when I install or use pdftk on 10.6.8, but perhaps we can sort out what is happening to you.

comment:15 Changed 3 years ago by kencu (Ken)

In df31466f0f4324bb56774a7149f03acd3fef8b01/macports-ports (master):

pdftk: make nomaintainer

#59134#comment:9

comment:16 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

you should find this fixed now; please reopen/let me know if not.

comment:17 Changed 3 years ago by RobK88

Thanks. I can confirm that I had no issues with the latest updated portfile for pdftk. pdftk was built just fine on my Mac running Lion.

Note: See TracTickets for help on using tickets.