Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] libxml2 nie chce się kompilować z flagą python
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish)
View previous topic :: View next topic  
Author Message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Tue Feb 28, 2012 3:28 pm    Post subject: [SOLVED] libxml2 nie chce się kompilować z flagą python Reply with quote

Podczas kompilowania libxml2 z flagą python pojawia mi się następujący błąd:

Quote:
(...)
* Building of dev-libs/libxml2-2.7.8-r5 with CPython 2.7...
make -j17 -l24 PYTHON_INCLUDES=/usr/include/python2.7 PYTHON_SITE_PACKAGES=/usr/lib64/python2.7/site-packages
Making all in .
make[1]: Entering directory `/var/tmp/portage/dev-libs/libxml2-2.7.8-r5/work/libxml2-2.7.8/python-2.7'
/usr/bin/python ./generator.py .
/bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I../include -I../include -I../python -shared -march=native -O2 -pipe -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT libxml2mod_la-types.lo -MD -MP -MF .deps/libxml2mod_la-types.Tpo -c -o libxml2mod_la-types.lo `test -f './types.c' || echo './'`./types.c
Traceback (most recent call last):
File "./generator.py", line 1186, in <module>
buildStubs()
File "./generator.py", line 517, in buildStubs
(parser, target) = getparser()
File "./generator.py", line 34, in getparser
parser = xml.sax.make_parser()
File "/usr/lib64/python2.7/xml/sax/__init__.py", line 93, in make_parser
raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
make[1]: *** [gen_prog] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I../include -I../include -I../python -march=native -O2 -pipe -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT libxml2mod_la-types.lo -MD -MP -MF .deps/libxml2mod_la-types.Tpo -c ./types.c -fPIC -DPIC -o .libs/libxml2mod_la-types.o
In file included from /usr/include/python2.7/Python.h:86:0,
from ./libxml_wrap.h:1,
from ./types.c:9:
/usr/include/python2.7/intobject.h:45:1: warning: ISO C90 does not support 'long long'
In file included from /usr/include/python2.7/Python.h:88:0,
from ./libxml_wrap.h:1,
from ./types.c:9:
/usr/include/python2.7/longobject.h:49:44: warning: ISO C90 does not support 'long long'
/usr/include/python2.7/longobject.h:50:61: warning: ISO C90 does not support 'long long'
/usr/include/python2.7/longobject.h:51:1: warning: ISO C90 does not support 'long long'
/usr/include/python2.7/longobject.h:52:1: warning: ISO C90 does not support 'long long'
/usr/include/python2.7/longobject.h:53:1: warning: ISO C90 does not support 'long long'
/usr/include/python2.7/longobject.h:54:1: warning: ISO C90 does not support 'long long'
mv -f .deps/libxml2mod_la-types.Tpo .deps/libxml2mod_la-types.Plo
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libxml2-2.7.8-r5/work/libxml2-2.7.8/python-2.7'
make: *** [all-recursive] Error 1
emake failed
* ERROR: dev-libs/libxml2-2.7.8-r5 failed (compile phase):
* Building failed with CPython 2.7 in building() function
*
* Call stack:
* ebuild.sh, line 85: Called src_compile
* environment, line 5686: Called python_execute_function '-s' '--source-dir' 'python' 'building'
* environment, line 3942: Called die
* The specific snippet of code:
* die "${failure_message}";
*
* If you need support, post the output of 'emerge --info =dev-libs/libxml2-2.7.8-r5',
* the complete build log and the output of 'emerge -pqv =dev-libs/libxml2-2.7.8-r5'.
* The complete build log is located at '/var/tmp/portage/dev-libs/libxml2-2.7.8-r5/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-libs/libxml2-2.7.8-r5/temp/environment'.
* S: '/var/tmp/portage/dev-libs/libxml2-2.7.8-r5/work/libxml2-2.7.8'


z -python skompilowało się bez problemu, ale niestety ta flaga jest wymagana do zainstalowania X-ów.

emerge --info libxml2
Quote:
Portage 2.1.10.44 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 28 Feb 2012 10:15:01 +0000
app-shells/bash: 4.1_p9
dev-lang/python: 2.6.6-r2, 2.7.2-r3, 3.2.2
dev-util/cmake: 2.8.6-r4
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.0.3
sys-apps/openrc: 0.9.8.4
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.68
sys-devel/automake: 1.11.1
sys-devel/binutils: 2.21.1-r1
sys-devel/gcc: 4.5.3-r2
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc: 2.13-r4
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl"
LANG="pl_PL.utf8@euro"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl"
MAKEOPTS="-j17 -l24"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync3.pl.gentoo.org/gentoo-portage"
USE="X acl amd64 berkdb build bzip2 cli cracklib crypt cuda cups cxx dri dvd fortran gdbm gdnm gmp gpm hal iconv ipv6 mmx modules mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly ntfs ogg opengl openmp pam pcre pdf perl png pppd python readline session sql sse sse2 ssl sysfs tcpd threads unicode usb x264 xml xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="endev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nvidia nv vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
Package Settings
=================================================================
USE="build ipv6 (multilib) readline -debug -doc -examples -icu -python -static-libs -test"

dev-libs/libxml2-2.7.8-r5 was built with the following:


Rozwiązanie:
Okazało się, że problemem były flagi. Ciężko mi powiedzieć, dokładnie które, ale przywróciłem USE w /etc/make.conf do domyślnej wartości oraz usunąłem /etc/portage/package.use po czym przemergowałem wszystko z nowymi flagami i wszystko się ładnie skompilowało.


Last edited by bazzaar on Fri Mar 02, 2012 8:24 am; edited 3 times in total
Back to top
View user's profile Send private message
Garrappachc
Guru
Guru


Joined: 26 Dec 2008
Posts: 362
Location: Kraków

PostPosted: Tue Feb 28, 2012 5:01 pm    Post subject: Reply with quote

Pokaż
Code:
eselect python list


i powiedz, którą wersję pythona masz skompilowaną.
_________________
De profundis clamavi ad Te, Domine

emerge --info | virtual aviation
Back to top
View user's profile Send private message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Tue Feb 28, 2012 7:15 pm    Post subject: Reply with quote

Quote:
[1] python2.6
[2] python2.7
[3] python3.2 *


Skompilowane mam te trzy wersje.
Back to top
View user's profile Send private message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Tue Feb 28, 2012 7:59 pm    Post subject: Reply with quote

O matko... a czemu przełączyłeś na 3.2?

Zrób
Code:
eselect python set 2

I wtedy spróbuj skompilować i broń boże nie wracaj na 3.2 znowu...
Back to top
View user's profile Send private message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Tue Feb 28, 2012 9:07 pm    Post subject: Reply with quote

Próbowałem to kompilować na wszystkich 3 ustawieniach i za każdym razem to samo. Tym niemniej niezależnie od tego czy wybierałem 2.7, czy 3.2 (2.6 doinstalowałem później, ale na tym też się nie kompiluje) próbowało kompilować korzystając z 2.7.

Chciałbym podkreślić, że z flagą -python się skompilowało, problem jest przy ustawieniu flagi python, która niestety jest wymagana.
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Tue Feb 28, 2012 11:29 pm    Post subject: Reply with quote

Code:
qlist -IvUq libxml
dev-cpp/libxmlpp-2.34.2
dev-libs/libxml2-2.7.8-r5 icu python readline static-libs test
dev-perl/libxml-perl-0.80.0


Code:
root  #  eselect python list
Available Python interpreters:
  [1]   python2.7 *
root  #


Melduje posłusznie, że kilka dni temu stawiałem Gentoo Hardened amd64-multilib na gcc-4.6.2 - i wsio ruszyło.
Przypuszczam, że jakieś inne rzeczy w pythonie zbudowały się do Pythona-3.2, i teraz są jaja.
Radziłbym wybrać na stałe jedną wersje pythona, potem odpalić
Code:
python-updater
żeby posprawdzał i przeinstalował wszystko, co od tego pythona zależy.

Ewentualnie albo inna wersja, albo paczka z Tinderobxa.

Pozdro
8)
Back to top
View user's profile Send private message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Wed Feb 29, 2012 8:59 am    Post subject: Reply with quote

Próbowałem już z python-updater z każdą z tych 3 wersji, ale niestety nic to nie dało.

Co do Tinderboxa to w make.conf powinno być:
Code:
PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/default-linux/amd64/"
?

Bo jeżeli tak, to emerge to olewa i próbuje mimo wszystko kompilować.
Back to top
View user's profile Send private message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Wed Feb 29, 2012 3:14 pm    Post subject: Reply with quote

No i właśnie to Twoje próbowanie z każdą z trzech wersji prawdopodobnie wbiło już całkiem gwóźdź do trumny, a szczególnie python-updater odpalony na 3.2 O_o
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Wed Feb 29, 2012 5:31 pm    Post subject: Reply with quote

bazzaar wrote:
Próbowałem już z python-updater z każdą z tych 3 wersji, ale niestety nic to nie dało.

Co do Tinderboxa to w make.conf powinno być:
Code:
PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/default-linux/amd64/"
?

Bo jeżeli tak, to emerge to olewa i próbuje mimo wszystko kompilować.

Ja mam
Code:
PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/default-linux/amd64/"

I jak wrzucam
Code:
emerge -G paczka
to najpierw sprawdza w $PKGDIR, a jak tam nie znajdzie, to z Tinderboxa.

Także najpierw radziłbym poczytać o funkcjach emerge, albo w manie, albo w dokumentacji na necie.

To by było na tyle
8)


Last edited by Jacekalex on Wed Feb 29, 2012 6:20 pm; edited 2 times in total
Back to top
View user's profile Send private message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Wed Feb 29, 2012 5:34 pm    Post subject: Reply with quote

Problem w tym, że ja najpierw próbowałem zainstalować libxml2 z pythonem ustawionym na 2.7, a dopiero potem zmieniłem na 3.2, więc to nie jest powód.
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Wed Feb 29, 2012 6:25 pm    Post subject: Reply with quote

bazzaar wrote:
Problem w tym, że ja najpierw próbowałem zainstalować libxml2 z pythonem ustawionym na 2.7, a dopiero potem zmieniłem na 3.2, więc to nie jest powód.

Jest powód.

Jak przy pythonie 2.7 nie chciał się skompilować, to wtedy powinieneś się zająć libxml, i albo skompilować inną wersję, albo zaciągnąć gotową paczkę.
Jeśli natomiast zacząłeś przełączać się między wersjami pythona, i włączyłeś mocno nieprzewidywalną wersję 3.2 - to narobiłeś sobie bajzlu, jaki trudno sobie wyobraźić.
Python - to język programowania, zabawa interpreterami pythona zawsze przypomina zabawą zapałkami na stogu z sianem ;)

To by było na tyle
8)
Back to top
View user's profile Send private message
bazzaar
n00b
n00b


Joined: 01 Jan 2011
Posts: 14

PostPosted: Wed Feb 29, 2012 7:23 pm    Post subject: Reply with quote

Do X wymagana jest wersja libxml2-2.7.8-r5. Na tinderboxie jest wersja 2.7.8-r3. W systemie miałem 2.7.8-r4. Jak zamaskowałem r5 to X krzyczały o odmaskowanie i koniecznie chciały wersje r5 z flagą python.
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Wed Feb 29, 2012 8:45 pm    Post subject: Reply with quote

To poszukaj w logu z budowania libxml2 odpowiedzi, dlaczego się wykłada z flagą python.
Może wystarczy go zbudować przez polecenie ebuild (ręcznie), czasem coś poprawić w ebuildzie (to skrypt basha - można go edytować), najczęsciej przebudować jakieś zależności budowanego pakietu, ale za każdym razem dowiedzieć się z logu, co się właściwie stało.

Diabelnie dziwny i dość tajemniczy ten Twój problem.
U mnie:
Code:
dev-libs/libxml2
     Available versions:  (2) 2.7.3-r2[1] ~2.7.7[1] 2.7.7[3] 2.7.8[3] 2.7.8-r4{tbz2} 2.7.8-r5{tbz2} ~2.7.8-r5{tbz2}[4]
   {debug doc examples icu ipv6 lib32 python readline static-libs test}
     Installed versions:  2.7.8-r5(2){tbz2}(07:14:09 28.02.2012)(icu python readline static-libs test -debug -doc -examples -ipv6)
     Homepage:            http://www.xmlsoft.org/
     Description:         Version 2 of the library to manipulate XML files


Code:
genlop -ti dev-libs/libxml2-2.7.8-r5
 * dev-libs/libxml2

     Tue Feb 28 07:14:25 2012 >>> dev-libs/libxml2-2.7.8-r5
       merge time: 2 minutes and 49 seconds.


   Total builds: 1
   Global build time: 2 minutes and 49 seconds.

   Info about currently installed ebuild:

   * dev-libs/libxml2-2.7.8-r5
   Install date: Tue Feb 28 07:14:25 2012
   USE="icu python readline static-libs test -debug -doc -examples -ipv6"
   CFLAGS="-march=native -O2 -pipe"


Budowany przy pomocy testowego (zamaskowanego) kompilatora:
Code:
gcc version 4.6.2 (Gentoo Hardened 4.6.2 p1.3, pie-0.5.0)

I działa.
Tak samo na drugiej partycji - Gentoo hardened x86 z gcc-4.5.3-r1.

Tym sposobem podejrzewam, że masz coś gruntownie namieszane w pythonie.
RTFM:
https://forums.gentoo.org/viewtopic-t-832908.html

Pozdrawiam
8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum