Opened 11 years ago
Closed 11 years ago
#40299 closed defect (fixed)
wxWidgets-3.0 build fails
Reported by: | jwhowse4 | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jwa@…, mojca (Mojca Miklavec), michaelld (Michael Dickens) | |
Port: | wxWidgets-3.0 |
Description
On an Intel Mac running Lion 10.7.5 and XCode 4.6.3 the build of wxWidgets-3.0 fails with the following error message.
---> Extracting wxWidgets-3.0 ---> Extracting wxWidgets-2.9.5.tar.bz2 ---> Applying patches to wxWidgets-3.0 ---> Applying patch-configure.diff patching file configure ---> Applying patch-include-wx-math.h.diff patching file include/wx/math.h Hunk #1 FAILED at 62. 1 out of 1 hunk FAILED -- saving rejects to file include/wx/math.h.rej Command failed: cd "/opt/macports/var/macports/build/_Volumes_User_Disk_opt_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_wxWidgets-3.0/wxWidgets-3.0/work/wxWidgets-2.9.5/build/.." && /usr/bin/patch -p0 < '/Volumes/User_Disk/opt/macports/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/wxWidgets-3.0/files/patch-include-wx-math.h.diff' Exit code: 1 Error: org.macports.patch for port wxWidgets-3.0 returned: command execution failed
This error began occuring after the file was added to correct use of std:: in wx/math.h. In my distribution of wxWidgets the appropriate part of the file include/wx/math.h appears to be the following.
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) #include <float.h> #define wxFinite(x) _finite(x) #elif defined(__MINGW64__) || defined(__clang__) /* add more compilers with C99 support here: using C99 isfinite() is preferable to using BSD-ish finite() */ #if defined(_GLIBCXX_CMATH) || defined(_LIBCPP_CMATH) // these <cmath> headers #undef isfinite #define wxFinite(x) std::isfinite(x) #else #define wxFinite(x) isfinite(x) #endif #elif ( defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ defined(__HPUX__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 )
However this does not appear to match what appears in the patch file.
Change History (5)
comment:1 Changed 11 years ago by mojca (Mojca Miklavec)
comment:2 Changed 11 years ago by mojca (Mojca Miklavec)
I think I understand it now. Most probably Michael prepared a patch against 2.9.4 whereas 2.9.5 works properly, but accidentally applied the patch globally to both 2.9.4 (wxPython-3.0) and 2.9.5 (wxWidgets-3.0). I'll test now and commit a patch.
comment:3 Changed 11 years ago by mojca (Mojca Miklavec)
Cc: | michaelld@… added |
---|---|
Version: | 2.2.0 |
comment:4 Changed 11 years ago by michaelld (Michael Dickens)
It was "my bad" so I fixed in r110359. Wait ~30 minutes (~1:30 PM/US/ET) then do
sudo port selfupdate sudo port clean wxWidgets-3.0
then try installing / updating wxWidgets-3.0 again.
comment:5 Changed 11 years ago by mojca (Mojca Miklavec)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I confirm that this seems to be a bit fishy and it fails to patch here as well. I also don't understand why the unpatched code would fail to work for Michael because "my" cmath in Lion clearly defines
_GLIBCXX_MATH
.