Return-Path: X-Original-To: apmail-mesos-issues-archive@minotaur.apache.org Delivered-To: apmail-mesos-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B72561130C for ; Fri, 29 Aug 2014 06:37:53 +0000 (UTC) Received: (qmail 63083 invoked by uid 500); 29 Aug 2014 06:37:53 -0000 Delivered-To: apmail-mesos-issues-archive@mesos.apache.org Received: (qmail 63048 invoked by uid 500); 29 Aug 2014 06:37:53 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 63037 invoked by uid 99); 29 Aug 2014 06:37:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2014 06:37:53 +0000 Date: Fri, 29 Aug 2014 06:37:52 +0000 (UTC) From: "Vinod Kone (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-1745) Building Python egg on OS X using clang is problematic MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14114924#comment-14114924 ] Vinod Kone commented on MESOS-1745: ----------------------------------- So the CXX flags are not being passed properly to setup.py ? I think [~tillt] observed something similar before? > Building Python egg on OS X using clang is problematic > ------------------------------------------------------ > > Key: MESOS-1745 > URL: https://issues.apache.org/jira/browse/MESOS-1745 > Project: Mesos > Issue Type: Bug > Affects Versions: 0.19.1 > Environment: Mac OS X 10.8.5 > clang-3.3 installed via brew > python 2.7.8 install via brew ([GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]) > Reporter: Jie Yu > > Here is what I have observed, correct me if I am wrong. > To reproduce: > {noformat} > $ tar zxvf mesos-0.19.1.tar.gz > $ cd mesos-0.19.1 > $ mkdir build > $ cd build > $ CC=clang-3.3 CXX=clang++-3.3 ../configure > $ make > $ PYTHONPATH=src/python/dist/mesos-0.19.1-py2.7-macosx-10.8-x86_64.egg python > Python 2.7.8 (default, Aug 18 2014, 15:46:02) > [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 mesos > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.macosx-10.8-x86_64/egg/mesos.py", line 26, in > File "build/bdist.macosx-10.8-x86_64/egg/_mesos.py", line 7, in > File "build/bdist.macosx-10.8-x86_64/egg/_mesos.py", line 6, in __bootstrap__ > ImportError: dlopen(/Users/jyu/.python-eggs/mesos-0.19.1-py2.7-macosx-10.8-x86_64.egg-tmp/_mesos.so, 2): Symbol not found: __ZN5mesos20MesosSchedulerDriverC1EPNS_9SchedulerERKNS_13FrameworkInfoERKSs > Referenced from: /Users/jyu/.python-eggs/mesos-0.19.1-py2.7-macosx-10.8-x86_64.egg-tmp/_mesos.so > Expected in: flat namespace > in /Users/jyu/.python-eggs/mesos-0.19.1-py2.7-macosx-10.8-x86_64.egg-tmp/_mesos.so > >>> > {noformat} > After digging this problem today, here is what I've found: > 1. build/src/.libs/libmesos_no_3rdparty.a is built using clang++-3.3 with flags -std=c++11 -stdlib=libc++. So the mangled MesosSchedulerDriver constructor symbol is like the following in libmesos_no_3rdparty.a > {noformat} > [tw-mbp-jyu build]$ nm src/.libs/libmesos_no_3rdparty.a | grep MesosSchedulerDriver > ... > 00000000000006d0 T __ZN5mesos20MesosSchedulerDriverC1EPNS_9SchedulerERKNS_13FrameworkInfoERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE > ... > {noformat} > 2. build/src/python/build/temp.macosx-10.8-x86_64-2.7/native/mesos_scheduler_driver_impl.o is built using clang++-3.3 without -stdlib=libc++ > {noformat} > clang-3.3 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -Qunused-arguments -Qunused-arguments -I/tmp/build/mesos-0.19.1/build/../include -I/tmp/build/mesos-0.19.1/build/include -I/tmp/build/mesos-0.19.1/build/src -I/tmp/bui > ld/mesos-0.19.1/build/src/python/native -I/tmp/build/mesos-0.19.1/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0/src -I/opt/twitter/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c native/mesos_ > scheduler_driver_impl.cpp -o build/temp.macosx-10.8-x86_64-2.7/native/mesos_scheduler_driver_impl.o > {noformat} > As a result, it expects a mangled MesosSchedulerDriver constructor symbol like the following: > {noformat} > [tw-mbp-jyu build]$ nm src/python/build/temp.macosx-10.8-x86_64-2.7/native/mesos_scheduler_driver_impl.o | grep MesosSchedulerDriver > U __ZN5mesos20MesosSchedulerDriverC1EPNS_9SchedulerERKNS_13FrameworkInfoERKSs > ... > {noformat} > 3. As a result, the above symbol will remain 'unresolved' in _mesos.so, and subsequently causes issue when we 'import mesos' using the egg. -- This message was sent by Atlassian JIRA (v6.2#6252)