Opened 3 years ago

Last modified 2 years ago

#60037 assigned defect

pdftk @2.02: does not build on macOS 10.15.3

Reported by: jbouttier Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: NF6X (Mark J. Blair), ericmoret, wahspilihp (Philip Shaw)
Port: pdftk

Description

The build of pdftk takes a lot of time but eventually fails with the attached log. It seems that it is due to gcj-mp-5 segfaulting :

/opt/local/bin/gcj-mp-5 -Wall -fsource=1.3 -O2 --encoding=UTF-8 --classpath="/op
t/local/share/java/libgcj-5.5.0.jar:/opt/local/var/macports/build/_opt_local_var
_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_pd
ftk/pdftk/work/pdftk-2.02-dist/java:." -C pdftk/com/lowagie/text/Anchor.java
gcj-mp-5: internal compiler error: Segmentation fault: 11 (program ecj1)

Attachments (1)

pdftk.log (349.3 KB) - added by jbouttier 3 years ago.
build log

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by jbouttier

Attachment: pdftk.log added

build log

comment:1 Changed 3 years ago by NF6X (Mark J. Blair)

The pdftk @2.02 build also fails for me under macOS 10.14.6. In my case, the error returned is fatal error: string.h: No such file or directory:

[...]
:info:build /opt/local/bin/g++-mp-5 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"2.02\" -Wall -Wextra -Weffc++ -O2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_pdftk/pdftk/work/pdftk-2.02-dist/pdftk/../java pdftk.cc -c
:info:build In file included from pdftk.cc:33:0:
:info:build /opt/local/include/gcc5/c++/gcj/cni.h:22:20: fatal error: string.h: No such file or directory
:info:build compilation terminated.
:info:build make: *** [pdftk.o] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_pdftk/pdftk/work/pdftk-2.02-dist/pdftk'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_pdftk/pdftk/work/pdftk-2.02-dist/pdftk" && /usr/bin/make -w all -f Makefile.OSX-10.6 VERSUFF=-mp-5 
:info:build Exit code: 2
:error:build Failed to build pdftk: command execution failed
:debug:build Error code: CHILDSTATUS 32794 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_pdftk/pdftk/main.log for details.

comment:2 Changed 3 years ago by NF6X (Mark J. Blair)

Cc: NF6X added

comment:3 Changed 3 years ago by ericmoret

Cc: ericmoret added

comment:4 Changed 3 years ago by kierans (Kieran Simpson)

This just got me

gcj-mp-5: internal compiler error: Segmentation fault: 11 (program ecj1)

comment:5 Changed 3 years ago by wahspilihp (Philip Shaw)

Cc: wahspilihp added

comment:6 Changed 3 years ago by s0nik42

Hello,

Same issue here, any way to make it works even manually ?

Julien

comment:7 in reply to:  1 Changed 3 years ago by ryandesign (Ryan Schmidt)

Replying to NF6X:

The pdftk @2.02 build also fails for me under macOS 10.14.6. In my case, the error returned is fatal error: string.h: No such file or directory:

That is a different problem and should be filed in a different ticket.

comment:8 in reply to:  6 Changed 3 years ago by ryandesign (Ryan Schmidt)

Replying to s0nik42:

Same issue here, any way to make it works even manually ?

If I knew how to fix it, I would. :)

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

The problem is that pdftk builds using gcj, the gcc java compiler. gcj was apparently so buggy and apparently nobody involved with the gcc project was able or willing to fix them that gcc removed gcj entirely. That's why the pdftk port is stuck using the by-now very old gcc5 port, since that old version still contains gcj. But unfortunately macOS evolves over time and as we see gcc5's gcj no longer works at all on Catalina.

What we need is a way to build pdftk that does not require gcj. Here is a Gentoo forum thread about that topic. The developer of pdftk was apparently working on a gcj-free pdftk a few years ago, but no new version of pdftk has been released.

The last information in that Gentoo thread is that someone else has done the conversion and released pdftk-java. We already have a port for this in MacPorts so maybe you can try that and see if it's a suitable replacement. If you have any issues with pdftk-java, you should file separate tickets about those to keep this ticket focused on the original pdftk.

comment:10 in reply to:  9 Changed 3 years ago by jbouttier

Replying to ryandesign:

The last information in that Gentoo thread is that someone else has done the conversion and released pdftk-java. We already have a port for this in MacPorts so maybe you can try that and see if it's a suitable replacement.

Many thanks for the information ! pdftk-java installed without any issue on my system, and seems to be a suitable replacement for me.

comment:11 Changed 3 years ago by s0nik42

pdftk-java is a good alternative. It builds properly and provides the right set of features I was looking for.

Thank you very much for the explanation and solving my problem :)

Regards,

Julien

comment:12 Changed 2 years ago by ryandesign (Ryan Schmidt)

Has duplicate #61370.

Note: See TracTickets for help on using tickets.