ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Сборка приложений с libpython
@ 2017-12-16  8:54 Alexei V. Mezin
  0 siblings, 0 replies; only message in thread
From: Alexei V. Mezin @ 2017-12-16  8:54 UTC (permalink / raw)
  To: Sisyphus

У нас python-config выдает флаги компиляции без -lpython2.7

$ python2.7-config --ldflags --cflags
-lpthread -ldl -lutil -lm -Xlinker -export-dynamic
-I/usr/include/python2.7

В результате некоторые configure-скрипты обламываются в сборке тестовой 
программы

configure:18076: gcc -o conftest -g -O2  -I/usr/include/python2.7 
conftest.c  -lpthread -ldl -lutil -lm -Xlinker -export-dynamic >&5
/tmp/.private/alexei/ccQ4nLqA.o: In function `main':
/tmp/gwyddion-2.49/conftest.c:35: undefined reference to `Py_Initialize'
...skip...
#include  <Python.h>
  int
  main ()
  {
  Py_Initialize();
    ;
    return 0;
  }


Программа-то из одной строчки. И попытка ее собрать вроде как 
идеологически правильная -- параметры компиляции и линковки взяты из 
выхлопа python-config.

Это так и должно быть? Или у нас какой-то совершенно особенный подход к 
питону? Потому что в других дистрибутивах на этот configure не жалуются, 
значит там все работает. В Убунте точно есть нужная библиотека в списке.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-16  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-16  8:54 [sisyphus] Сборка приложений с libpython Alexei V. Mezin

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git