Opened 4 years ago

Closed 4 years ago

#61528 closed defect (fixed)

gnuplot: runtime warning about multiple implementations of wxNSAppController

Reported by: francescopappalardo Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: nomennudum (Roger Hayter)
Port: gnuplot wxWidgets-3.0

Description

After installing gnuplot with port install gnuplot on BigSur, the following warning appears at runtime:

objc[87354]: Class wxNSAppController is implemented in both /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/libwx_osx_cocoau_core-3.0.0.4.0.dylib (0x111b68c40) and /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/libwx_osx_cocoau_core-3.0.dylib (0x1109d7c40). One of the two will be used. Which one is undefined.

Change History (9)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Keywords: gnuplot wxWidgets removed
Owner: set to mojca
Port: gnuplot wxWidgets-3.0 added
Status: newassigned
Summary: gnuplotgnuplot: runtime warning about multiple implementations of wxNSAppController

comment:2 Changed 4 years ago by francescopappalardo

This is another warning that appears:

../src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxHeaderCtrlEvent" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?

comment:3 Changed 4 years ago by nomennudum (Roger Hayter)

Cc: nomennudum added

comment:4 Changed 4 years ago by puentev (Valentin Puente)

It's more than a warning. wxWidget terminal don't work (SEGs faults).

comment:5 Changed 4 years ago by mojca (Mojca Miklavec)

We need help from upstream, and I don't have BigSur yet. Would you be willing to open a ticket with details at https://trac.wxwidgets.org/newticket and post a link here? I can do it myself, but I won't be able to answer any followup questions.

Can you perhaps to try replace wxWidgets 3.0 with 3.2 in the gnuplot portfile and see whether that makes any difference?

comment:6 Changed 4 years ago by mojca (Mojca Miklavec)

... or maybe that won't work after all due to #61672, but that's something we should be able to handle ourselves:

comment:7 Changed 4 years ago by d-lamb (Derek Lamb)

I ran into this problem, uninstalled both wxWidgets-3.0 and gnuplot, then reinstalled both from source. The several hundred lines of warnings goes away, and the wxt terminal is able to be used without causing a segfault. The solution of "try rebuilding from source" should be prominently displayed at the top of the wiki page BigSurProblems (and CatalinaProblems, and MavericksProblems...).

When installing not from source, just using port install gnuplot, I get this:

$ cd /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib
$ ls -l libwx_osx_cocoau_core*
-rwxr-xr-x  1 root  wheel  4743504 Nov 23 01:52 libwx_osx_cocoau_core-3.0.0.4.0.dylib
-rwxr-xr-x  1 root  wheel  4743504 Nov 23 01:52 libwx_osx_cocoau_core-3.0.0.dylib
-rwxr-xr-x  1 root  wheel  4743504 Nov 23 01:52 libwx_osx_cocoau_core-3.0.dylib

And running the following commands causes a segfault:

$ gnuplot
<lots of lines of warnings, and Gnuplot startup messages>

Terminal type is now 'aqua'
gnuplot> test
gnuplot> set term wxt

Terminal type is now 'wxt'
Options are '0 enhanced'
gnuplot> test
zsh: segmentation fault  gnuplot

After reinstalling wxWidgets and gnuplot from source, the .dylib symlinks are set up correctly:

$ ls -l libwx_osx_cocoau_core*
-rwxr-xr-x  1 root  wheel  4743504 Jan 20 08:37 libwx_osx_cocoau_core-3.0.0.4.0.dylib
lrwxr-xr-x  1 root  wheel       37 Jan 20 08:37 libwx_osx_cocoau_core-3.0.0.dylib -> libwx_osx_cocoau_core-3.0.0.4.0.dylib
lrwxr-xr-x  1 root  wheel       33 Jan 20 08:37 libwx_osx_cocoau_core-3.0.dylib -> libwx_osx_cocoau_core-3.0.0.dylib

And no segfault:

$ gnuplot

	G N U P L O T
	Version 5.4 patchlevel 1    last modified 2020-12-01 

	Copyright (C) 1986-1993, 1998, 2004, 2007-2020
	Thomas Williams, Colin Kelley and many others

	gnuplot home:     http://www.gnuplot.info
	faq, bugs, etc:   type "help FAQ"
	immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'aqua'
gnuplot> test
gnuplot> set term wxt

Terminal type is now 'wxt'
Options are '0 enhanced'
gnuplot> test
gnuplot> exit

This suggests to me that there is not a problem with wxWidgets upstream, but rather the buildbot (as there has been for the last couple macOS & Xcode upgrades), but I am not familiar enough with MacPorts internals to say much more about it.

comment:8 Changed 4 years ago by mojca (Mojca Miklavec)

comment:9 Changed 4 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.