#41786 closed defect (fixed)
Coin @3.1.3 build failure on OS X 10.9 / Xcode 5.02
Reported by: | thomas.gimpel@… | Owned by: | cssdev |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | mavericks haspatch | Cc: | andre.holzner@… |
Port: | Coin |
Description
Coin fails to build on Mavericks with Xcode 5.0.2. It seems that the math-undefs mechanism does not work, because Xcode uses the math functions to be avoided be Coin within some inline functions in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath like this:
inline _LIBCPP_INLINE_VISIBILITY float acos(float __x) _NOEXCEPT {return acosf(__x);}
Since math-undefs.h contains:
#define acosf(x) NO_SINGLEPREC
the compilation fails as soon cmath is included.
Attachments (6)
Change History (26)
Changed 11 years ago by thomas.gimpel@…
Attachment: | main.log.gz added |
---|
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mavericks added |
---|---|
Owner: | changed from macports-tickets@… to css@… |
Port: | Coin added |
comment:2 Changed 11 years ago by cssdev
I'm unable to tackle this without access to Mavericks. I need a new Mac. :(
comment:4 Changed 11 years ago by andre.holzner@…
homebrew seems to have the same problem: https://github.com/Homebrew/homebrew/issues/23782
Looking at the pull request changes: https://github.com/Homebrew/homebrew/pull/25809/files it looks like they fixed it essentially by replacing the include guard of include/Inventor/C/base/math-undefs.h by an #ifdef false (effectively commenting out everything in this file)
Changed 11 years ago by andre.holzner@…
Attachment: | math-undefs.patch added |
---|
comment:5 Changed 11 years ago by andre.holzner@…
I created a simple patch (math-undefs.patch) and this makes Coin build for me on OSX 10.9
comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
comment:8 Changed 11 years ago by andre.holzner@…
interesting that #42763 was submitted at more or less the same time as activity on this ticket. I tried the patch there and it also builds for me on OSX 10.9. The patch there deactivates a bit less of the file include/Inventor/C/base/math-undefs.h than what I attached here (it leaves the compile time error intact when this file is included from code outside Coin), so maybe the patch in #42763 is preferable.
comment:9 follow-up: 10 Changed 11 years ago by andre.holzner@…
There is actually also a patch proposed at the Bitbucket Coin3D repository: https://bitbucket.org/Coin3D/coin/issue/45/coin-fails-to-build-on-os-x-108-mavericks#comment-7695457 . The problem we are discussing here is the second patch of the post dated 2014-01-12, the first patch there is already present in macport's configure.patch and the third one in clang-name-lookup.diff.
comment:10 follow-up: 11 Changed 11 years ago by mf2k (Frank Schima)
@andre.holzner: Per the guidelines, please instead attach a unified diff of the Portfile so we can easily see what changes you are proposing.
Changed 11 years ago by andre.holzner@…
Attachment: | Portfile.patch added |
---|
comment:11 follow-up: 13 Changed 11 years ago by andre.holzner@…
Replying to macsforever2000@…:
@andre.holzner: Per the guidelines, please instead attach a unified diff of the Portfile so we can easily see what changes you are proposing.
ok, I just did that (Portfile.patch)
comment:12 Changed 10 years ago by mojca (Mojca Miklavec)
The link above shows that upstream included this patch:
comment:13 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to andre.holzner@…:
Replying to macsforever2000@…:
@andre.holzner: Per the guidelines, please instead attach a unified diff of the Portfile so we can easily see what changes you are proposing.
ok, I just did that (Portfile.patch)
The patch is reversed...
Changed 10 years ago by mbrethen
Attachment: | Portfile.2.patch added |
---|
comment:14 Changed 10 years ago by mbrethen
I uploaded a unified diff and will try the patch on my Mavericks setup.
comment:15 Changed 10 years ago by mbrethen
I was able to build Coin on Mac OS X 10.9.3 using the patch.
comment:16 Changed 10 years ago by mojca (Mojca Miklavec)
Unrelated, the configure says:
checking for OpenGL library dev-kit... -I/usr/X11R6/include -L/usr/X11R6/lib -lGL
That should probably be fixed.
Changed 10 years ago by mojca (Mojca Miklavec)
Attachment: | Coin-math-undefs.patch added |
---|
comment:18 Changed 10 years ago by mojca (Mojca Miklavec)
There are other things that need an update in the Coin port, among others a missing livecheck, as well as:
-
Portfile
6 6 name Coin 7 7 version 3.1.3 8 8 revision 2 9 license GPL-29 license BSD 10 10 description cross platform C++ OpenGL scene graph library 11 11 long_description Coin is a high-level 3D graphics library with a \ 12 12 C++ Application Programming Interface. Coin uses scene-graph data \ … … 14 14 kinds of scientific and engineering visualization applications. 15 15 16 16 categories graphics devel 17 homepage http ://www.coin3d.org/lib/coin/17 homepage https://bitbucket.org/Coin3D/coin/wiki/Home 18 18 platforms darwin 19 19 maintainers css 20 master_sites http ://ftp.coin3d.org/coin/src/all/20 master_sites https://bitbucket.org/Coin3D/coin/downloads/ 21 21 checksums rmd160 e57fd6a4876a06874429f9ad6b96f166f5609362 \ 22 22 sha256 583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417 23 23
comment:19 Changed 10 years ago by mojca (Mojca Miklavec)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | 2.2.1 |
comment:20 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
If this project is now hosted at bitbucket, consider using the bitbucket portgroup.
build log file