Request gcc 34 port build gcj
Patrick Dung
patrick_dkt at yahoo.com.hk
Mon Sep 19 09:58:06 PDT 2005
Hi
I have noticed that file at the end of August.
I have email a proposed solution to pdftk's author.
Below is my mail to the author/
Note that I can 'fix' pdftk to build with gcj41 but the resulting
binary core dump.
BTW, from author's web site: http://www.pdfhacks.com/pdftk/#build
You see that: I build pdftk using gcc/gcj/libgcj versions 3.3.4.
So I think gcj34 is the best thing to compile pdftk.
Patrick
> Hi Sid Steward
>
> When I was trying to compile pdftk 1.2.1 with gcj41 in FreeBSD, I
have
> discovered something.
>
> 1. There is a compile error in itext's pdf/codecs/PngImage.java about
> the ICC profile. I have seen you have comment out
> import com.lowagie.text.ImgRaw
>
> After enabling this line, I can complie this class with gcj41.
>
> 2. Makefile.Base include convert.a static lib (from your source).
> Makefile.Generic has include -lgcj.
> When compiling pdftk binary and linking all the libraries, it said
> duplicate defination or something. Comment out the convert.a line in
> Makefile.Base won't have that error.
>
> 3. It has linking problem with libiconv, I don't know it's FreeBSD OS
> problem, FreeBSD's gcc 41 problem or pdftk problem. This problem is
not
> seen in pdftk with gcj 3.x.
> Then I use the static library of libiconv instead of the shared lib
to
> make it compile the pdftk binary.
>
> 4. The resulting pdftk binary cannot be run. It will have core dump.
> Signal 6. Seems problem with FreeBSD's libpthread.
>
> I hope this will help in your new version of pdftk.
>
> Regards
> Patrick
--- Gerald Pfeifer <gerald at pfeifer.com> wrote:
> On Sat, 17 Sep 2005, Patrick Dung wrote:
> > I think the problem should also appear in Linux with pdftk and gcj
> 4.1
> > because the problem is related to itext that comes with pdftk and
> > gcj41.
>
> That's a good point. I'm attaching the respective two files from the
> current SUSE tree (one patch and the RPM spec file) which uses GCC
> 4.0.
>
> Does this help? Otherwise, looking at Fedora sources might be
> interesting.
>
> Gerald> diff -Naur
> pdftk-1.12.orig/java_libs/com/lowagie/text/pdf/codec/PngImage.java
> pdftk-1.12/java_libs/com/lowagie/text/pdf/codec/PngImage.java
> ---
> pdftk-1.12.orig/java_libs/com/lowagie/text/pdf/codec/PngImage.java
> 2004-05-27 00:06:12.000000000 +0200
> +++ pdftk-1.12/java_libs/com/lowagie/text/pdf/codec/PngImage.java
> 2005-08-22 12:08:55.000000000 +0200
> @@ -93,7 +93,7 @@
>
> import com.lowagie.text.ExceptionConverter;
> import com.lowagie.text.Image;
> -//SID import com.lowagie.text.ImgRaw;
> +import com.lowagie.text.ImgRaw;
> import com.lowagie.text.pdf.ByteBuffer;
> import com.lowagie.text.pdf.PdfArray;
> import com.lowagie.text.pdf.PdfDictionary;
> > #
> # spec file for package pdftk (Version 1.12)
> #
> # Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
> # This file and all modifications and additions to the pristine
> # package are under the same license as the package itself.
> #
> # Please submit bugfixes or comments via http://www.suse.de/feedback/
> #
>
> # neededforbuild gcc-java gpp libgcj libgcj-devel libgpp
>
> BuildRequires: aaa_base acl attr bash bind-utils bison bzip2
> coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils
> e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel
> gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info
> insserv klogd less libacl libattr libcom_err libgcc libnscd
> libselinux libstdc++ libxcrypt libzio m4 make man mktemp
> module-init-tools ncurses ncurses-devel net-tools netcfg
> openldap2-client openssl pam pam-modules patch permissions popt
> procinfo procps psmisc pwdutils rcs readline sed strace sysvinit tar
> tcpd texinfo timezone unzip util-linux vim zlib zlib-devel autoconf
> automake binutils gcc gcc-c++ gcc-java gdbm gettext libgcj
> libgcj-devel libstdc++-devel libtool perl rpm
>
> Name: pdftk
> Summary: The PDF Toolkit
> Version: 1.12
> Release: 4
> License: GPL
> URL: http://www.accesspdf.com/pdftk/
> Source0: %{name}-%{version}.tar.bz2
> Patch0: %{name}-%{version}.patch
> Group: Productivity/Publishing/PDF
> BuildRoot: %{_tmppath}/%{name}-%{version}-build
> Requires: libgcj
>
> %description
> Pdftk is a command-line tool for manipulating PDF documents. Use it
> to
> merge, split PDF pages into a new document, decrypt input as
> necessary
> (password required), encrypt output as desired, fill PDF forms with
> FDF
> data, flatten forms, apply a background watermark, repair a corrupted
> PDF (where possible), and many others.
>
>
>
> Authors:
> --------
> Sid Steward
>
> %prep
> %setup -q
> %patch0 -p1
>
> %build
> %{suse_update_config -fl}
> unset CLASSPATH && cd pdftk && make -f Makefile.RedHat && cd -
>
> %install
> rm -rf $RPM_BUILD_ROOT
> mkdir -p $RPM_BUILD_ROOT/%{_bindir}
> mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
> install -m 0755 pdftk/pdftk $RPM_BUILD_ROOT/%{_bindir}/pdftk
> install -m 0644 debian/pdftk.1
> $RPM_BUILD_ROOT/%{_mandir}/man1/pdftk.1
> gzip $RPM_BUILD_ROOT/%{_mandir}/man1/pdftk.1
>
> %clean
> rm -rf $RPM_BUILD_ROOT
>
> %files
> %defattr(-,root,root)
> %doc pdftk.1.html pdftk.1.notes pdftk.1.txt
> %{_bindir}/*
> %{_mandir}/man1/*
>
> %changelog -n pdftk
> * Mon Aug 22 2005 - skh at suse.de
> - Fix build.
> * Wed Jan 26 2005 - ke at suse.de
> - New package proposed by Thomas Schraitle; version 1.12.
> > _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to
"freebsd-ports-unsubscribe at freebsd.org"
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the freebsd-ports
mailing list