Opened 4 years ago
Closed 21 months ago
#61933 closed defect (fixed)
wxmaxima crashes on macOS Big Sur v11k - conflicting wxWidget libs
Reported by: | chlangley | Owned by: | MSoegtropIMC |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | wxmaxima |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
installing wxmaxima (20.04) into a fresh macport (macOS Big Sur v11) the app crashes immediately with the following complaint in the log:
Dec 28 23:46:53 rootless8 wxmaxima[91466]: objc[91466]: Class wxOSXStatusItemTarget is implemented in both /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/libwx_osx_cocoau_adv-3.0.0.4.0.dylib (0x105e5a6d8) and /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/libwx_osx_cocoau_adv-3.0.dylib (0x1048056d8). One of the two will be used. Which one is undefined.
Change History (18)
comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | set to MSoegtropIMC |
Status: | new → assigned |
comment:2 Changed 4 years ago by ggruener
The is implemented in both...
warning is repeated very many times.
These warnings are then followed by very many
../src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxCommandEvent" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?
And then
../src/common/stdpbase.cpp(62): assert "traits" failed in Get(): create wxApp before calling this Segmentation fault
Inspecting /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/
shows that three equal files exist per each lib instead of two symbolic links pointing to the versioned lib. For example:
-rwxr-xr-x 1 root wheel 743K Nov 23 09:52 libwx_osx_cocoau_xrc-3.0.0.4.0.dylib* -rwxr-xr-x 1 root wheel 743K Nov 23 09:52 libwx_osx_cocoau_xrc-3.0.0.dylib* -rwxr-xr-x 1 root wheel 743K Nov 23 09:52 libwx_osx_cocoau_xrc-3.0.dylib*
Making symbolic links to the versioned lib fixes the problem. For example:
-rwxr-xr-x 1 root wheel 743K Nov 23 09:52 libwx_osx_cocoau_xrc-3.0.0.4.0.dylib* lrwxr-xr-x 1 root wheel 36B Dec 29 15:25 libwx_osx_cocoau_xrc-3.0.0.dylib@ -> libwx_osx_cocoau_xrc-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 32B Dec 29 15:25 libwx_osx_cocoau_xrc-3.0.dylib@ -> libwx_osx_cocoau_xrc-3.0.0.dylib
I fixed the symlinks for all libs in the directory. After this fix, wxmaxima
starts correctly without warning.
So I guess the source of the problem lies in the installation of port wxWidgets-3.0
. Perhaps it can be corrected to create symlinks instead of copies of the libs.
comment:3 Changed 4 years ago by MSoegtropIMC
Thanks for the report and the propsed fix! I just would say that this isn't an issue of wxMaxima, but an issue of wxWidgets and should be reported there. I don't think it would be appropriate for wxMaxima to change symlinks/files of other packages.
Please don't close the ticket until it is fixed in wxWidgets, so that people can see your porposed fix!
comment:4 Changed 4 years ago by MSoegtropIMC
P.S.: If I don't hear from you that you want to report it to wxWidgets, I will do so tomorrow.
comment:5 Changed 4 years ago by kencu (Ken)
this is due to a bug in Apple's install_name_tool.
See this current email chain: <https://lists.macports.org/pipermail/macports-users/2020-December/049255.html>
There is nothing wrong with wxWidgets, although it uses install_name_tool and so reveals the bug.
The proper fix is to fix install_name_tool, although folks might need to work around this issue until that is done.
comment:6 Changed 4 years ago by kencu (Ken)
I just rebuilt wxWidgets-3.0 from source, and this is fixed now.
WxMaxima works fine as well, once that is done.
Presumably some recent Xcode update fixed it.
% cd /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/ % ls -la total 11992 drwxr-xr-x 48 root wheel 1536 18 Feb 22:30 . drwxr-xr-x 6 root wheel 192 18 Feb 22:30 .. -rwxr-xr-x 1 root wheel 1966728 18 Feb 22:28 libwx_baseu-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 27 18 Feb 22:28 libwx_baseu-3.0.0.dylib -> libwx_baseu-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 23 18 Feb 22:28 libwx_baseu-3.0.dylib -> libwx_baseu-3.0.0.dylib -rwxr-xr-x 1 root wheel 263184 18 Feb 22:28 libwx_baseu_net-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 31 18 Feb 22:28 libwx_baseu_net-3.0.0.dylib -> libwx_baseu_net-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 27 18 Feb 22:28 libwx_baseu_net-3.0.dylib -> libwx_baseu_net-3.0.0.dylib -rwxr-xr-x 1 root wheel 102384 18 Feb 22:28 libwx_baseu_xml-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 31 18 Feb 22:28 libwx_baseu_xml-3.0.0.dylib -> libwx_baseu_xml-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 27 18 Feb 22:28 libwx_baseu_xml-3.0.dylib -> libwx_baseu_xml-3.0.0.dylib -rwxr-xr-x 1 root wheel 1458656 18 Feb 22:28 libwx_osx_cocoau_adv-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 36 18 Feb 22:28 libwx_osx_cocoau_adv-3.0.0.dylib -> libwx_osx_cocoau_adv-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 32 18 Feb 22:28 libwx_osx_cocoau_adv-3.0.dylib -> libwx_osx_cocoau_adv-3.0.0.dylib -rwxr-xr-x 1 root wheel 529784 18 Feb 22:28 libwx_osx_cocoau_aui-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 36 18 Feb 22:28 libwx_osx_cocoau_aui-3.0.0.dylib -> libwx_osx_cocoau_aui-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 32 18 Feb 22:28 libwx_osx_cocoau_aui-3.0.dylib -> libwx_osx_cocoau_aui-3.0.0.dylib -rwxr-xr-x 1 root wheel 4743504 18 Feb 22:28 libwx_osx_cocoau_core-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 37 18 Feb 22:28 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 18 Feb 22:28 libwx_osx_cocoau_core-3.0.dylib -> libwx_osx_cocoau_core-3.0.0.dylib -rwxr-xr-x 1 root wheel 126808 18 Feb 22:28 libwx_osx_cocoau_gl-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 35 18 Feb 22:28 libwx_osx_cocoau_gl-3.0.0.dylib -> libwx_osx_cocoau_gl-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 31 18 Feb 22:28 libwx_osx_cocoau_gl-3.0.dylib -> libwx_osx_cocoau_gl-3.0.0.dylib -rwxr-xr-x 1 root wheel 741384 18 Feb 22:28 libwx_osx_cocoau_html-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 37 18 Feb 22:28 libwx_osx_cocoau_html-3.0.0.dylib -> libwx_osx_cocoau_html-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 33 18 Feb 22:28 libwx_osx_cocoau_html-3.0.dylib -> libwx_osx_cocoau_html-3.0.0.dylib -rwxr-xr-x 1 root wheel 122184 18 Feb 22:28 libwx_osx_cocoau_media-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 38 18 Feb 22:28 libwx_osx_cocoau_media-3.0.0.dylib -> libwx_osx_cocoau_media-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 34 18 Feb 22:28 libwx_osx_cocoau_media-3.0.dylib -> libwx_osx_cocoau_media-3.0.0.dylib -rwxr-xr-x 1 root wheel 816512 18 Feb 22:28 libwx_osx_cocoau_propgrid-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 41 18 Feb 22:28 libwx_osx_cocoau_propgrid-3.0.0.dylib -> libwx_osx_cocoau_propgrid-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 37 18 Feb 22:28 libwx_osx_cocoau_propgrid-3.0.dylib -> libwx_osx_cocoau_propgrid-3.0.0.dylib -rwxr-xr-x 1 root wheel 200936 18 Feb 22:28 libwx_osx_cocoau_qa-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 35 18 Feb 22:28 libwx_osx_cocoau_qa-3.0.0.dylib -> libwx_osx_cocoau_qa-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 31 18 Feb 22:28 libwx_osx_cocoau_qa-3.0.dylib -> libwx_osx_cocoau_qa-3.0.0.dylib -rwxr-xr-x 1 root wheel 462688 18 Feb 22:28 libwx_osx_cocoau_ribbon-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 39 18 Feb 22:28 libwx_osx_cocoau_ribbon-3.0.0.dylib -> libwx_osx_cocoau_ribbon-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 35 18 Feb 22:28 libwx_osx_cocoau_ribbon-3.0.dylib -> libwx_osx_cocoau_ribbon-3.0.0.dylib -rwxr-xr-x 1 root wheel 1545184 18 Feb 22:28 libwx_osx_cocoau_richtext-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 41 18 Feb 22:28 libwx_osx_cocoau_richtext-3.0.0.dylib -> libwx_osx_cocoau_richtext-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 37 18 Feb 22:28 libwx_osx_cocoau_richtext-3.0.dylib -> libwx_osx_cocoau_richtext-3.0.0.dylib -rwxr-xr-x 1 root wheel 1208952 18 Feb 22:28 libwx_osx_cocoau_stc-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 36 18 Feb 22:28 libwx_osx_cocoau_stc-3.0.0.dylib -> libwx_osx_cocoau_stc-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 32 18 Feb 22:28 libwx_osx_cocoau_stc-3.0.dylib -> libwx_osx_cocoau_stc-3.0.0.dylib -rwxr-xr-x 1 root wheel 761040 18 Feb 22:28 libwx_osx_cocoau_xrc-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 36 18 Feb 22:28 libwx_osx_cocoau_xrc-3.0.0.dylib -> libwx_osx_cocoau_xrc-3.0.0.4.0.dylib lrwxr-xr-x 1 root wheel 32 18 Feb 22:28 libwx_osx_cocoau_xrc-3.0.dylib -> libwx_osx_cocoau_xrc-3.0.0.dylib drwxr-xr-x 4 root wheel 128 18 Feb 22:30 wx
comment:7 follow-up: 13 Changed 4 years ago by kencu (Ken)
I would revbump wxWidgets-3.0 to fix it, but there is no way to know what is on the BuildBot right now, so others can sort that out.
comment:8 Changed 4 years ago by MSoegtropIMC
Do you rebuild it using a MacPorts package or do you rebuild it from wxWidgets sources?
I would say the issue is in the MacPorts package, because it installs multiple different versions of the shared libraries.
comment:9 Changed 4 years ago by kencu (Ken)
sudo port -f uninstall wxwidgets-3.0 sudo port -v -s install wxwidgets-3.0
comment:10 Changed 4 years ago by kencu (Ken)
The issue was with install_name_tool on older versions of Xcode 12 <https://lists.macports.org/pipermail/macports-dev/2020-November/042641.html> and it appears to be fixed now, since some upgrade to Xcode 12:
% ls -la total 152 drwxr-xr-x 6 root admin 192 20 Feb 10:06 . drwxr-xr-x 4 root admin 128 20 Feb 10:06 .. -rwxrwxrwx 1 root admin 75448 20 Feb 10:06 libtalloc.2.3.1.dylib lrwxr-xr-x 1 root admin 21 20 Feb 10:06 libtalloc.2.dylib -> libtalloc.2.3.1.dylib lrwxr-xr-x 1 root admin 21 20 Feb 10:06 libtalloc.dylib -> libtalloc.2.3.1.dylib drwxrwxrwx 3 root admin 96 20 Feb 10:06 pkgconfig % install_name_tool -id /opt/local/lib/libtalloc.2.dylib libtalloc.dylib % ls -la total 152 drwxr-xr-x 6 root admin 192 20 Feb 10:08 . drwxr-xr-x 4 root admin 128 20 Feb 10:06 .. -rwxr-xr-x 1 root admin 75448 20 Feb 10:08 libtalloc.2.3.1.dylib lrwxr-xr-x 1 root admin 21 20 Feb 10:06 libtalloc.2.dylib -> libtalloc.2.3.1.dylib lrwxr-xr-x 1 root admin 21 20 Feb 10:06 libtalloc.dylib -> libtalloc.2.3.1.dylib drwxrwxrwx 3 root admin 96 20 Feb 10:06 pkgconfig
So once someone knows if the BigSur buildbot has the current version of Xcode 12 on it, revbump wxWidgets-3.0 and you will get a new build of it, not broken, that should work just as good as mine does now.
comment:11 Changed 4 years ago by MSoegtropIMC
sudo port -f uninstall wxwidgets-3.0 sudo port -v -s install wxwidgets-3.0
I can conform that this works - thanks for finding the root cause of this issue!
comment:13 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to kencu:
I would revbump wxWidgets-3.0 to fix it, but there is no way to know what is on the BuildBot right now, so others can sort that out.
Buildbot worker OS and Xcode version information is available via the web interface. See e.g. https://build.macports.org/buildslaves/ports-11_x86_64.
comment:14 Changed 4 years ago by MSoegtropIMC
The version listed there (clang-1200.0.32.27) is older than my "known to work" version which is (clang-1200.0.32.29), but I can't say if (clang-1200.0.32.27) doesn't work - all I know is that with whatever build server the current wxWidgets libs have been build does not work. Can one find out with which version the current wxWidgets libs have been built, e.g. by inspecting the binaries?
comment:15 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
As far as I know, the version of clang is irrelevant. The problem is install_name_tool. I don't know how to determine which version of install_name_tool or clang was used to build something.
I've updated both of the macOS 11 worker machines to macOS 11.2.3 and Xcode 12.4.
comment:16 Changed 3 years ago by MSoegtropIMC
This ticket is fixed by updating XCode on the CI runners and recompiling wxWidgets. The issue can be closed.
comment:17 Changed 21 months ago by MSoegtropIMC
To whom it may concern: please close this ticket - it is fixed since almost 2 years.
I find it super odd that I can't close tickets, btw. What is the recommended procedure? Reassign it to the original reporter? This might not work well unless the reporter is active regularly. Sure (s)he will get an email, but might choose to ignore it and that's it then. This strange policy is not very friendly to maintainers.
comment:18 Changed 21 months ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
That message may or may not be relevant to the crash. Please attach the full crash log.