From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] /usr/lib64/python2.7/config/libpython2.7.a is WRONG
Date: Mon, 16 Apr 2012 13:57:22 +0400
Message-ID: <20120416095722.GA11352@altlinux.org> (raw)
In-Reply-To: <7b39c31444540d3b01c11f5c7b7527a8@hadoop.ru>
[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]
On Mon, Apr 16, 2012 at 09:01:21AM +0400, Vitaly Kuznetsov wrote:
> On Sun, 15 Apr 2012 20:13:37 +0400, Yuri N. Sedunov wrote:
[...]
> >И здесь надо исправить.
> >$ python-config --ldflags
> >-L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7
> >-Xlinker -export-dynamic
>
> Не нравится -l или -L? Или обе? :)
Тут много чего не нравится.
-L не нужен просто потому, что в /usr/lib/python2.7/config нет никаких
библиотек.
-lpthread -ldl -lutil -lm -lpython2.7 не нравится, потому что --ldflags
это не --libs.
Но это именно не нравится, эти лишние -L и -l хотя бы ничего не ломают.
> Захакать, конечно, можно, но от этого
> могут сломаться те, кому действительно
> надо линковаться с libpython. В debian, чей
> подход к сборке python мы в том или ином виде
> пытаемся повторить
Не понимаю, зачем мы пытаемся этот подход повторить. Он, в отличие от
традиционного, будет постоянно создавать нам проблемы.
> в /usr/lib{,64}/python2.x/config/ лежат:
> файлы пакета python-dev:
> libpython2.x.a
> libpython2.x-pic.a
> файл пакета libpython:
> libpython2.x.so -> ../../libpython2.x.so.1
У нас всего этого нагромождения нет, и не надо.
> python-config --ldflags:
> -L/usr/lib/python2.x/config -lpthread -ldl -lutil -lm -lpython2.x
>
> В python-config логика следующая:
> libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
> libs.append('-lpython'+pyver)
> # add the prefix/lib/pythonX.Y/config dir, but only if there is
> no
> # shared library in prefix/lib/.
> if opt == '--ldflags':
> if not getvar('Py_ENABLE_SHARED'):
> libs.insert(0, '-L' + getvar('LIBPL'))
> libs.extend(getvar('LINKFORSHARED').split())
> print ' '.join(libs)
>
> т.е. -lpython2.x добавляется всегда,
> -L/usr/lib{,64}/python2.x/config добавляется в случае
> статической линковки интерпретатора с
> libpython. У нас, насколько я понимаю,
> пользователей статической libpython2.x.a нет,
У нас есть python-devel-static, и его для потенциальных пользователей
libpython2.7.a вполне достаточно.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-04-16 9:57 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 10:36 [devel] Rebuild to remove redundant libpython2.7 dependency Yuri N. Sedunov
2012-04-13 10:56 ` Vitaly Kuznetsov
2012-04-13 11:32 ` Yuri N. Sedunov
2012-04-13 12:18 ` Dmitry V. Levin
2012-04-13 14:39 ` Yuri N. Sedunov
2012-04-13 14:59 ` Vitaly Kuznetsov
2012-04-13 17:02 ` Dmitry V. Levin
2012-04-14 9:17 ` REAL
2012-04-14 9:32 ` Michael Shigorin
2012-04-14 10:43 ` REAL
2012-04-14 13:24 ` Michael Shigorin
2012-04-14 11:13 ` Ivan A. Melnikov
2012-04-14 11:55 ` REAL
2012-04-15 4:58 ` [devel] /usr/lib64/python2.7/config/libpython2.7.a is WRONG Ivan A. Melnikov
2012-04-15 15:22 ` Vitaly Kuznetsov
2012-04-15 15:48 ` Dmitry V. Levin
2012-04-15 15:52 ` Yuri N. Sedunov
2012-04-15 16:07 ` Dmitry V. Levin
2012-04-15 16:13 ` Yuri N. Sedunov
2012-04-16 5:01 ` Vitaly Kuznetsov
2012-04-16 5:11 ` REAL
2012-04-16 6:02 ` Vitaly Kuznetsov
2012-04-16 5:18 ` Yuri N. Sedunov
2012-04-16 5:40 ` REAL
2012-04-16 5:54 ` Yuri N. Sedunov
2012-04-16 5:58 ` REAL
2012-04-16 6:08 ` Yuri N. Sedunov
2012-04-16 6:11 ` Vitaly Kuznetsov
2012-04-16 6:00 ` Vitaly Kuznetsov
2012-04-16 5:58 ` Vitaly Kuznetsov
2012-04-16 6:02 ` Yuri N. Sedunov
2012-04-16 6:07 ` Vitaly Kuznetsov
2012-04-16 6:14 ` Yuri N. Sedunov
2012-04-16 6:54 ` Vitaly Kuznetsov
2012-04-16 7:13 ` Yuri N. Sedunov
2012-04-16 7:25 ` Vitaly Kuznetsov
2012-04-16 7:28 ` Yuri N. Sedunov
2012-04-16 8:32 ` Vitaly Kuznetsov
2012-04-16 10:08 ` Dmitry V. Levin
2012-04-16 19:14 ` Ivan A. Melnikov
2012-04-16 9:57 ` Dmitry V. Levin [this message]
2012-04-13 14:35 ` [devel] Rebuild to remove redundant libpython2.7 dependency REAL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120416095722.GA11352@altlinux.org \
--to=ldv@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git