Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pdftk gcc6 gjar
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 371

PostPosted: Thu Apr 06, 2017 9:09 pm    Post subject: pdftk gcc6 gjar Reply with quote

Trying to compile pdftk with gcc6:

Code:

make[1]: [Makefile:47: pdftk/org/bouncycastle/crypto/InvalidCipherTextException.h] Error 127 (ignored)
gcj -fsource=1.3 --encoding=UTF-8 --classpath="/usr/share/java/libgcj.jar:/var/tmp/portage/app-text/pdftk-2.02/work/pdftk-2.02-dist/java:." -C pdftk/org/bouncycastle/crypto/DataLengthException.java
/bin/sh: gcj: command not found
make[1]: [Makefile:44: pdftk/org/bouncycastle/crypto/DataLengthException.class] Error 127 (ignored)
gcjh -force --classpath="/usr/share/java/libgcj.jar:/var/tmp/portage/app-text/pdftk-2.02/work/pdftk-2.02-dist/java:." pdftk/org/bouncycastle/crypto/DataLengthException
/bin/sh: gcjh: command not found
make[1]: [Makefile:47: pdftk/org/bouncycastle/crypto/DataLengthException.h] Error 127 (ignored)
gjar -cf java_lib.jar pdftk/com/lowagie/*/*/*/*.class pdftk/com/lowagie/*/*/*.class pdftk/com/lowagie/*/*.class pdftk/org/bouncycastle/*/*.class pdftk/org/bouncycastle/*/*/*.class pdftk/com/lowagie/text/pdf/fonts/Helvetica-Oblique.afm pdftk/com/lowagie/text/pdf/fonts/Courier.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica-BoldOblique.afm pdftk/com/lowagie/text/pdf/fonts/Courier-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Times-Roman.afm pdftk/com/lowagie/text/pdf/fonts/Times-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Courier-Oblique.afm pdftk/com/lowagie/text/pdf/fonts/Symbol.afm pdftk/com/lowagie/text/pdf/fonts/Courier-BoldOblique.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Times-Italic.afm pdftk/com/lowagie/text/pdf/fonts/ZapfDingbats.afm pdftk/com/lowagie/text/pdf/fonts/Times-BoldItalic.afm
/bin/sh: gjar: command not found
make[1]: [Makefile:51: java_lib.o] Error 127 (ignored)
gcj -fsource=1.3 --encoding=UTF-8 --classpath="/usr/share/java/libgcj.jar:/var/tmp/portage/app-text/pdftk-2.02/work/pdftk-2.02-dist/java:." -c java_lib.jar
/bin/sh: gcj: command not found
make[1]: [Makefile:52: java_lib.o] Error 127 (ignored)
make[1]: Leaving directory '/var/tmp/portage/app-text/pdftk-2.02/work/pdftk-2.02-dist/java'
make: *** No rule to make target '/var/tmp/portage/app-text/pdftk-2.02/work/pdftk-2.02-dist/pdftk/../java/java_lib.o', needed by 'pdftk.o'.  Stop.
 * ERROR: app-text/pdftk-2.02::gentoo failed (compile phase):


And 50 more above that.

I have gjar and gcj but they seem to be associated with gcc-5.4.0.

Code:

root@go3:~# locate gcj
...
/usr/bin/gcj-5.4.0
/usr/bin/gcjh-5.4.0

root@go3:~# locate gjar
/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man/man1/gjar.1
/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man/man1/gjarsigner.1
/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gjar
/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gjarsigner


Code:

root@go3:~# equery b gjar
 * Searching for gjar ...
sys-devel/gcc-5.4.0-r3 (/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gjar)

root@go3:~# equery b gcj
 * Searching for gcj ...
dev-lang/swig-3.0.12 (/usr/share/swig/3.0.12/gcj)
sys-devel/gcc-5.4.0-r3 (/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gcj -> x86_64-pc-linux-gnu-gcj)
sys-devel/gcc-5.4.0-r3 (/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/gcj)
sys-devel/gcc-5.4.0-r3 (/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/gnu/gcj)
sys-devel/gcc-5.4.0-r3 (/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/gcj)


Also:

Code:

root@go3:~# emerge -av gcc

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

Calculating dependencies... done!
[ebuild   R   *] sys-devel/gcc-6.3.0:6.3.0::gentoo  USE="cxx fortran graphite nls nptl openmp pch sanitize vtv (-altivec) (-awt) -cilk -debug -doc (-fixed-point) (-gcj) -go (-hardened) (-jit) (-libssp) -mpx (-multilib) -objc -objc++ -objc-gc -pie -regression-test -ssp -vanilla" 0 KiB


gcc6 has a gcj flag but I am unable to apply it for some reason.

Much obliged to anyone who can point me in the right direction.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 40627
Location: 56N 3W

PostPosted: Thu Apr 06, 2017 10:16 pm    Post subject: Reply with quote

imesg,

The (-gcj) means that the flag is forced off in your profile.
I have built gcc-6.3 with gcj but its not well tested. The java compiler is being removed in gcc-7.

Make the file /etc/portage/profile/package.use.mask/gcj
Add a line
Code:
>sys-devel/gcc-6 -gcj
to invert the setting inherited from the profile, for versions of gcc above 6

This will remove the ().
Enable the gcj USE flag in the normal way.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 413

PostPosted: Mon Nov 20, 2017 8:46 am    Post subject: Reply with quote

Also see Bug 562568.
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 180

PostPosted: Mon Nov 20, 2017 6:59 pm    Post subject: Reply with quote

How likely is this -gcj unmask to cause trouble for compiling packages? pdftk seems to require it. If one removes the gcj use flag globally and only enables it on pdftk in package.use, would it then affect any package except pdftk?

E.g. is there a risk a package not using gcj use flag fails to compile if gcj is enabled for gcc and pdftk alone?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 18568
Location: here

PostPosted: Mon Nov 20, 2017 7:29 pm    Post subject: Reply with quote

You should keep gcc5 for package that require gcj (see here and here)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 413

PostPosted: Mon Nov 20, 2017 8:19 pm    Post subject: Reply with quote

It seems qpdf might be a partial alternative to pdftk that is still developed. Does anyone have any experience with it? How do they compare?
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 400
Location: Gainesville, FL, USA

PostPosted: Mon Nov 20, 2017 11:57 pm    Post subject: Reply with quote

As I noted in another thread, a few years ago when I needed to do some mangling of PDF's I worked with both PDFtk and QPDF. My recollection is that I could do more of what I wanted to do with QPDF. I'm glad to see that that's the one still under development.

That said, I note that current version of QPDF is 7.0.0. The stable version of app-text/qpdf is still at 5.1.1-r1. QPDF 5.1.1 is pretty long in the tooth. Version 7.0.0 is in the tree (as are two intermediate versions) but keyworded. The package was still at 5.1.1 when I compared it to PDFtk.
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 413

PostPosted: Tue Nov 21, 2017 8:40 am    Post subject: Reply with quote

miket wrote:
That said, I note that current version of QPDF is 7.0.0. The stable version of app-text/qpdf is still at 5.1.1-r1. QPDF 5.1.1 is pretty long in the tooth.

And 7.0.0 fixes several security issues; so best move to that version.
Back to top
View user's profile Send private message
msst
Apprentice
Apprentice


Joined: 07 Jun 2011
Posts: 180

PostPosted: Wed Nov 22, 2017 10:08 pm    Post subject: Reply with quote

I'll look more into using qpdf. It seems to be able to do most stuff that pdftk can do.

Though the usage and documentation appears to be more complicated / less complete. Anyone know a good frontend for qpdf?
Back to top
View user's profile Send private message
njsg
n00b
n00b


Joined: 17 Dec 2005
Posts: 68

PostPosted: Mon Feb 12, 2018 1:17 am    Post subject: Reply with quote

fedeliallalinea wrote:
You should keep gcc5 for package that require gcj (see here and here)


Is there any reason why it is not possible (after making the required changes in portage configuration files and in the pdftk ebuild) to compile it with gcj from gcc6?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 18568
Location: here

PostPosted: Mon Feb 12, 2018 6:47 am    Post subject: Reply with quote

njsg wrote:
Is there any reason why it is not possible (after making the required changes in portage configuration files and in the pdftk ebuild) to compile it with gcj from gcc6?

See this comment.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
njsg
n00b
n00b


Joined: 17 Dec 2005
Posts: 68

PostPosted: Mon Feb 12, 2018 11:22 am    Post subject: Reply with quote

fedeliallalinea wrote:
njsg wrote:
Is there any reason why it is not possible (after making the required changes in portage configuration files and in the pdftk ebuild) to compile it with gcj from gcc6?

See this comment.


That comment and everything else I've read on this matter so far seems to imply that it is possible to have and use gcj from gcc-6.*. The USE flag is masked, but you can unmask it. If you check the comment for that mask, it looks like there's absolutely no problem in building gcc-6.* with gcj and that it was an attempt to use the mask as a news item.

The reason why I am asking is to know if there is actually some problem with gcj from gcc-6.*, or if it would be okay to simply unmask the USE flag and adapt the pdftk ebuild to use that version of gcc.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 18568
Location: here

PostPosted: Mon Feb 12, 2018 12:06 pm    Post subject: Reply with quote

njsg wrote:
The reason why I am asking is to know if there is actually some problem with gcj from gcc-6.*, or if it would be okay to simply unmask the USE flag and adapt the pdftk ebuild to use that version of gcc.

I think if you unmask this use flag probably you can compile pdftk. The problem is with gcc-7 that remove java support.
/usr/portage/profiles/base/package.use.mask:
# Magnus Granberg <zorry@gentoo.org> (18 Jan 2017)
# Adding the mask so that end users and devlopers are notified of the removal and have some
# time to migrate. There is no support for gcj in gcc-7
>=sys-devel/gcc-6.3.0 gcj

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
njsg
n00b
n00b


Joined: 17 Dec 2005
Posts: 68

PostPosted: Tue Feb 13, 2018 12:57 pm    Post subject: Reply with quote

Okay, so I enabled USE=gcj for gcc-6.4.0, adapted the pdftk ebuild and managed to compile it with this version of gcc after removing 5.4.0 from my system.

So far, it seems to be working.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum