building on Mavericks OS X 10.9

127 views
Skip to first unread message

revkarol

unread,
Oct 29, 2013, 4:37:52 PM10/29/13
to rootpy...@googlegroups.com
Just posting a bug report.

I got root to build with the latest git trunk.  

rootpy seems to work with the latest version.

root_numpy doesn't seem to build however.  Seems to mostly to do with the new compiler - clang.

Log is attached.

Regards,
Karol.
log.txt

Noel Dawe

unread,
Oct 29, 2013, 5:57:20 PM10/29/13
to rootpy...@googlegroups.com
Hi Karol,

Did root_numpy compile with a previous version of clang? I am searching around and see other cases where problems have been found in Cython's generated code where clang compatibility is broken. We can investigate.

Can you install gcc/g++ on your mac and compile with that instead for now?

Noel


--
You received this message because you are subscribed to the Google Groups "rootpy users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rootpy-users...@googlegroups.com.
To post to this group, send email to rootpy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rootpy-users/12949b2c-94f5-48fe-b2f3-472c3550f362%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Noel Dawe

unread,
Nov 1, 2013, 4:45:35 PM11/1/13
to rootpy...@googlegroups.com, Karol Hennessy
Hi Karol,

Can you confirm?

Thanks,
Noel

Noel Dawe

unread,
Nov 4, 2013, 12:41:25 AM11/4/13
to rootpy...@googlegroups.com, Karol Hennessy, Piti Ongmongkolkul
Hi Karol,

I am wondering if this is a solution:


xcode-select --install

to update the XCode Command Line Tools.

Unfortunately I do not use a Mac so I cannot test it for you. I have been reading around the net about various issues in Mavericks. Seems like root_numpy is not alone in terms of compilation problems after updating that OS.

Noel

Karol Hennessy

unread,
Nov 4, 2013, 4:09:49 AM11/4/13
to Noel Dawe, rootpy...@googlegroups.com, Piti Ongmongkolkul
Sorry about the delay Noel.

I'm incredibly busy at the moment.  I'll try give it a shot tonight.
I've already done:  xcode-select --install

You're right in that it's only root_numpy.  I'll see if it will work with gcc.


Noel Dawe

unread,
Nov 6, 2013, 11:16:24 AM11/6/13
to Karol Hennessy, rootpy...@googlegroups.com, Piti Ongmongkolkul, ja...@havoc.io
Hi Karol,

Thanks to Jacob Howard for fixing this issue! See this change that was just merged in:


root_numpy should hopefully now compile for you.

Noel

Noel Dawe

unread,
Nov 6, 2013, 11:36:11 AM11/6/13
to Jacob Howard, Karol Hennessy, rootpy...@googlegroups.com, Piti Ongmongkolkul
Thanks Jacob. I will add this note to the install docs: http://rootpy.github.io/root_numpy/install.html

Noel


On Wed, Nov 6, 2013 at 8:29 AM, Jacob Howard <ja...@havoc.io> wrote:
Just as a general followup, if you're compiling root_numpy with Clang and linking against libc++ (which hopefully works now :) ), you will also need to compile ROOT with Clang and libc++, because libstdc++ and libc++ are not ABI compatible.

ROOT compiles with Clang and libc++ since version 5.34/11, but PyROOT has a bug which was fixed after that, so it is best to compile from the v5-34-00-patches branch of ROOT.  You can do this easily with Homebrew via:

brew install --HEAD root

Best,
Jacob

Noel Dawe

unread,
Nov 10, 2013, 7:08:03 PM11/10/13
to Jacob Howard, Karol Hennessy, rootpy...@googlegroups.com, Piti Ongmongkolkul
I released version 3.1.0 with this fix among other improvements:


Also note that you can now specify branch expressions in the branches list when converting a TTree into an array:


rec = tree2rec(intree,
    branches=['x', 'y', 'sqrt(y)', 'TMath::Landau(x)', 'cos(x)*sin(y)'],
    selection='z > 0',
    start=0, stop=10, step=2)


Cheers!
Noel

Jacob Howard

unread,
Nov 11, 2013, 5:07:17 AM11/11/13
to Noel Dawe, Karol Hennessy, rootpy...@googlegroups.com, Piti Ongmongkolkul
Hi Noel,

That's really cool.  Out of curiosity, can one use user-defined functions which ROOT is aware of, as in (e.g.) TTree::Draw?

Best,
Jacob

Noel Dawe

unread,
Nov 11, 2013, 5:25:13 AM11/11/13
to Jacob Howard, Karol Hennessy, rootpy...@googlegroups.com, Piti Ongmongkolkul
Hi Jacob,

Yes, the underlying code in root_numpy is similar to what TTree::Draw does with TTreePlayer so you can gSystem.Load() your own libraries containing your functions or even use rootpy's "compiled" module to define your C functions in the python source itself:


Cheers,
Noel
Reply all
Reply to author
Forward
0 new messages