Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 2014 08:01:38 GMT
From:      Jonathan Chen <jonc@chen.org.nz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186956: Remote debugging on openjdk7 fails with "/usr/local/openjdk7/jre/lib/amd64/libnpt.so: Undefined symbol "libiconv_open"
Message-ID:  <201402220801.s1M81cG5085996@cgiserv.freebsd.org>
Resent-Message-ID: <201402220810.s1M8A02t009243@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186956
>Category:       ports
>Synopsis:       Remote debugging on openjdk7 fails with "/usr/local/openjdk7/jre/lib/amd64/libnpt.so: Undefined symbol "libiconv_open"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 22 08:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Chen
>Release:        10.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD osiris.chen.org.nz 10.0-STABLE FreeBSD 10.0-STABLE #0 r261220: T
hu Jan 30 18:36:34 NZDT 2014 root@osiris.chen.org.nz:/usr/obj/usr/src/sys/OSIRIS
 amd64
>Description:
Starting up tomcat-7 with additional debug flags: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n" results in:

/usr/local/openjdk7/jre/lib/amd64/libnpt.so: Undefined symbol "libiconv_open"

Sure enough:

8:53pm> nm /usr/local/openjdk7/jre/lib/amd64/libnpt.so | grep iconv 
0000000000002070 t iconvConvert
                 U libiconv
                 U libiconv_close
                 U libiconv_open

This is because I also have libiconv installed, and openjdk/jdk/src/solaris/instrument/EncodingSupport_md.c is including /usr/local/include/iconv.h instead of /usr/include/iconv.h during compilation from its: #include <iconv.h> directive.
>How-To-Repeat:
Install libiconv.
Build java/openjdk7
>Fix:
A workaround is to shift /usr/local/include/iconv.h out of the way during the build (and restore once complete).

A possible fix would be to patch EncodingSupport_md.c to force it to use the base system's iconv.h during post-patch?

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402220801.s1M81cG5085996>