elfmz / far2l

Linux port of FAR v2
GNU General Public License v2.0
1.76k stars 173 forks source link

Segfault in far2l on MacBook Pro M1 if two versions of wxWidgets are installed together #949

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello! My name is Lucas Fellipe...

I installed far2l on my macbook pro m1, and when I ran it, the following error appeared: zsh: far2l segmentation failure...

objc[14548]: Class wxNSAppController is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01c50) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfc50). One of the two will be used. Which one is undefined.
objc[14548]: Class ModalDialogDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01c78) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfc78). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSApplication is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01cc8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfcc8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxCPWCDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01d18) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfd18). One of the two will be used. Which one is undefined.
objc[14548]: Class wxMacFontPanelAccView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01d68) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfd68). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSButton is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01de0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfde0). One of the two will be used. Which one is undefined.
objc[14548]: Class wxDisclosureNSButton is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01e08) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfe08). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSPopUpButton is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01e80) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfe80). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSComboBox is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01ea8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfea8). One of the two will be used. Which one is undefined.
objc[14548]: Class DropSourceDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01ef8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dfef8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxOpenPanelDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01f48) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dff48). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSProgressIndicator is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01fc0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dffc0). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTableColumn is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae01fe8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097dffe8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTableDataSource is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02038) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0038). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTableView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae020b0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e00b0). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSMenu is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae020d8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e00d8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSMenuController is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02128) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0128). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSMenuItem is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02178) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0178). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSWindow is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae021c8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e01c8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSPanel is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02218) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0218). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNonOwnedWindowController is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02268) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0268). One of the two will be used. Which one is undefined.
objc[14548]: Class wxTabViewController is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae022b8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e02b8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTabView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02330) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0330). One of the two will be used. Which one is undefined.
objc[14548]: Class WXCTabViewImageItem is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02358) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0358). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSRadioButton is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae023a8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e03a8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSScroller is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02420) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0420). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSSlider is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02470) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0470). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSStepper is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae024c0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e04c0). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSSearchField is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae024e8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e04e8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSBox is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02560) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0560). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSStaticTextView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02588) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0588). One of the two will be used. Which one is undefined.
objc[14548]: Class wxMaximumLengthFormatter is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae025d8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e05d8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSSecureTextField is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02650) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0650). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTextScrollView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae026a0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e06a0). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTextFieldEditor is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae026c8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e06c8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTextView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02740) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0740). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSTextField is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02768) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0768). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSToolbarItem is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae027b8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e07b8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSToolbarDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02808) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0808). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSToolbar is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02858) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0858). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSToolBarButton is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae028a8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e08a8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSView is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae028f8) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e08f8). One of the two will be used. Which one is undefined.
objc[14548]: Class wxNSAnimationDelegate is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x10ae02948) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1097e0948). One of the two will be used. Which one is undefined.
./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)?
./src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxNotifyEvent" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?
./src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxScrollEvent" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?

Can someone help me, please?

elfmz commented 3 years ago

first, is it a degradation (and then what previous version worked for you?) or you just installed it 1st time and... ?

ghost commented 3 years ago

First time!

elfmz commented 3 years ago

I'm not a big mac expert, but it seems you have two versions of wxWidgets. I may suggest you have one from brew and another one from Mac Ports. So first idea is to remove, say, brew version. And rebuild far2l from clean.

ghost commented 3 years ago

Ahhhh okay, it worked! Thanks

elfmz commented 3 years ago

..so i will rename issue so other more native mac developers may find some general solution for that beside manual removing one of the wx's instances..

singalen commented 3 years ago

I believe we need to embed the framework far2l was built with into the app bundle. Something like this: https://stackoverflow.com/questions/37692973/using-cmake-to-copy-frameworks-to-ios-app-bundle