Bug 184204 - Undefined symbol "libiconv_open" on startup for java/netbeans
Summary: Undefined symbol "libiconv_open" on startup for java/netbeans
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 02:50 UTC by Kevin Zheng
Modified: 2014-03-05 21:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2013-11-24 02:50:00 UTC
On startup, java/netbeans dies with the following message:

[kevinz@sigma ~]$ netbeans-7.4 
/usr/local/openjdk7/jre/lib/i386/libsplashscreen.so: Undefined symbol "libiconv_open"

So far I've been unable to reproduce similar splash screen bugs with other Java programs, which convinced me to file it under java/netbeans.

It seems that other people have had this problem as well:
http://lists.freebsd.org/pipermail/freebsd-ports/2013-November/087492.html

How-To-Repeat: Install Netbeans and try to start it.
Comment 1 Edwin Groothuis freebsd_committer 2013-11-24 02:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gahr

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pietro Cerutti freebsd_committer 2013-11-25 11:13:43 UTC
Responsible Changed
From-To: gahr->java

It looks like an OpenJDK 7 port problem to me; java@, do you ack?
Comment 3 Kevin Zheng 2013-11-29 15:23:21 UTC
Hi again,

Until the problem is resolved, there is a fairly simple workaround.
Simply disable the splash screen by invoking Netbeans from the command
line with "--nosplash".

To make this change system-wide, edit
"/usr/local/netbeans-7.4/etc/netbeans.conf" and add "--nosplash" to
netbeans_default_options.

Thanks,
Kevin Zheng
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-12-11 17:08:04 UTC
Responsible Changed
From-To: java->freebsd-java

Canonicalize assignment.
Comment 5 Kevin Zheng 2013-12-25 05:13:02 UTC
Hi FreeBSD Java Team,

I could not reliably reproduce this bug on similar systems (same
architecture, OS, packages, JDK). This issue seemed to be isolated to
one machine, and persisted even after package updates.

Since the machine in question was reinstalled (due to other reasons), I
can no longer reproduce the problem. The ports (both Java and Netbeans)
seem to be fine. *Go ahead and close this bug report.*

A big thanks goes out to the people who make FreeBSD an excellent system
for the Java platform.

Thanks,
Kevin Zheng
Comment 6 pl 2014-02-26 05:29:06 UTC
Hi Gang!,

I just finished up on an installation of FreeBSD 10 (i386) within a 
VirtualBox environment and guess what? I can reproduce the problem.

However, apart from disabling the splash screen I discovered something 
else which might shed some new light on this issue. I started doing some 
tests and traces and eventually discovered that this problem evolves 
around ~/.cache/netbeans/7.4.

This is the so called cache directory (see netbeans_default_cachedir in 
/usr/local/netbeans-7.4/etc/netbeans.conf) which only contains ('large') 
files which are always safe to delete.

If you delete this directory after you've finished a NetBeans session 
then you won't experience this iconv problem. If you do experience the 
"iconv problem" then simply remove the cache dir (rm -rf 
~/.cache/netbeans/7.4) and the problems are over once more.

You can run into some weird behaviour though; like starting NetBeans, 
getting notifications that you have "21 updates" and when you go to the 
plugin screen it quickly says that there are no updates available. Only 
after you did a new search will you see these again.

Even so; bottom line is that I'm convinced that this problem is fully 
related to the usage of cache.

Hope this can help or shed some more information on all this.

Kind regards, Peter
Comment 7 Tijl Coosemans freebsd_committer 2014-03-04 08:58:48 UTC
Hi,

Please try the patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186956
Comment 8 dfilter service freebsd_committer 2014-03-05 20:59:58 UTC
Author: tijl
Date: Wed Mar  5 20:59:50 2014
New Revision: 347142
URL: http://svnweb.freebsd.org/changeset/ports/347142
QAT: https://qat.redports.org/buildarchive/r347142/

Log:
  - Include bsd.port.pre.mk before testing if ICONV_LIB is empty.  It is
    always empty without this. [1]
  - Add -DLIBICONV_PLUG to CFLAGS to enforce the use of libc iconv even when
    libiconv is installed. [2]
  
  PR:		ports/184204 [1], ports/184782 [1], ports/186956 [2]
  Approved by:	glewis (maintainer)

Modified:
  head/java/openjdk7/Makefile

Modified: head/java/openjdk7/Makefile
==============================================================================
--- head/java/openjdk7/Makefile	Wed Mar  5 20:31:02 2014	(r347141)
+++ head/java/openjdk7/Makefile	Wed Mar  5 20:59:50 2014	(r347142)
@@ -3,7 +3,7 @@
 
 PORTNAME=	openjdk
 PORTVERSION=	${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER}
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	java devel
 MASTER_SITES=	http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \
@@ -138,6 +138,12 @@ PATCH_DEPENDS+=	gpatch:${PORTSDIR}/devel
 PATCH=		gpatch
 .endif
 
+.include <bsd.port.pre.mk>
+
+.if empty(ICONV_LIB)
+MAKE_ENV+=	EXTRA_CFLAGS=-DLIBICONV_PLUG
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} "s|%%LOCALBASE%%|${LOCALBASE}|" \
 		${WRKSRC}/hotspot/src/os/bsd/vm/os_bsd.cpp
@@ -180,4 +186,4 @@ post-install:
 	# Register the VM
 	"${LOCALBASE}/bin/registervm" "${INSTALLDIR}/bin/java # OpenJDK${JDK_MAJOR_VERSION}"
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Tijl Coosemans freebsd_committer 2014-03-05 21:00:30 UTC
State Changed
From-To: open->closed

Fixed in r347142.