Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Building pdftk without gcj?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
musv
Advocate
Advocate
User avatar
Posts: 3380
Joined: Sun Dec 01, 2002 4:13 pm
Location: de

Building pdftk without gcj?

  • Quote

Post by musv » Mon Oct 16, 2017 1:17 pm

Hi there,

regarding to the topics Remove old gcc versions and pdftk gcc6 gjar I stumbled into the same problem. I removed gcc-5.4.0, because everything built fine with gcc-6.4.0.

Now pdfk is the only package, which needs gcj and therefore gcc-5.4.0.

Is there a way to build pdfk somehow else, e.g. with javac of openjdk?
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Re: Building pdftk without gcj?

  • Quote

Post by fedeliallalinea » Mon Oct 16, 2017 1:58 pm

musv wrote:Is there a way to build pdfk somehow else, e.g. with javac of openjdk?
Probably yes but you should change Makefile (here an old incomplete example)
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
musv
Advocate
Advocate
User avatar
Posts: 3380
Joined: Sun Dec 01, 2002 4:13 pm
Location: de

  • Quote

Post by musv » Mon Oct 16, 2017 4:27 pm

The last version ist from 2013. I dropped it and replaced it with qpdf.

Unfortunately Impressive has pdftk as a mandatory dependency. But in the next time I don't have the need of any presentations. So I dropped this tool too.
Top
dilfridge
Developer
Developer
User avatar
Posts: 121
Joined: Sat Sep 18, 2010 11:38 am
Location: Regensburg, Germany
Contact:
Contact dilfridge
Website

Re: Building pdftk without gcj?

  • Quote

Post by dilfridge » Mon Oct 16, 2017 9:01 pm

musv wrote:Hi there,

regarding to the topics Remove old gcc versions and pdftk gcc6 gjar I stumbled into the same problem. I removed gcc-5.4.0, because everything built fine with gcc-6.4.0.

Now pdfk is the only package, which needs gcj and therefore gcc-5.4.0.

Is there a way to build pdfk somehow else, e.g. with javac of openjdk?

Nope. Many people have tried, unsuccessfully.
Top
monsieurp
Retired Dev
Retired Dev
Posts: 4
Joined: Wed Apr 22, 2015 3:01 pm

  • Quote

Post by monsieurp » Tue Nov 21, 2017 9:20 am

Please have a look at https://bugs.gentoo.org/562568 to find out what we intend to do with pdftk. There's really nothing we can do at the moment. As James writes in the bug report, upstream promised to deliver a gcj-free version 2 years ago and haven't delivered yet. Unless this happens or someone decides to rewrite pdftk in pure Java (i.e. using the JDK), we will most likely mask and punt this package from Portage at some point. :(
Top
nmel
n00b
n00b
Posts: 34
Joined: Sun Mar 12, 2017 7:39 am

  • Quote

Post by nmel » Mon Jan 01, 2018 11:12 pm

I'm curious if it possible to build pdftk statically. In this case we can compile once and then remove gcc-5.
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Tue Jan 02, 2018 6:25 am

musv wrote:The last version ist from 2013. I dropped it and replaced it with qpdf.

Unfortunately Impressive has pdftk as a mandatory dependency. But in the next time I don't have the need of any presentations. So I dropped this tool too.
Well, if you look at the timestamp of qpdf tarball, it is Jan 14, 2014, barely out of 2013 either :) Actually oldest tarball on my installation is from 2001, so what ? As long as the code works, its age is irrelevant. In my work I run my some of my own codes from 1987.
Top
kite14
Apprentice
Apprentice
User avatar
Posts: 216
Joined: Tue Nov 07, 2006 9:30 pm
Location: Italy

  • Quote

Post by kite14 » Tue Jan 02, 2018 9:06 am

musv wrote:Unfortunately Impressive has pdftk as a mandatory dependency. But in the next time I don't have the need of any presentations. So I dropped this tool too.
Reading the manual of Impressive, looks like pdftk is just a recommended package, used to fetch PDF metadata; it becomes mandatory only if muPDF is not available (in my systems mupdf is pulled in as a dependency of nel-print/cups-filters with pdf USE flag enabled)

I've tried to install it, and portage doesn't complain about pdftk being masked:

Code: Select all

~ $ emerge -pv impressive

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] media-libs/sdl-mixer-1.2.12-r4::gentoo  USE="flac mad mp3 vorbis wav -fluidsynth -midi -mikmod -mod -modplug -playtools -smpeg -static-libs -timidity" ABI_X86="(64) -32 (-x32)" 3621 KiB
[ebuild  N     ] media-libs/sdl-ttf-2.0.11-r1::gentoo  USE="X -static-libs" ABI_X86="(64) -32 (-x32)" 3959 KiB
[ebuild  N     ] x11-apps/xrandr-1.5.0::gentoo  179 KiB
[ebuild  N     ] media-libs/smpeg-0.4.4-r10::gentoo  USE="X opengl -debug -static-libs" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(-mmx)" 312 KiB
[ebuild  N     ] dev-python/pygame-1.9.2_pre20120101-r2::gentoo  USE="X -doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4" 2210 KiB
[ebuild  N    ~] app-office/impressive-0.11.2::gentoo  PYTHON_TARGETS="python2_7" 194 KiB

Total: 6 packages (6 new), Size of downloads: 10473 KiB

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by impressive (argument)
=app-office/impressive-0.11.2 ~amd64
So, as far as I can tell, no need to drop this tool :D
Top
Massimo B.
Veteran
Veteran
User avatar
Posts: 1940
Joined: Wed Feb 09, 2005 3:05 pm
Location: PB, Germany

  • Quote

Post by Massimo B. » Thu Jan 04, 2018 1:47 pm

I ran into this and the currently last comment on the bugreport, is that it really seems dead.
Too bad, pdftk always was a central important tool for me. I used it to split and merge PDFs, this could be replaced by pdfseparate from poppler.

Additionally I created a script pdfshrink [1] that uses pdftk, qpdf and gs in multiple steps for compression as I noticed that the compression results are very different between those 3. Most efficient compression however was gs with -dPDFSETTINGS ebook. Take care, some but very rare pdfs get broken by that script. But mosty PDFs are compressed to 50% and better, lossy but good enough to read.

[1] https://bitbucket.org/massimo/tools/src/

I tried building pdftk, it pulled gcc-5.4.0-r4 which I unmasked but that failed with

Code: Select all

error: invalid use of incomplete type ‘struct _Jv_catch_fpe(int, siginfo_t*, void*)::ucontext
Is there any way to get a gcc usable for pdftk compiled? Is there any chance to add at least some pdftk-bin?
HP ZBook Power G9 i7-12700H,64GB DDR5|HP ProDesk 600 G5 i7-9700,128GB DDR4
Top
proteusx
Guru
Guru
User avatar
Posts: 340
Joined: Mon Jan 21, 2008 11:35 am

  • Quote

Post by proteusx » Thu Jan 04, 2018 2:36 pm

Massimo

Has your gcc-5.4.0 set +gcj?

pdftk, for me too, is an absolutely necessary tool.
I care not if it is dead or alive as long as it works and it does what I want.

[post=8152522]Here is what I did [/post] to migrate to profile 17
and keep pdftk.
Top
R0b0t1
Apprentice
Apprentice
Posts: 264
Joined: Thu Jun 05, 2008 9:26 pm

  • Quote

Post by R0b0t1 » Fri Jan 05, 2018 5:33 am

Massimo B. wrote:I tried building pdftk, it pulled gcc-5.4.0-r4 which I unmasked but that failed with

Code: Select all

error: invalid use of incomplete type ‘struct _Jv_catch_fpe(int, siginfo_t*, void*)::ucontext
Is there any way to get a gcc usable for pdftk compiled? Is there any chance to add at least some pdftk-bin?
It looks like this is related to a change in linux-unwind.h, where struct ucontext was changed to ucontext_t so as to comply with POSIX naming conventions. It seems like the error is nonexistent with GCC 7.2; the fix was added in commit 14c2f22a1877f6b60a2f7c2f83ffb032759456a6 to GCC 7.1.

I'm having some other issues with the gcc-5.4.0-r4 ebuild (xattr on tmpfs?), but I may be able to get it working tomorrow. If you do get very stuck there are some people interested in keeping GCJ usable, even if you have to compile an old version of GCC. You may want to check their mailing list.
Top
marcv
n00b
n00b
Posts: 16
Joined: Sat Feb 25, 2006 7:30 pm
Location: Catalonia

  • Quote

Post by marcv » Wed Feb 21, 2018 6:24 pm

I got tired of waiting for upstream to publish a java version of pdftk and I did it myself. If somebody wants to play with it, you can find it at http://gitlab.com/marcvinyals/pdftk. There is even a live ebuild at http://repo.or.cz/marcv-overlay.git/blo ... 999.ebuild.
Last edited by marcv on Fri Mar 16, 2018 9:23 am, edited 1 time in total.
blah.
Top
Fitzcarraldo
Advocate
Advocate
User avatar
Posts: 2057
Joined: Sat Aug 30, 2008 9:49 pm
Location: United Kingdom
Contact:
Contact Fitzcarraldo
Website

  • Quote

Post by Fitzcarraldo » Thu Feb 22, 2018 8:34 am

Nice one, marcv. I've taken the liberty of mentioning your re-write in the Gentoo bug report mentioned earlier in this thread.
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Top
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

  • Quote

Post by Joseph_sys » Thu Mar 15, 2018 5:39 pm

marcv wrote:I got tired of waiting for upstream to publish a java version of pdftk and I did it myself. If somebody wants to play with it, you can find it at http://gitlab.com/marcvinyals/pdftk. There is even a live ebuild at http://repo.or.cz/marcv-overlay.git/blo ... 999.ebuild.
I've install "pdftk-9999" and it is working as it should, thanks.
gcc-5.4.0 is gone as well.
Top
Melf
n00b
n00b
User avatar
Posts: 44
Joined: Wed Oct 18, 2006 8:03 pm

  • Quote

Post by Melf » Fri Mar 30, 2018 10:30 am

Awesome, the pdftk-9999.ebuild works for me as well. Thank you!
Top
Post Reply

15 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy