kenz-gelsoft / wxRust

A Rust binding of the wxWidgets cross platform toolkit.
Other
133 stars 19 forks source link

Can't build on MacOSX with wxWidgets-3.0 @3.0.0_5 from macports #20

Closed newchief closed 10 years ago

newchief commented 10 years ago

The error is:

[ 84%] Building CXX object wxc/CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/taskbaricon.cpp.o [ 85%] Building CXX object wxc/CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/textstream.cpp.o [ 86%] Building CXX object wxc/CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/treectrl.cpp.o [ 86%] Building CXX object wxc/CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/wrapper.cpp.o Linking CXX shared library libwxc.dylib Undefined symbols: "wxWindowBase::IsDescendant(wxWindowBase*) const", referenced from: wxMDIParentFrameBase::TryBefore(wxEvent&) in apppath.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in dragimage.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljaccelerator.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljartprov.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljbitmap.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljbrush.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljbusyinfo.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljbutton.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljcalendarctrl.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljcaret.cpp.o ...and so on

with VERBOSE=1: make -f wxc/CMakeFiles/wxc.dir/build.make wxc/CMakeFiles/wxc.dir/depend cd /Users/newchief/wxrust/wxRust/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /Users/newchief/wxrust/wxRust /Users/newchief/wxrust/wxRust/wxc /Users/newchief/wxrust/wxRust/ build /Users/newchief/wxrust/wxRust/build/wxc /Users/newchief/wxrust/wxRust/build/wxc/CMakeFiles/wxc.dir/DependInfo.cmake --color= make -f wxc/CMakeFiles/wxc.dir/build.make wxc/CMakeFiles/wxc.dir/build Linking CXX shared library libwxc.dylib cd /Users/newchief/wxrust/wxRust/build/wxc && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/wxc.dir/link.txt --verbose=1 /usr/bin/c++ -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0 -dynamiclib -Wl,-headerpad_max_install_names -o libwxc.dylib -install_name /Users/ne wchief/wxrust/wxRust/build/wxc/libwxc.dylib CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/apppath.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/dragimage.cpp.o CMakeFiles/wxc.dir//wxHaske ll/wxc/src/cpp/eljaccelerator.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljartprov.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljbitmap.cpp.o CMakeFiles/wxc.dir//wxHaskell/wx c/src/cpp/eljbrush.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljbusyinfo.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljbutton.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/ eljcalendarctrl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcaret.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcheckbox.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljc hecklistbox.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljchoice.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljclipboard.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcol data.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcolour.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcolourdlg.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcombobox.c pp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljconfigbase.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcontrol.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljctxhelp.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljcursor.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdataformat.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdatetime.cpp.o CMake Files/wxc.dir//wxHaskell/wxc/src/cpp/eljdc.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdcsvg.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdialog.cpp.o CMakeFiles/wxc.dir/ /wxHaskell/wxc/src/cpp/eljdirdlg.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdnd.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljdrawing.cpp.o CMakeFiles/wxc.dir//wxHaskell/wx c/src/cpp/eljevent.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljfiledialog.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljfilehist.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/ cpp/eljfindrepldlg.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljfont.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljfontdata.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/el jfontdlg.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljframe.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljgauge.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljgrid.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljhelpcontroller.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljicnbndl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljicon.cpp.o CMak eFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljimage.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljimagelist.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljlayoutconstraints.cpp.o CM akeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljlistbox.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljlistctrl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljlocale.cpp.o CMakeFiles /wxc.dir//wxHaskell/wxc/src/cpp/eljlog.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljmask.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljmdi.cpp.o CMakeFiles/wxc.dir//wxHaske ll/wxc/src/cpp/eljmenu.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljmenubar.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljmessagedialog.cpp.o CMakeFiles/wxc.dir//wxHaskell/wx c/src/cpp/eljmime.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljminiframe.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljnotebook.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cp p/eljpalette.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljpanel.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljpen.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljprintdlg. cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljprinting.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljprocess.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljradiobox.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljradiobutton.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljrc.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljregion.cpp.o CMakeFiles /wxc.dir//wxHaskell/wxc/src/cpp/eljregioniter.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljsash.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljscrollbar.cpp.o CMakeFiles/wxc.d ir//wxHaskell/wxc/src/cpp/eljscrolledwindow.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljsingleinst.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljsizer.cpp.o CMakeFiles/wxc.d ir//wxHaskell/wxc/src/cpp/eljslider.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljspinctrl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljsplitterwindow.cpp.o CMakeFiles/wxc.di r//wxHaskell/wxc/src/cpp/eljstaticbox.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljstaticline.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljstatictext.cpp.o CMakeFiles/wxc.di r//wxHaskell/wxc/src/cpp/eljstatusbar.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljsystemsettings.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljtextctrl.cpp.o CMakeFiles/wxc. dir//wxHaskell/wxc/src/cpp/eljtimer.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljtipwnd.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljtglbtn.cpp.o CMakeFiles/wxc.dir//wxHas kell/wxc/src/cpp/eljtoolbar.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljvalidator.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/eljwindow.cpp.o CMakeFiles/wxc.dir//wxHaskell/wx c/src/cpp/eljwizard.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/ewxw_main.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/extra.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/glcan vas.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/graphicscontext.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/image.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/managed.cpp.o C MakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/mediactrl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/previewframe.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/printout.cpp.o CMakeFiles /wxc.dir//wxHaskell/wxc/src/cpp/sckaddr.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/socket.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/sound.cpp.o CMakeFiles/wxc.dir//wxHaskel l/wxc/src/cpp/stc.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/std.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/taskbaricon.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/textstr eam.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/treectrl.cpp.o CMakeFiles/wxc.dir//wxHaskell/wxc/src/cpp/wrapper.cpp.o -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wx Widgets/3.0/lib -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -f ramework OpenGL -lwx_osx_cocoau_gl-3.0 -lwx_baseu-3.0 -Wl,-rpath,/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib Undefined symbols: "wxWindowBase::IsDescendant(wxWindowBase*) const", referenced from: wxMDIParentFrameBase::TryBefore(wxEvent&) in apppath.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in dragimage.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljaccelerator.cpp.o wxMDIParentFrameBase::TryBefore(wxEvent&) in eljartprov.cpp.o

... and so on.

kenz-gelsoft commented 10 years ago

Thank you for reporting a problem. It looks like wxHaskell's wxc which is utilized by this library has not updated for wxWidgets 3.0(.5) yet.

I'll search for updated fork or try to fix.

kenz-gelsoft commented 10 years ago

Next I'm going to look into this.

Latest homebrew's wxmac package installs wx3.0 as well, so maybe I can reproduce this easily.

kenz-gelsoft commented 10 years ago

Hmm, with wxmac 3.0.0 from homebrew just compiles... What is wrong..?

kenz-gelsoft commented 10 years ago

Would you put the output of wx-config --libs like this? :

$ wx-config --libs
-L/usr/local/Cellar/wxmac/3.0.0.0/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lwx_osx_cocoau-3.0 
kenz-gelsoft commented 10 years ago

Or can you build with this change?:

diff --git a/wxc/CMakeLists.txt b/wxc/CMakeLists.txt
index 8c7a1b8..25b6f25 100644
--- a/wxc/CMakeLists.txt
+++ b/wxc/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8)

 if(APPLE)
-    find_package(wxWidgets REQUIRED gl)
+    find_package(wxWidgets REQUIRED all)
 else(APPLE)
     find_package(wxWidgets REQUIRED all)
 endif(APPLE)
newchief commented 10 years ago
bash-3.2$ wx-config --libs
-L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_xrc-3.0 -lwx_osx_cocoau_webview-3.0 -lwx_osx_cocoau_html-3.0 -lwx_osx_cocoau_qa-3.0 -lwx_osx_cocoau_adv-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0

Indeed, proposed change helped to build and test runned fine (built from recent master).

One note for the test: I noticed it for Linux too: when I close test application window, for some reason push button action is triggered (on Linux it's with exception thrown) and "Pushed!!" message window is shown. On Linux, pressing OK in such message button terminates test application, on MacOSX it does nothing (not even message button is closed!), therefore "Force quit" must be used to terminate test application on MacOSX...

kenz-gelsoft commented 10 years ago

Thanks. wx-config --libs output and your result helps.

Homebrew's wxmac wx-config --libs returns very few components currently. This was changed at some point of wx2.9.x timeframe. This might be a homebrew's packaging bug. I'll report that for upstream.

For now, I'll prepare a workaround for macports to define a cmake definition to control this behavior(such as -DMACPORTS_WX). Because I want to support homebrew environment as 1st-tier (and want keep its build instruction simpler).

BTW, about your another note. Yes that's known issue to fix. I'll do this right now because its easy.

kenz-gelsoft commented 10 years ago

1c472762fa081945f1c1f959d415bca0e2480781 and 28832d2795237b62f3e0677685a44d66b4adaf7d should stop showing another message dialog.

newchief commented 10 years ago

Yeah it helped, and the application terminates correctly now.