Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#44136 closed defect (fixed)

PyROOT with root6 ACLiC Issues

Reported by: jfcaron3 Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec)
Port: root6

Description (last modified by mojca (Mojca Miklavec))

Hi, I've tried reporting this on ROOTTalk but haven't gotten anywhere. It looks like it might be MacPorts-specific. ROOTTalk post: http://root.cern.ch/phpBB3/viewtopic.php?f=14&t=18229

I tried using MacPorts provided ROOT 6.00.01 and I get the same behavior, so it's not my customized GSL & ROOT. This is still a problem on 6.06.00.

Steps to reproduce.

File tuple.C:

#ifndef __MAKECINT__
#include <tuple>
#endif
#include <array>
#include <utility>
int foo() {
  int a,b;
  std::tie(a,b)= std::make_pair(5,6);
  return a;
}

When running python2.7:

> python2.7
Python 2.7.11 (default, Dec  8 2015, 20:16:01) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> ROOT.gROOT.ProcessLine(".L tuple.C+")
Info in <TMacOSXSystem::ACLiC>: creating shared library /private/tmp/./tuple_C.so
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
0L
>>> 

When running root6:

$ root6
...
root [0] .L tuple.C+
Info in <TMacOSXSystem::ACLiC>: creating shared library /private/tmp/./tuple_C.so
root [1] .q

(Running python2.7 after root6 would make the python command succeed because the files are already there.)

Change History (6)

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

Cc: jonesc@… removed
Owner: changed from macports-tickets@… to jonesc@…
Version: 2.3.0

comment:2 Changed 9 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

comment:3 Changed 9 years ago by cjones051073 (Chris Jones)

Hi,

The command that is run when ACLiC generates the library is

>>> ROOT.gSystem.GGetMakeSharedLib()
>>> 'cd $BuildDir ; clang++ -c $Opt -pipe -Os -arch x86_64 -stdlib=libc++ -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++14 -stdlib=libc++ -DR__HAVE_CONFIG $IncludePath $SourceFiles ; clang++ $ObjectFiles -dynamiclib -Wl,-headerpad_max_install_names -m64 -single_module -Wl,-dead_strip_dylibs  $LinkedLibs -o $SharedLib'

Trying to figure what those environment variables get expanded to the best way I found was to just run 'ps x' whilst the command was running... this gives

31099 s001  S+     0:00.01 sh -c cd "/Users/chris" ; clang++ -c -O2 -DNDEBUG -pipe -Os -arch x86_64 -stdlib=libc++ -m64 -pipe -W -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -std=c++14 -stdlib=libc++ -DR__HAVE_CONFIG  -I/opt/local/libexec/root6/include/root -I"/opt/local/libexec/root6/etc/root" -I"/opt/local/libexec/root6/include/root" -I"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/interpreter/cling/include" -I"/opt/local/libexec/root6/etc/root/cling" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/include/root" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/graf3d/g3d/inc" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/gui/gui/inc" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/io/io/inc" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/core/base/../textinput/src" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/core/base/" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/core/thread/" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/io/io/" -I"/opt/local/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/net/net/" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/tree/tree/" -I"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/bindings/pyroot/" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/interpreter/llvm/src/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/interpreter/llvm/src/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/interpreter/llvm/src/tools/clang/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/interpreter/llvm/src/tools/clang/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/interpreter/cling/include" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/etc/cling/cint" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/core/metautils/" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/root-6-06-00/hist/hist/inc" -I"/opt/local/var/macports/build/_Users_chris_Projects_MacPorts_dports_science_root6/root6/work/build/math/mathcore/"   -D__ACLIC__ "/Users/chris/tuple_C_ACLiC_dict.cxx" ; clang++ "/Users/chris/tuple_C_ACLiC_dict.o" -dynamiclib -Wl,-headerpad_max_install_names -m64 -single_module -Wl,-dead_strip_dylibs  -lRint -lCore -L/opt/local/libexec/root6/lib/root /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/lib/libz.1.dylib /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so /opt/local/lib/libintl.8.dylib /opt/local/lib/libiconv.2.dylib /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so /opt/local/lib/libedit.0.dylib /opt/local/lib/libncurses.6.dylib /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/libPyROOT.so /opt/local/libexec/root6/lib/root/libTree.6.so /opt/local/libexec/root6/lib/root/libRIO.6.so /opt/local/libexec/root6/lib/root/libCore.6.so /opt/local/libexec/root6/lib/root/libNet.6.so /opt/local/libexec/root6/lib/root/libThread.6.so /opt/local/lib/libssl.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib /opt/local/lib/libz.1.dylib /opt/local/lib/libpcre.1.dylib /opt/local/lib/liblzma.5.dylib /usr/lib/libScreenReader.dylib /usr/lib/libxml2.2.dylib /usr/lib/libarchive.2.dylib /usr/lib/libenergytrace.dylib /usr/lib/libxar.1.dylib /usr/lib/libsqlite3.dylib /usr/lib/libbz2.1.0.dylib /usr/lib/liblzma.5.dylib /usr/lib/libmecabra.dylib /usr/lib/libiconv.2.dylib /usr/lib/libheimdal-asn1.dylib /usr/lib/libmarisa.dylib /usr/lib/libChineseTokenizer.dylib /usr/lib/libcmph.dylib /usr/lib/libcompression.dylib /usr/lib/libxslt.1.dylib /usr/lib/libFosl_dynamic.dylib /opt/local/libexec/root6/lib/root/libCling.so /opt/local/libexec/root6/lib/root/libmapDict.6.06.00.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so /opt/local/libexec/root6/lib/root/libMathCore.6.06.00.so -o "/Users/chris/./tuple_C.so"

so indeed the library

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so

is in the list.

I cannot comment really on if this is a bug in ROOT (why is it linking against this...) or a bug in the ROOT Macports build, or a bug in the python package, or a feature of the way the MacPorts python ports are built as frameworks or ...

Sorry. I don't have any ideas on what to do, but thought I would post this just for future reference...

Chris

comment:4 Changed 6 years ago by cjones051073 (Chris Jones)

Closing this, as the issue appears resolved with the latest root6 port (6.14.02) and using the now default python 3.6

comment:5 Changed 6 years ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: newclosed

comment:6 Changed 6 years ago by mf2k (Frank Schima)

Keywords: root python removed
Note: See TracTickets for help on using tickets.