From owner-freebsd-questions@FreeBSD.ORG Wed Jun 10 23:23:08 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE13B106564A for ; Wed, 10 Jun 2009 23:23:08 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id 895F58FC0C for ; Wed, 10 Jun 2009 23:23:08 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MEX8C-000FA2-CI; Wed, 10 Jun 2009 19:23:01 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by cube.entropy.prv (Postfix) with ESMTP id 40A472FBA74F; Wed, 10 Jun 2009 19:22:56 -0400 (EDT) Message-ID: <4A30404C.4090806@FreeBSD.org> Date: Wed, 10 Jun 2009 19:22:52 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Joe Auty References: <552574.63307.qm@web39108.mail.mud.yahoo.com> <4A29D256.4050902@netmusician.org> <4A29D77F.5000608@netmusician.org> In-Reply-To: <4A29D77F.5000608@netmusician.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.1 (/) Cc: bf , freebsd-questions@FreeBSD.org Subject: Re: GCC/GCJ and pdftk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 23:23:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joe Auty wrote: > Joe Auty wrote: >> bf wrote: >>> >> >>>> However, I've also read in the pdftk port logs that gcj is included in >>>> GCC 3.4+ when WITHOUT_JAVA in the GCC Makefile is set to no or >>>> commented >>>> out. So, I compiled GCC with gcj support without a problem, and >>> >>> >>> Oh yes, did you? Really? How? Better look again. >>> > > Sorry, I forgot to answer the "how" part of this: I simply build GCC42 > with WITHOUT_JAVA set to no. > > >> >> Yes, I did: >> >> $ ls /usr/local/bin/gcj* >> /usr/local/bin/gcj42 /usr/local/bin/gcjh42 >> >> >> >>> >>>> commented out the NOT_FOR_ARCHS line above to force an install of >>>> pdftk: >>> >>>>> ===> pdftk-1.41 depends on executable: gmake - found >>>>> ===> pdftk-1.41 depends on shared library: gcj - not found >>>>> ===> Verifying install for gcj in /usr/ports/lang/gcc42 >>>>> ===> Returning to build of pdftk-1.41 >>>>> Error: shared library "gcj" does not exist >>> >>>> gcj does indeed exist in /usr/ports/lang/gcc42: >>> >>>>> # find /usr/ports/lang/gcc42 -name "gcj" >>>>> /usr/ports/lang/gcc42/work/gcc-4.2-20090325/libjava/gnu/gcj >>>>> /usr/ports/lang/gcc42/work/gcc-4.2-20090325/libjava/gcj >>>>> /usr/ports/lang/gcc42/work/build/gcc/gcj >>> >>> The "gcj" that the port is searching for must be the appropriate >>> binary executable, or a link to it, and must be in your PATH. In this >>> case, >>> if properly installed via the port, it would be: >>> >>> gcj42, gcj43, gcj44, or gcj45, >>> >>> and would be in /usr/local/bin. >>> >> >> See above. The reason why I was thinking that for some reason it looks >> for it in the port directory is the following in the Makefile: >> >>> # needs gcj >>> LIB_DEPENDS= gcj:${PORTSDIR}/lang/gcc${CSUFF} >> >> >> Perhaps I'm just misinterpreting things... It's strange though that the >> reason for pdftk not building seems to be that gcj does not compile on >> amd64 systems, when this doesn't seem to be true. I've read about >> problems with memory consumption of gcj, but I don't know if these still >> remain true - these posts were rather old. >> >> However, again, all of this is with huge accuracy caveats, I'm >> definitely not confident with my piecing together of information here... >> >> >>> All that you have done is find what I suspect are empty directories in >>> the WRKDIR for the lang/gcc42 port. Consider the 'which' command; or >>> limiting the directories searched and the using of '-not -type d' if >>> employing 'find' in this way in the future. >>> >>> >>>> Any suggestions as to what I can do to build pdftk? This particular >>>> project will surely be much harder if I can't get pdftk >>>> to>build/compile... >>> >>> In the order of increasing effort: >>> >>> 1) Use a tool other than pdftk to manipulate your PDF files. pdftk is >>> just a wrapper around an old version of devel/itext, structured with >>> the idea of compiling it with gcj. You could just install Java and >>> use the more up-to-date devel/itext. Or use print/ghostscript8, >>> graphics/poppler, or print/xpdf, either directly or via one of the many >>> programs (for example, print/kpdftool) that use them to do the dirty >>> work. >>> Also textproc/p5-CAM-PDF, print/py-pdf, ... >>> >> >> I will definitely look at itext! I'm using FPDI to insert header stamps >> into existing PDF files, and need something to rotate and merge PDFs. >> I've looked at Ghostscript a little, but was really attracted to the >> simplicity of doing this in pdftk. If you have any other suggestions of >> solutions I could look into other than itext, I'd appreciate them! I'm >> rather new to PDF manipulation... >> >> >>> 2) Switch your system to i386 and use pdftk. >>> >>> 3) Find a way to build gcj on architectures other than i386, or persuade >>> or browbeat gerald@ into doing it. Debian has packages for other >>> architectures, for example. You could look at what they've done. >>> >>> >>> b. Hi all, I compiled gcc42+libgcj successfully and then print/pdftk without any problems on 7.1-RELEASE amd64. Still to do: - - Run "make check" in gcc42 work directory to see if any problems pop up - - Run some tests with pdftk on sample PDF files to check for problems - - Contact gerald@ to find out if there are other reasons why libgcj should not be enabled on amd64. Cheers, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKMEBM0sRouByUApARAgBdAKDE6iBJjevQu1zNNodBCKbm1yrCowCgnVNj N2HCr1Ijz8paREMUr4GJUiI= =xg4+ -----END PGP SIGNATURE-----