ports/186956: Remote debugging on openjdk7 fails with "/usr/local/openjdk7/jre/lib/amd64/libnpt.so: Undefined symbol "libiconv_open"

Jonathan Chen jonc at chen.org.nz
Sat Feb 22 08:10:01 UTC 2014


>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 at 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:


More information about the freebsd-ports-bugs mailing list