Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Python] Invalid Syntax [Résolu]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Tue Mar 08, 2011 5:56 pm    Post subject: [Python] Invalid Syntax [Résolu] Reply with quote

Hello TLM !
ça faisait pire longtemps ^^

Voilà mon "sushi"
J'ai un blème avec la compilation d'un package que je n'arrive malheureusement pas à résoudre.

Voilà le message d'erreur :

Code:

checking for python script directory... ${prefix}/lib64/python3.1/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python3.1/site-packages
checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
                        ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import sys; print sys.exec_prefix
                        ^
SyntaxError: invalid syntax
found
checking for python libraries...   File "<string>", line 1
    from distutils.sysconfig import get_config_var; print repr(get_config_var('Py_ENABLE_SHARED'))
                                                             ^
SyntaxError: invalid syntax
./configure: line 12164: test: ==: unary operator expected
  File "<string>", line 1
    from distutils import sysconfig; print sysconfig.get_config_var('CC')
                                                   ^
SyntaxError: invalid syntax
  File "<string>", line 1
    from distutils import sysconfig; print sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('SHLIBS')
                                                   ^
SyntaxError: invalid syntax
  File "<string>", line 1
    from distutils import sysconfig; print sysconfig.get_config_var('LIBDIR')
                                                   ^
SyntaxError: invalid syntax
  File "<string>", line 1
    from distutils import sysconfig; print sysconfig.get_config_var('LIBPL')
                                                   ^
SyntaxError: invalid syntax
not found
configure: error: could not find Python headers or library

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-python/gnome-python-base-2.28.1/work/gnome-python-2.28.1/config.log
 * ERROR: dev-python/gnome-python-base-2.28.1 failed:
 *   econf failed
 *
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 3239:  Called gnome2_src_compile
 *   environment, line 2505:  Called gnome2_src_configure
 *   environment, line 2519:  Called econf '--disable-allbindings'
 *     ebuild.sh, line  552:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of 'emerge --info =dev-python/gnome-python-base-2.28.1',
 * the complete build log and the output of 'emerge -pqv =dev-python/gnome-python-base-2.28.1'.
 * The complete build log is located at '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/temp/environment'.
 * S: '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/work/gnome-python-2.28.1'

 * Messages for package dev-python/gnome-python-base-2.28.1:

 * ERROR: dev-python/gnome-python-base-2.28.1 failed:
 *   econf failed
 *
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 3239:  Called gnome2_src_compile
 *   environment, line 2505:  Called gnome2_src_configure
 *   environment, line 2519:  Called econf '--disable-allbindings'
 *     ebuild.sh, line  552:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of 'emerge --info =dev-python/gnome-python-base-2.28.1',
 * the complete build log and the output of 'emerge -pqv =dev-python/gnome-python-base-2.28.1'.
 * The complete build log is located at '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/temp/environment'.
 * S: '/var/tmp/portage/dev-python/gnome-python-base-2.28.1/work/gnome-python-2.28.1'






Et voilà de quoi m'aider =D


Code:
Gentoo_St4rg33k ~ # emerge --info =dev-python/gnome-python-base-2.28.1
Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.36-gentoo-r5 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-gentoo-1.12.14
Timestamp of tree: Tue, 08 Mar 2011 17:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r2, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-fprefetch-loop-arrays -funroll-all-loops -mtune=amdfam10 -O3 -mabm -msse4a -march=amdfam10 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-fprefetch-loop-arrays -funroll-all-loops -mtune=amdfam10 -O3 -mabm -msse4a -march=amdfam10 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://de-mirror.org/distro/gentoo/"
LANG="fr_CH.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
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="/var/lib/layman/dottout"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 automount berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus device-mapper dri dvd extras fortran gdbm gdu gnome gpm gtk hald iconv icu ipv6 jpeg mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl policykit pppd python readline session sqlite sse sse2 ssl sysfs tcpd threads unicode xorg 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 auth_digest" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Merci !


Last edited by mysix on Wed Mar 09, 2011 11:49 am; edited 1 time in total
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Tue Mar 08, 2011 6:54 pm    Post subject: Reply with quote

Je crois avoir deviné la source du problème... J'ai mis une méthode moins agressive de la compilation dans les FLAGS.
Je recompile le tout avec emerge world pour créer du code plus stable ^^
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Tue Mar 08, 2011 8:03 pm    Post subject: Reply with quote

rien n'y fait, ca ne marche toujours pas
Back to top
View user's profile Send private message
guilc
Bodhisattva
Bodhisattva


Joined: 15 Nov 2003
Posts: 3326
Location: Paris - France

PostPosted: Tue Mar 08, 2011 8:04 pm    Post subject: Reply with quote

Vu le type d'erreur, j'aurais plutot dit que tu as un python 3 actif, alors que le package est compatible seulement avec python 2...
Voir du côté de eselect python !
_________________
Merci de respecter les règles du forum.

Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Tue Mar 08, 2011 8:07 pm    Post subject: Reply with quote

si seulement c'était si simple ^^
Non ce n'est pas ca déjà essayé
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Tue Mar 08, 2011 8:09 pm    Post subject: Reply with quote

J'ai 2 version de python active,
Code:

 * Main active version of Python:  2.6
 * Active version of Python 2:     2.6
 * Active version of Python 3:     3.1
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Wed Mar 09, 2011 7:07 am    Post subject: Reply with quote

Bon apparemment j'ai une grosse c******.
En lancant des programmes simple tel que revdep-rebuild, au début de la séquence il détecte une erreur au sein même de ce programme.
Y a t'il un moyen simple de supprimmer tous les paquets installé pour revenir en système de base ?
Ce pourrait-il que le problème vient du simple fait que j'ai voulu mettre ma Gentoo en format UTF8 ?

Merci d'avance pour vos réponses.
Back to top
View user's profile Send private message
freezby
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2006
Posts: 103
Location: Angers, France

PostPosted: Wed Mar 09, 2011 11:17 am    Post subject: Reply with quote

Je suis de l'avis de guilc, ton problème vient probablement de python 3. D'ailleurs quand on regarde ton premiere message d'erreur, on peut voir qu'il essaie de compiler avec.

Si tu fais :
Code:
eselect python list

Ca te retourne bien que la 2.6 est sélectionnée ?
Back to top
View user's profile Send private message
mysix
Apprentice
Apprentice


Joined: 26 Mar 2010
Posts: 183

PostPosted: Wed Mar 09, 2011 11:49 am    Post subject: Reply with quote

Hum, oui effectivement aujourd'hui ça marche ^^
Même opération hier mais sans succès.
Remarque que j'avais d'autre soucis de packages aussi ^^

Encore merci les gars
Back to top
View user's profile Send private message
freezby
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2006
Posts: 103
Location: Angers, France

PostPosted: Wed Mar 09, 2011 1:12 pm    Post subject: Reply with quote

Ouais c'est normal, un certains nombres de paquets ne supportent pas python 3. Donc a priori si c'était le même type d'erreur, ca devrait être tout bon pour les autres paquets qui échouaient également :)
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Wed Mar 09, 2011 1:59 pm    Post subject: Reply with quote

Mais effectivement tes cflags de racer pourront éventuellement t'apporter d'autres problèmes obscurs, pour ne t'apporter qu'un gain de 3 nanosecondes par semaine, c'est un risque inutile. Les paquets ayant besoin d'optimisations poussées (genre mplayer) les ont déjà par défaut en cflags forcés, et pour le reste c'est très peu utile. Un bon -O2 -pipe -march=truc est largement suffisant (et c'est la seule combinaison supportée officiellement).
Back to top
View user's profile Send private message
Poussin
l33t
l33t


Joined: 08 Jun 2007
Posts: 659
Location: Liège

PostPosted: Wed Mar 09, 2011 4:55 pm    Post subject: Reply with quote

python-updater?
Back to top
View user's profile Send private message
freezby
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2006
Posts: 103
Location: Angers, France

PostPosted: Wed Mar 09, 2011 5:01 pm    Post subject: Reply with quote

C'est résolu poussin xD
Back to top
View user's profile Send private message
Poussin
l33t
l33t


Joined: 08 Jun 2007
Posts: 659
Location: Liège

PostPosted: Wed Mar 09, 2011 5:07 pm    Post subject: Reply with quote

c'est pas mon jour :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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