Opened 11 years ago

Closed 10 years ago

#41335 closed update (fixed)

openbabel 2.3.1 doesn't compile in Mavericks

Reported by: gezelter@… Owned by: mlund (Mikael Lund)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks haspatch Cc: SickTeddyBear, ltalirz (Leopold Talirz), Mathias.Laurin+macports.org@…, NicosPavlov
Port: openbabel

Description

The openbabel 2.3.1 port depends on eigen (which doesn't compile on Mavericks), and has a few C++11 oddities in include files that prevent compilation even with eigen3. The modified port file and 5 patches fix compilation on Mavericks and bump openbabel to 2.3.2.

Attachments (12)

Portfile-rrdtool.diff (1.8 KB) - added by gezelter@… 11 years ago.
Portfile diff
patch-include-openbabel-alias.h.diff (507 bytes) - added by gezelter@… 11 years ago.
include/openbabel/alias.h patch
patch-include-openbabel-obmolecformat.h.diff (863 bytes) - added by gezelter@… 11 years ago.
include/openbabel/obmolecformat.h patch
patch-include-openbabel-reactions.h.diff (1.9 KB) - added by gezelter@… 11 years ago.
include/openbabel/reactions.h patch
patch-include-openbabel-shared_ptr.h.diff (631 bytes) - added by gezelter@… 11 years ago.
include/openbabel/shared_ptr.h patch
patch-src-ops-unique.cpp.diff (694 bytes) - added by gezelter@… 11 years ago.
src/ops/unique.cpp patch
patch-test-obtest.h.diff (283 bytes) - added by gezelter@… 11 years ago.
test/obtest.h patch
Portfile-openbabel.diff (1.8 KB) - added by gezelter@… 11 years ago.
Portfile-openbabel.2.diff (1.4 KB) - added by Mathias.Laurin+macports.org@… 11 years ago.
Diff against open babel-2.3.1
patch-shared_ptr.diff (1.2 KB) - added by NicosPavlov 10 years ago.
patch-openbabel3.diff (1.1 KB) - added by NicosPavlov 10 years ago.
patch-py-openbabel3.diff (1.1 KB) - added by NicosPavlov 10 years ago.

Download all attachments as: .zip

Change History (21)

Changed 11 years ago by gezelter@…

Attachment: Portfile-rrdtool.diff added

Portfile diff

Changed 11 years ago by gezelter@…

include/openbabel/alias.h patch

Changed 11 years ago by gezelter@…

include/openbabel/obmolecformat.h patch

Changed 11 years ago by gezelter@…

include/openbabel/reactions.h patch

Changed 11 years ago by gezelter@…

include/openbabel/shared_ptr.h patch

Changed 11 years ago by gezelter@…

src/ops/unique.cpp patch

Changed 11 years ago by gezelter@…

Attachment: patch-test-obtest.h.diff added

test/obtest.h patch

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mavericks haspatch added
Owner: changed from macports-tickets@… to mlund@…

The file attachment:Portfile-rrdtool.diff appears to be a diff for the port openbabel, not a diff for the port rrdtool....

comment:2 in reply to:  1 Changed 11 years ago by gezelter@…

Replying to ryandesign@…:

The file attachment:Portfile-rrdtool.diff appears to be a diff for the port openbabel, not a diff for the port rrdtool....

Filename mistake on my part - it is indeed the Portfile diff for openbabel.

Changed 11 years ago by gezelter@…

Attachment: Portfile-openbabel.diff added

comment:3 Changed 11 years ago by SickTeddyBear

Cc: amcgee@… added

Cc Me!

comment:4 Changed 11 years ago by ltalirz (Leopold Talirz)

Cc: leopold.talirz@… added

Cc Me!

comment:5 Changed 11 years ago by Mathias.Laurin+macports.org@…

Cc: Mathias.Laurin+macports.org@… added

Cc Me!

comment:6 in reply to:  description Changed 11 years ago by Mathias.Laurin+macports.org@…

Replying to gezelter@…:

The openbabel 2.3.1 port depends on eigen (which doesn't compile on Mavericks), and has a few C++11 oddities in include files that prevent compilation even with eigen3. The modified port file and 5 patches fix compilation on Mavericks and bump openbabel to 2.3.2.

I have a patch-less solution. Matt Swain proposed a fix to the Open Babel mailing list on 31 Oct 2013 (he deserves the credit) and proposes that the tr1 oddities are due to the fact that Mavericks changes the default C++ library from libstdc++ to libc++ (I am quoting here).

Anyway, patched Portfile attached.

Changed 11 years ago by Mathias.Laurin+macports.org@…

Attachment: Portfile-openbabel.2.diff added

Diff against open babel-2.3.1

comment:7 Changed 10 years ago by NicosPavlov

Cc: nicos@… added

Cc Me!

comment:8 Changed 10 years ago by NicosPavlov

After the possibility of compiling again eigen version 2 on Mavericks (ticket #42969), it seems that the issues with c++ libraries are not eigen3-specific. However, while it is possible to compile with libstdc++, it is not considered good practice in Macports, as it can lead to conflicts in runtimes, and unexpected linking problems. Solving the issue to enable compilation with libc++ should be a preferred option.

It seems to me too that it could be possible to simplify slightly the patches, and since all changes are related to the same issue, they could be merged into one patch to make things simpler. Ideally, the port py-openbabel should also be upgraded to keep the two ports in sync.

I attach the corresponding files (merged patch, diffs, on Portfiles for openbabel and py-openbabel).

Changed 10 years ago by NicosPavlov

Attachment: patch-shared_ptr.diff added

Changed 10 years ago by NicosPavlov

Attachment: patch-openbabel3.diff added

Changed 10 years ago by NicosPavlov

Attachment: patch-py-openbabel3.diff added

comment:9 Changed 10 years ago by NicosPavlov

Resolution: fixed
Status: newclosed

Patches committed in r122034 and r122035, along with update to 2.3.2 (ticket #42627)

Note: See TracTickets for help on using tickets.