From: Greg Larkin on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerald Pfeifer wrote:
> On Tue, 13 Apr 2010, Greg Larkin wrote:
>> Ok, I see why there's a problem now. My linker hints were set up in
>> such a way that /usr/local/lib/gcc45 appeared before /usr/lib, so I
>> didn't have the libstdc++.so.6 problem. However, that's not a normal
>> configuration, so we have to fix this another way.
>>
>> Gerald, you ran into this problem a while back and posted a question
>> about it here:
>> http://www.mail-archive.com/freebsd-ports(a)freebsd.org/msg23261.html
>>
>> There are some other folks with the same problem here (old thread):
>> http://gcc.gnu.org/ml/gcc/2001-03/msg01069.html
>>
>> Did you ever decide on a resolution for this problem? Should I simply
>> create a wrapper script for pdftk that sets LD_LIBRARY_PATH, or is the
>> rpath solution better?
>
> The way I have addressed this for C, C++ and from what I can tell all
> relevant Fortran users of USE_GCC= is by setting the following
>
> CFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS}
> LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS}
>
> in Mk/bsd.gcc.mk.
>
> Apparently pdftk does not use LDFLAGS (and it not using CFLAGS for Java
> code is somewhat expected). Is there some similar variable we could set
> for Java code? JFLAG, JAVAFLAGS,...? Or could you inject the use of
> CFLAGS or LDFLAGS during linking?
>
> Gerald

Hi Gerald,

Thank you for that pointer, and I'll have a look at the pdftk build
process and see if I can do something equivalent during the compile and
link phases.

If I can get that work, then perhaps the gcc45+gcj patch will be ready
to commit and we can leave gcc42+gcj behind!

Thank you,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/ - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLx8Qg0sRouByUApARAotDAKCYyKTnHJO9zJxkkhYyOO1T2F2gCQCeMywi
YS0b3mvOj2ZKphjdqmqVtoE=
=41Ip
-----END PGP SIGNATURE-----

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Greg Larkin on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tsurutani Naoki wrote:
> Greg Larkin <glarkin(a)freebsd.org> wrote:
>
[... original patching instructions deleted ...]
>
[... results of first patch set testing ...]
>
> 1. FreeBSD/amd64 8-STABLE : building OK, but failed to run.
> % uname -a
> FreeBSD h116.65.226.10.32118.vlan.kuins.net 8.0-STABLE FreeBSD 8.0-STABLE #22: Sat Feb 13 14:06:06 JST 2010 turutani(a)h116.65.226.10.32118.vlan.kuins.net:/usr/obj/usr/src/sys/POLYMER13 amd64
> % pdftk /usr/local/share/doc/OpenEXR/TechnicalIntroduction.pdf output out.pdf owner_pw foopass
> /libexec/ld-elf.so.1: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/local/bin/pdftk not found
>
[...]
>
> 3, 4. FreeBSD/i386 8-STABLE : just the same on amd64.
> % uname -a
> FreeBSD h120.65.226.10.32118.vlan.kuins.net 8.0-STABLE FreeBSD 8.0-STABLE #22: Sat Feb 13 14:53:25 JST 2010 turutani(a)h120.65.226.10.32118.vlan.kuins.net:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386
> % pdftk /usr/local/share/doc/OpenEXR/TechnicalIntroduction.pdf output suzu.128.pdf owner_pw foopass
> /libexec/ld-elf.so.1: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/local/bin/pdftk not found
>
>
> ---
> Tsurutani Naoki
> turutani(a)scphys.kyoto-u.ac.jp

Hello Tsurutani,

I have a new patch set for you to build pdftk with gcc 4.5. This one
fixes the libstdc++ versioning problem by passing the -Wl,rpath argument
to gcj (thank you, Gerald) so pdftk finds the correct shared library.

You can find the patch files here:

http://people.freebsd.org/~glarkin/diffs/gcc45%2bgcj-2.diff
http://people.freebsd.org/~glarkin/diffs/pdftk%2bgcc45-2.diff

To apply them, first update your ports tree to get the latest version of
lang/gcc45 and fetch the patch files into /usr/ports. Then follow these
steps:

cd /usr/ports
patch < gcc45+gcj-2.diff
patch < pdftk+gcc45-2.diff
cd lang/gcc45 && make deinstall install clean
cd ../../print/pdftk
find files -name patch-\*.orig -delete
make deinstall install clean

Let me know how that works for you, and if everything builds
successfully, I'll commit the changes to the ports tree.

Thank you,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/ - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLzb+p0sRouByUApARAnOtAJ0TxJCPfuTSemZz1QEKU9UWBZcwuQCgo3+m
PY3Sz2PDIyUmJFBtKLPiugg=
=do8G
-----END PGP SIGNATURE-----

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Tsurutani Naoki on
Thank you for your fix.
pdftk can be built and executed with gcc42.
however, it requires gcc42 when we run pdftk.
we need some kinds of
RUN_DEPENDS= ${LOCALBASE}/lib/gcc${CSUFF}/libgcj.so:${PORTSDIR}/lang/gcc${CSUFF}
in print/pdftk/Makefile, I think.


---
Tsurutani Naoki
turutani(a)scphys.kyoto-u.ac.jp
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Tsurutani Naoki on
Greg Larkin <glarkin(a)freebsd.org> wrote:

> As far as I can tell, this error is caused by the LANG setting which
> changes the line:
>
> if (value.startsWith("\""))
>
> into something that results an unterminated string. I suppose the
> backslash loses its meaning as an escape character.
>
> I found some references to the same error in Google, posted by folks
> trying to compile software with different LANG settings. I haven't
> found a general fix yet, but maybe it can be done by building a
> character string from individual, unescaped characters, then converting
> them to a java.lang.String object for use in the .startsWith() function.
>
> If you could submit a PR to support building with LANG=ja_JP.eucJP, I
> would be very appreciative!

Thank you for your reply.
But I have no idea to avoid this...
This trouble does not occur while building with gcc42 or any older building
processes. Therefore I think this may be a bug of gcc45.
Moving to gcc45, this may cause an error.
In addition, run-time dependence to gcc library may be necessary
as I said in another mail.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Greg Larkin on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tsurutani Naoki wrote:
> Greg Larkin <glarkin(a)freebsd.org> wrote:
>
>> As far as I can tell, this error is caused by the LANG setting which
>> changes the line:
>>
>> if (value.startsWith("\""))
>>
>> into something that results an unterminated string. I suppose the
>> backslash loses its meaning as an escape character.
>>
>> I found some references to the same error in Google, posted by folks
>> trying to compile software with different LANG settings. I haven't
>> found a general fix yet, but maybe it can be done by building a
>> character string from individual, unescaped characters, then converting
>> them to a java.lang.String object for use in the .startsWith() function.
>>
>> If you could submit a PR to support building with LANG=ja_JP.eucJP, I
>> would be very appreciative!
>
> Thank you for your reply.
> But I have no idea to avoid this...
> This trouble does not occur while building with gcc42 or any older building
> processes. Therefore I think this may be a bug of gcc45.
> Moving to gcc45, this may cause an error.
> In addition, run-time dependence to gcc library may be necessary
> as I said in another mail.

Hi Tsurutani,

Can you file a bug report against gcj45 with the LANG=ja_JP.eucJP
setting, using the pdftk problem as an example? That way, the upstream
gcc developers will be notified that there's a problem.

In the mean time, I am investigating whether it's feasible to add Java
support to all of the lang/gcc4* ports so pdftk can use a version older
than 4.5, if the gcj binary is already installed. This will also save a
lot of time installing a complete gcc just to get the gcj compiler.

Thank you,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/ - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL2cj30sRouByUApARArt6AKC/Wj8VdMkI1sRyLt56g/ROTCFsYACgn7tE
yhWtxv6W9jg0WJXv0VfCxLU=
=sP3a
-----END PGP SIGNATURE-----

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"