From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A197B138010 for ; Thu, 11 Oct 2012 21:41:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5497721C005; Thu, 11 Oct 2012 21:41:01 +0000 (UTC) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by pigeon.gentoo.org (Postfix) with ESMTP id E6CEBE04F2 for ; Thu, 11 Oct 2012 21:40:23 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id un3so2330206obb.40 for ; Thu, 11 Oct 2012 14:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=xrLc+YubmDC8AStUEclI31blHsjut5rWYXTQF6gQ6NI=; b=G+Sy06ngIXc4P71wpaRxL/L5soceUrovL2bD3ogq2tF4Ja5ZmH01lEhKM+jlKyhjNH zvpomUCHTLzd3JrWtZIWRNUPSRyRo5AXDqIEM/nMDY+dhxNpLw1wRfKgqwO7C5l3rjWj uFXQOjOZtS8Q+CwMw+Q7BHIzIIEdZpu083mEEgoAyKDaBQUlZNsZidBNnpIGLgtZe4zW E0MTSLcpXwvZYeAgWYhxTrXr+GgXSfr9I8U8pkMDf9NPeaV6kJgeDtP5dMvY4oZgn0BU efqUkHX6Ia8NTlg+QAxtMOUQX1LGjt2ArvokS7xdkEneFEFyKs2dl+kzZ3ga6No+uCYC Gvuw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Received: by 10.60.22.71 with SMTP id b7mr1910641oef.6.1349991623233; Thu, 11 Oct 2012 14:40:23 -0700 (PDT) Sender: marien.zwart@gmail.com Received: by 10.182.55.97 with HTTP; Thu, 11 Oct 2012 14:40:23 -0700 (PDT) In-Reply-To: <50772E86.4000600@malth.us> References: <506F9C61.3020500@malth.us> <201210110014.46901.vapier@gentoo.org> <507692D9.3060909@malth.us> <201210111150.49497.vapier@gentoo.org> <50772E86.4000600@malth.us> Date: Thu, 11 Oct 2012 23:40:23 +0200 X-Google-Sender-Auth: akwiycRrqoN-lEemGrMdg_72SqQ Message-ID: Subject: Re: [gentoo-dev] Re: [PATCH/RFC] eclass/flag-o-matic.eclass: prepend-ldpath From: Marien Zwart To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 08d935a6-f467-4e21-94f5-7e81266fa6b6 X-Archives-Hash: 6c02f5c9fdda679240dbc0ac89833b7a I'm going to do something potentially rude and comment on this without having read the entire thread. On Thu, Oct 11, 2012 at 10:39 PM, Gregory M. Turner wrote: > Anyhow one thing I have figured out is how things can work correctly on > Linux wihtout -L.: on Linux, the python plugins aren't actually linked > against libpython.so! Python can be built with and without a shared library (libpythonx.y.so). If the shared library is built the interpreter executable is linked against it (of course), and normally so are the extension modules. This is useful because it makes the linker do the right thing for applications that embed python (and end up loading libpythonx.y via dlopen). If the shared library is not built extension modules cannot link against it, and the python executable itself exports the relevant symbols. So on a normal shared python build extensions should end up linked against libpythonx.y.so. However, at least one popular distro and presumably most of its derivatives (Debian) has a system python built without the shared library, plus the shared library built separately, for use by applications that embed python. I am not entirely sure why they still do this (if I understand correctly it was originally done for performance reasons, but I'm not sure if they've checked those are still valid). Their extension modules cannot link to libpythonx.y: their python interpreter executable provides the same symbols libpythonx.y provides, so loading such an extension module into the regular interpreter would result in collisions. The reason I mention this is Gentoo's python is built with the shared library, so on Gentoo your extensions *should* end up linked to libpythonx.y (if they use a more or less standard build system, at least). If yours are not I'm curious what happened, and would appreciate it if you gave me some more information off-list (marienz on freenode or email). -- Marien Zwart.