Fortran recipe

Chris Jones jonesc at hep.phy.cam.ac.uk
Sun Aug 25 13:53:40 PDT 2013


Hi,

On 25 Aug 2013, at 7:22pm, Christoph Deil <Deil.Christoph at gmail.com> wrote:

> 
> On Aug 25, 2013, at 10:44 AM, Mojca Miklavec <mojca at macports.org> wrote:
> 
>> On Sun, Aug 25, 2013 at 5:16 PM, Jeremy Huddleston Sequoia wrote:
>>> Seeing as how many developers don't understand the problems surrounding mixing multiple versions of the C++ runtime in a single process, I doubt that users understand those problems.  I think the root port needs to be simplified significantly.
>>> 
>>> Does root use any C++ APIs exposed by the host or other ports?  Does root expose any C++ APIs?
>> 
>> I don't understand much about those problems either.
> 
> I also don't understand the issues, or how to debug / check them.
> 
> I am using a non-public gamma-ray astronomy data analysis package built on top of ROOT.
> After a lot of trial and error I did get it to compile with Macports gcc, I never managed to compile it with Apple gcc or (Apple or Macports) clang.
> So at least I can write code and check that it compiles on my Mac  … actually running the software sometimes works and sometimes mysteriously crashes.
> 
> Probably this is a very specialised use case, if the Macports GCC variants are removed from the ROOT port I'll just build ROOT from source myself, no problem if that is the right thing to do to avoid "C++ runtime mix errors" (whatever that means).

The issue is in essence the gcc compilers use one c++ runtime library (libstdc++), the other compiles, clang etc. use another (libc++). Mixing these is a bad idea, so if you where to compile root using gcc, you should in theory compile *all* ports that that uses with it as well. This is not done. Maybe the crashes you refer to are to do with this …

Removing the gcc variants is thus a good idea to avoid this. I have a version under test which does this, uses the fortran recipe JH posted earlier in this thread, and fixes the cocoa variant by selecting the compiler in a better way. 

Note that for those users that *really* want to use gcc, they will always be able to do something like

> sudo port install root configure.compiler=macports-gcc-4.8

So all is not lost, but by doing so you are accepting whatever the consequences might be.

Chris

> 
> I just wanted to mention this here because I think part of the problem with users and even developers not understanding these issues is that there are no good resources on the web explaining them.
> If one of the experts has some links to share or even time to make a wiki page with explanations it would be much appreciated.
> 
> Thanks to all of you making these science C++ / Fortran packages available in Macports!
> 
> Christoph
> 
>> 
>> Root probably doesn't just expose APIs, but actually provides C++
>> interpreter and compiler of some sort, CINT and CLING. (I'm sorry that
>> I cannot explain it better, but I don't really understand how it all
>> works. Maybe http://root.cern.ch/drupal/category/package-context/cling
>> answers any of your questions?)
>> 
>> Root has a few more problems. Last time when I tried compiling Root 6,
>> it failed to work with Fortran
>> (https://sft.its.cern.ch/jira/browse/ROOT-4874), I wasn't able to
>> disable Fortran at all (it was possible to disable it with
>> ./configure, but not with CMake). On top of that problem came the
>> inability to prevent shipping "-arch" flags to Fortran compilers:
>> https://trac.macports.org/ticket/37732 (this problem affects at least
>> Root if it ever gets ported to CMake-based installation and plplot).
>> 
>> Mojca
>> _______________________________________________
>> macports-dev mailing list
>> macports-dev at lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/macports-dev
> 
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2030 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130825/0c1676f9/attachment-0001.p7s>


More information about the macports-dev mailing list