Opened 15 years ago

Closed 12 years ago

Last modified 11 years ago

#20952 closed defect (wontfix)

wxWidgets fails to build 64-bit

Reported by: andrius.laikina@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version:
Keywords: LP64 Cc: macports.org@…, lambda@…, software@…, koverholt@…, allencmcbride@…, skymoo (Adam Mercer), jakub.moskal@…, muchatel@…, earcar@…, jochen@…, macports@…, orez.org@…, gentoomeo@…, lstoll@…, andreas.wilm@…, matt.leotta@…, mrb@…, liam.candy@…, stejanecek@…, michaelld (Michael Dickens), julienb@…, r1pp3r@…, francis@…, jvliwanag@…, hmng@…, stefan@…, celil.rufat@…, johncumbers@…, singingwolfboy@…, macports@…, gchaynes@…, takashi@…, gordoncww+macports@…, michaelld (Michael Dickens), usami-k@…, jjstickel@…, speed.rob@…, jungwook.shin@…, gerald@…, mjhsieh@…, bfulgham@…, paul.vernaza@…, danmichaelo+macports@…, jean-philippe.humbert@…
Port: wxWidgets

Description

wxWidgets26 2.6.4 fails to build on snow leopard, log attached

Attachments (9)

wxWidgets.debug (163.3 KB) - added by andrius.laikina@… 15 years ago.
libsdl_mixer removed as dependency, debug enabled
wxWidgets.install.log (56.9 KB) - added by software@… 14 years ago.
Debug report of installing wxWidgets
Portfile (2.7 KB) - added by software@… 14 years ago.
Working portfile for wxWidgets 2.9.0
patch-textctrl.diff (1.9 KB) - added by software@… 14 years ago.
Patch for bug about no matching wxWidgetImpl::FindFromWXWidget function. Required for wxWidgets 2.9.0 Portfile
Portfile.2 (2.3 KB) - added by Veence (Vincent) 14 years ago.
Portfile for "py26-wxpython-devel"
patch-config_py.diff (1.1 KB) - added by Veence (Vincent) 14 years ago.
Patch #1 for "py26-wxpython-devel"
patch-propgrid_wrap.diff (345 bytes) - added by Veence (Vincent) 14 years ago.
patch-setup_py.diff (695 bytes) - added by Veence (Vincent) 14 years ago.
Final patch for py26-wxwidgets-devel
wx-64-x11.diff (5.2 KB) - added by jmroot (Joshua Root) 14 years ago.
use X11 instead of wxMac when building 64-bit

Download all attachments as: .zip

Change History (89)

Changed 15 years ago by andrius.laikina@…

Attachment: wxWidgets.debug added

libsdl_mixer removed as dependency, debug enabled

comment:1 Changed 15 years ago by nerdling (Jeremy Lavergne)

Curious, I can't get libsdl to build yet you have a receipt for it. How did you manage that?

comment:2 Changed 15 years ago by andrius.laikina@…

Just apply patches from this ticket: #20235

comment:3 Changed 15 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

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

Cc: jwa@… added
Owner: changed from macports-tickets@… to mww@…

CarbonFail. There's no way you're going to get wx to build for x86_64 if you applied the libsdl patch from #20235, BTW.

comment:5 Changed 15 years ago by lambda@…

Cc: lambda@… added

Cc Me!

comment:6 Changed 14 years ago by software@…

Cc: software@… added

Cc Me!

comment:7 Changed 14 years ago by koverholt@…

Cc: koverholt@… added

Cc Me!

Changed 14 years ago by software@…

Attachment: wxWidgets.install.log added

Debug report of installing wxWidgets

comment:8 Changed 14 years ago by software@…

Now that libsdl and libsdl_mixer compile fine on 64-bit Snow Leopard, I bumped into this bug as well. It seem to be a bug in wxWidgets itself. Here is the error:

../src/common/intl.cpp:2060: error: 'smScriptLang' was not declared in this scope
../src/common/intl.cpp:2060: error: 'GetScriptVariable' was not declared in this scope
../src/common/intl.cpp:2061: warning: 'GetScriptManagerVariable' is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h:993)

And there seems to be a fix at the wxWidgets website (I have not tested it yet):

http://wiki.wxwidgets.org/Development:_wxMac

comment:9 Changed 14 years ago by software@…

PS: This applies to wxWidgets 2.8.10, the latest version. Perhaps the title of this bug should be adjusted.

comment:10 in reply to:  9 Changed 14 years ago by jrminter@…

I agree. Now that libsdl and libsdl_mixer are fixed, I ran into this one.

comment:11 Changed 14 years ago by tzonghao@…

Cc: tzonghao@… added

Cc Me!

comment:12 Changed 14 years ago by allencmcbride@…

Cc: allencmcbride@… added

Cc Me!

comment:13 Changed 14 years ago by allencmcbride@…

I agree that the title should be changed. I had seen this bug listed on SnowLeopardProblems, but since the version was specified explicitly, I assumed it wouldn't apply to the current version.

comment:14 Changed 14 years ago by software@…

So there seem to be two possible solutions:

  • compile for 32-bit
  • wait for wxWidgets 2.9 (since that uses cocoa instead of carbon)

Since most (all?) other libraries are build in 64-bit, it seems that the second option is best, especially since:

  • wxWidgets 2.9 is already released
  • there is already a MacPorts for wxWidgets 2.9 (ie. wxwidgets-devel)

So will the solution be to simple move the wxwidgets-devel Portfile contents to the wxwdiget Portfile?

comment:15 Changed 14 years ago by jmroot (Joshua Root)

Keywords: LP64 added; snowleopard removed
Port: wxWidgets added; wxWidgets26 removed
Summary: wxWidgets26 2.6.4 fails to build on snow leopardwxWidgets fails to build 64-bit

This is 64-bit specific rather than Snow Leopard specific, and 2.6 is basically a lost cause.

comment:16 Changed 14 years ago by software@…

I did manage to compile wxWidgets today. There are three, possibly four, 'bugs' to solve before it compiles. I'll list them here and include my Portfile and patch script. However, I had a busy day and did not have time to test it yet. If someone has that time, please do!

Also, the settings probably only work for OS 10.5 and higher. If this portfile is to be used on other platforms as well, it will be necessary to make a variant for this specific Darwin version. I have not done that yet.

I encountered the following bugs:

Bug number 1:

../src/osx/carbon/utils.cpp: In function 'void wxGetMousePosition(int*, int*)':
../src/osx/carbon/utils.cpp:161: error: 'GetGlobalMouse' was not declared in this scope

Problem: The osx_carbon GUI toolkit is selected. This ought to be the osx_cocoa GUI toolkit.

or

../include/wx/cocoa/cursor.h:42: error: default argument for parameter of type 'wxBitmapType' has type 'int'

Problem: The cocoa GUI toolkit is selected. This ought to be the osx_cocoa GUI toolkit.

Some Carbon libraries are no longer available in 64-bit. You should use Cocoa instead.

solution: change

  ./configure --with-mac
  ./configure --with-osx_carbon
  ./configure --with-carbon

or

  ./configure --with-cocoa

to:

  ./configure --with-osx_cocoa

Bug number 2:

wxWidgets/src/osx/core/printmac.cpp: In member function ‘virtual bool wxOSXPrintData::TransferFrom(const wxPrintData&)’:
wxWidgets/src/osx/core/printmac.cpp:142: error: ‘PMPaperCreate’ was not declared in this scope"

This is a PMPaperCreate() is a deprecated function since Mac OS 10.5. PMPrinterGetPaperList() should be used instead. There are two solutions: either install XCode 3.2 with Tiger (10.4) support enabled, or compile wxWdigets without 10.4 support: ./configure --with-macosx-version-min=10.5

See http://trac.wxwidgets.org/ticket/11183

Bug number 3:

wxWidgets/src/osx/cocoa/textctrl.mm: In function 'void -[wxNSTextFieldEditor keyDown:](wxNSTextFieldEditor*, _message_ref_t*, NSEvent*)':
wxWidgets/src/osx/cocoa/textctrl.mm:144: error: no matching function for call to 'wxWidgetImpl::FindFromWXWidget(objc_object*)'

This is a bug in src/osx/cocoa/textctrl.mm, which was later fixed in subversion, and will be fixed in 2.9.1. See src/osx/cocoa/textctrl.mm

solution: see attached patch http://groups.google.com/group/wx-dev/browse_thread/thread/8af9dd06f1a1a867 and http://svn.wxwidgets.org/viewvc/wx?view=rev&revision=61383

Bug number 4:

ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file

This is due to the settings in the configure script. The QuickTime library is included is (($USE_MAC and $USE_DARWIN) or $USE_COCOA) are set. If ./configure is called with --with-osx_cocoa, it seems that USE_MAC and USE_DARWIN are set, while USE_COCOA is not set. This is utterly confusing, and since it is "only" a warning, I did not look further in this matter.

Changed 14 years ago by software@…

Attachment: Portfile added

Working portfile for wxWidgets 2.9.0

Changed 14 years ago by software@…

Attachment: patch-textctrl.diff added

Patch for bug about no matching wxWidgetImpl::FindFromWXWidget function. Required for wxWidgets 2.9.0 Portfile

comment:17 Changed 14 years ago by koverholt@…

Updated portfile and added the patch and wxWidgets compiles and installs for me on 10.6.1. Thanks!

comment:18 Changed 14 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:19 in reply to:  17 Changed 14 years ago by jakub.moskal@…

Replying to koverholt@…:

Updated portfile and added the patch and wxWidgets compiles and installs for me on 10.6.1. Thanks!

Same here, wxWidgets 2.9.0 installed on 10.6.1, but can't install py26-wxpython now.

comment:20 Changed 14 years ago by Veence (Vincent)

You cannot install py26-wxpython, because only the svn version is compatible with wxwidgets-2.9.

If you are not faint hearted, and you need it as badly as I did, I post you the contents of my private py26-wxwidgets-devel port which compiles and runs 64-bit (one Portfile and three patches). Enjoy.

Changed 14 years ago by Veence (Vincent)

Attachment: Portfile.2 added

Portfile for "py26-wxpython-devel"

Changed 14 years ago by Veence (Vincent)

Attachment: patch-config_py.diff added

Patch #1 for "py26-wxpython-devel"

Changed 14 years ago by Veence (Vincent)

Attachment: patch-propgrid_wrap.diff added

Changed 14 years ago by Veence (Vincent)

Attachment: patch-setup_py.diff added

Final patch for py26-wxwidgets-devel

comment:21 Changed 14 years ago by Veence (Vincent)

PS : you should select the +wx29 +cocoa variants

comment:22 in reply to:  20 Changed 14 years ago by jakub.moskal@…

Replying to vince@…:

You cannot install py26-wxpython, because only the svn version is compatible with wxwidgets-2.9.

If you are not faint hearted, and you need it as badly as I did, I post you the contents of my private py26-wxwidgets-devel port which compiles and runs 64-bit (one Portfile and three patches). Enjoy.

I downloaded the Portfile and the patches for py26-wxpython-devel that you posted, I had to rename the dependent lib from wxWidgets-devel to wxWidgets (I installed the wxWidgets-2.9 under that name), but when the patches are applied I am getting this error:

--->  Computing dependencies for py26-wxpython-devel
--->  Fetching py26-wxpython-devel
--->  Verifying checksum(s) for py26-wxpython-devel
--->  Extracting py26-wxpython-devel
--->  Applying patches to py26-wxpython-devel
Error: Target org.macports.patch returned: shell command " cd "/opt/local/var/macports/build/_Users_Jakub_ports_python_py26-wxpython-devel/work/trunk" && /usr/bin/patch -p0 < '/Users/Jakub/ports/python/py26-wxpython-devel/files/patch-propgrid_wrap.diff'" returned error 1
Command output: patching file src/osx_cocoa/propgrid_wrap.cpp
Hunk #1 FAILED at 3541.
1 out of 1 hunk FAILED -- saving rejects to file src/osx_cocoa/propgrid_wrap.cpp.rej

Here's the contents of propgrid_wrap.cpp.rej:

***************
*** 3541,3547 ****
      }
      else if ( input == Py_None )
      {
-         *v = new wxPGPropArgCls(NULL);
      }
      else
      {
--- 3541,3547 ----
      }
      else if ( input == Py_None )
      {
+         *v = new wxPGPropArgCls((const wxPGProperty*) NULL);
      }
      else
      {

comment:23 Changed 14 years ago by jakub.moskal@…

Cc: jakub.moskal@… added

Cc Me!

comment:24 Changed 14 years ago by Veence (Vincent)

Maybe they have corrected the bug. That's the problem with svn ports: they evolve. Try removing the patch from patchfiles in the Portfile and try again.

comment:25 Changed 14 years ago by software@…

May I suggest to only discuss wxWidgets in this bug report. Perhaps report #21530 is best to discuss wxPython/py26-wxWidgets

comment:26 Changed 14 years ago by muchatel@…

Cc: muchatel@… added

Cc Me!

comment:27 Changed 14 years ago by earcar@…

Cc: earcar@… added

Cc Me!

comment:28 Changed 14 years ago by jochen@…

Cc: jochen@… added

Cc Me!

comment:29 Changed 14 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:30 Changed 14 years ago by r1pp3r@…

Cc: r1pp3r@… added

Cc Me!

comment:31 Changed 14 years ago by orez.org@…

Cc: orez.org@… added

Cc Me!

comment:32 Changed 14 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:33 Changed 14 years ago by gentoomeo@…

Cc: gentoomeo@… added

Cc Me!

comment:34 Changed 14 years ago by lstoll@…

Cc: lstoll@… added

Cc Me!

comment:35 Changed 14 years ago by andreas.wilm@…

Cc: andreas.wilm@… added

Cc Me!

comment:36 Changed 14 years ago by matt.leotta@…

Cc: matt.leotta@… added

Cc Me!

comment:37 Changed 14 years ago by rvr@…

CC Me!

comment:38 Changed 14 years ago by mrb@…

Cc: mrb@… added

Cc Me!

comment:39 Changed 14 years ago by liam.candy@…

Cc: liam.candy@… added

Cc Me!

comment:40 in reply to:  description ; Changed 14 years ago by haraoka@…

libsdl_mixer was upgraded on 10.5.8(ppc). The build result of wxWidgets(2.6.4&2.8.9&2.9.0) failed as follows.

$ sudo port -dv archive wxWidgets +universal
g++-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make: *** [.pch/wxprec_monodll/wx/wxprec.h.gch] Error 1

    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for wxWidgets): org.macports.archive org.macports.build org.macports.destroot
Error: Status 1 encountered during processing.

comment:41 Changed 14 years ago by tzonghao@…

Cc: tzonghao@… removed

Cc Me!

comment:42 Changed 14 years ago by stejanecek@…

Cc: stejanecek@… added

Cc Me!

comment:43 Changed 14 years ago by michaelld (Michael Dickens)

Cc: mlk@… added

Cc Me!

comment:44 Changed 14 years ago by julienb@…

Cc: julienb@… added

Cc Me!

comment:45 Changed 14 years ago by r1pp3r@…

Cc: r1pp3r@… removed

Cc Me!

comment:46 Changed 14 years ago by r1pp3r@…

Cc: r1pp3r@… added

Cc Me!

comment:47 Changed 14 years ago by francis@…

Cc: francis@… added

Cc Me!

comment:48 Changed 14 years ago by software@…

I did test the patches I submitted two months ago on the following platforms:

  • Mac OS 10.6 on Intel (64-bit)
  • Mac OS 10.5 on Intel (32-bit)
  • Mac OS 10.5 on PPC G4 (32-bit)

haraoka is correct that it does not compile on PPC with the +universal variant. However, that bug is due compiling with multiple targets as output, and not to this bug.

I am wondering why the patched Portfile has not yet been put in the repository.

comment:49 in reply to:  40 Changed 14 years ago by software@…

Replying to haraoka@…:

The build result of wxWidgets(2.6.4&2.8.9&2.9.0) failed as follows.

$ sudo port -dv archive wxWidgets +universal

For the record, I opened a new ticket for this report as it only occurs with the +universal flag and existed with earlier portfiles as well: #22815

comment:50 Changed 14 years ago by software@…

I just posted to the mailing list:

Apparently this problem was fixed long ago by introducing a new port, called wxWidget-dev.

Frankly, it is beyond me what the use is of a wxWidgets-dev, since packages like wxPython depends on wxWidgets and not on wxWidgets-dev, people can still not use the MacPorts solution and will get stuck anyway.

(sorry to sound a bit bitter here; It did of course compile the thing manually, but decided to spend a few hours testing it on different platforms, checking if all was OK and contributing back to the community. It really is quite frustrating to see that such good effort turns out to be fruitless because someone else solved it but did not bother to tell the world about it. That makes me wonder if I better had spend time on something else that on contributing to MacPorts.)

Changed 14 years ago by jmroot (Joshua Root)

Attachment: wx-64-x11.diff added

use X11 instead of wxMac when building 64-bit

comment:51 Changed 14 years ago by jvliwanag@…

Cc: jvliwanag@… added

Cc Me!

comment:52 Changed 14 years ago by hmng@…

Cc: hmng@… added

Cc Me!

comment:53 Changed 14 years ago by stefan@…

Cc: stefan@… added

Cc Me!

comment:54 Changed 14 years ago by celil.rufat@…

Cc: celil.rufat@… added

Cc Me!

comment:55 Changed 14 years ago by celil.rufat@…

Cc: celil.rufat@… removed

Cc Me!

comment:56 Changed 14 years ago by celil.rufat@…

Cc: celil.rufat@… added

Cc Me!

comment:57 Changed 14 years ago by johncumbers@…

Cc: johncumbers@… added

Cc Me!

comment:58 Changed 14 years ago by singingwolfboy@…

Cc: singingwolfboy@… added

Cc Me!

comment:59 Changed 14 years ago by macports@…

Cc: macports@… removed

Cc Me!

comment:60 Changed 14 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:61 Changed 14 years ago by gchaynes@…

Cc: gchaynes@… added

Cc Me!

comment:62 Changed 14 years ago by takashi@…

Cc: takashi@… added

Cc Me!

comment:63 Changed 14 years ago by gordoncww+macports@…

Cc: gordoncww+macports@… added

Cc Me!

comment:64 Changed 14 years ago by jjstickel@…

For those of you interested in wxPython, please see ticket #24350.

comment:65 Changed 14 years ago by michaelld (Michael Dickens)

Cc: michaelld@… added

Cc Me!

comment:66 Changed 14 years ago by usami-k@…

Cc: usami-k@… added

Cc Me!

comment:67 Changed 14 years ago by jjstickel@…

Cc: jjstickel@… added

Cc Me!

comment:68 Changed 14 years ago by speed.rob@…

Cc: speed.rob@… added

Cc Me!

comment:69 Changed 14 years ago by jungwook.shin@…

Cc: jungwook.shin@… added

Cc Me!

comment:70 Changed 13 years ago by gerald@…

Cc: gerald@… added

Cc Me!

comment:71 Changed 13 years ago by mjhsieh@…

Cc: mjhsieh@… added

Cc Me!

comment:72 Changed 13 years ago by bfulgham@…

Cc: bfulgham@… added

Cc Me!

comment:73 Changed 13 years ago by paul.vernaza@…

Cc: paul.vernaza@… added

Cc Me!

comment:74 Changed 13 years ago by jmroot (Joshua Root)

Cc: jwa@… removed
Owner: changed from mww@… to jwa@…

comment:75 Changed 13 years ago by Veence (Vincent)

wx/cocoa is still incomplete. No 64-bit version of wxWidgets will be possible until the development team completes the transition from Carbon to Cocoa

comment:76 Changed 13 years ago by speed.rob@…

Which will be version 2.9, correct?

comment:77 Changed 13 years ago by Veence (Vincent)

wxWidgets uses the same scheme as gimp: odd versions are unstable. 2.9 should see the completion of wx/Cocoa, but I'm afraid this may take a lot of time, since the team seems to lack any Cocoa programmer. In two years or so, progress has been minute… :(

comment:78 Changed 13 years ago by danmichaelo+macports@…

Cc: danmichaelo+macports@… added

Cc Me!

comment:79 Changed 12 years ago by jyrkiwahlstedt

Resolution: wontfix
Status: newclosed

Well, 2.9.4 should be released soon, 3.0, i.e. the next stable version soon after that (that's the rumour anyway), but current wxWidgets stable port stays as it is.

comment:80 Changed 11 years ago by jean-philippe.humbert@…

Cc: jean-philippe.humbert@… added

Cc Me!

Note: See TracTickets for help on using tickets.