Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

main.log.gz (5.8 KB) - added by thomas.gimpel@… 11 years ago.
build log file
math-undefs.patch (324 bytes) - added by andre.holzner@… 11 years ago.
Portfile (2.2 KB) - added by andre.holzner@… 11 years ago.
modified Portfile
Portfile.patch (423 bytes) - added by andre.holzner@… 11 years ago.
Portfile.2.patch (425 bytes) - added by mbrethen 10 years ago.
Coin-math-undefs.patch (2.1 KB) - added by mojca (Mojca Miklavec) 10 years ago.

Download all attachments as: .zip

Change History (26)

Changed 11 years ago by thomas.gimpel@…

Attachment: main.log.gz added

build log file

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:3 Changed 11 years ago by andre.holzner@…

Cc: andre.holzner@… added

Cc Me!

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

Changed 11 years ago by andre.holzner@…

Attachment: Portfile added

modified Portfile

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:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

See also (duplicate?) #42763.

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 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 in reply to:  9 ; 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 in reply to:  10 ; 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 in reply to:  11 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.

Last edited 10 years ago by mbrethen (previous) (diff)

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:17 Changed 10 years ago by mojca (Mojca Miklavec)

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

     
    66name                Coin
    77version             3.1.3
    88revision            2
    9 license             GPL-2
     9license             BSD
    1010description         cross platform C++ OpenGL scene graph library
    1111long_description    Coin is a high-level 3D graphics library with a   \
    1212                    C++ Application Programming Interface. Coin uses scene-graph data \
     
    1414                    kinds of scientific and engineering visualization applications.
    1515
    1616categories          graphics devel
    17 homepage            http://www.coin3d.org/lib/coin/
     17homepage            https://bitbucket.org/Coin3D/coin/wiki/Home
    1818platforms           darwin
    1919maintainers         css
    20 master_sites        http://ftp.coin3d.org/coin/src/all/
     20master_sites        https://bitbucket.org/Coin3D/coin/downloads/
    2121checksums           rmd160  e57fd6a4876a06874429f9ad6b96f166f5609362 \
    2222                    sha256  583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417
    2323

comment:19 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed
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.

Note: See TracTickets for help on using tickets.