Je rencontre un problème de génération de Python 2.6.4 sur Snow Leopard.Problème de construction Python sous Mac OS 10.6/Snow Leopard
- Mac OS X 10.6
- CPU Yonah, 32 bits
- gcc-4.2.1
mise à jour je
résolu en enlevant tous inclusions non standard et bibliothèques du CFLAGS (il est arrivé être un uuid/uuid.h
là-dedans ...). Pourtant, il compilé malgré l'erreur décrite ci-dessous, avec /usr/include/hfs/hfs_format.h:765
étant un point chaud. Pour les curieux ou de ressources, le fichier source en question:
$ cat /usr/include/hfs/hfs_format.h
...
748 #include <uuid/uuid.h>
749
750 /* JournalInfoBlock - Structure that describes where our journal lives */
751
752 // the original size of the reserved field in the JournalInfoBlock was
753 // 32*sizeof(u_int32_t). To keep the total size of the structure the
754 // same we subtract the size of new fields (currently: ext_jnl_uuid and
755 // machine_uuid). If you add additional fields, place them before the
756 // reserved field and subtract their size in this macro.
757 //
758 #define JIB_RESERVED_SIZE ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)
759
760 struct JournalInfoBlock {
761 u_int32_t flags;
762 u_int32_t device_signature[8]; // signature used to locate device.
763 u_int64_t offset; // byte offset to the journal on the device
764 u_int64_t size; // size in bytes of the journal
765 uuid_string_t ext_jnl_uuid;
766 char machine_serial_num[48];
767 char reserved[JIB_RESERVED_SIZE];
768 } __attribute__((aligned(2), packed));
769 typedef struct JournalInfoBlock JournalInfoBlock;
...
Je trancher la question, puisque la construction a donné des avertissements trop et cette erreur et me déconcerte encore un peu ...
Mise à jour II
Pour se débarrasser des mises en garde concernant la cible de déploiement, je le Makefile
modifié avant la compilation:
$ cat Makefile
...
126 MACOSX_DEPLOYMENT_TARGET=10.3 # => 10.6
...
Original Question
Lorsque vous essayez de construire Python 2.6.4 de la source, je rencontre une erreur:
Il semble racine dans Python/mactoolboxglue.c
. Les conseils sont les bienvenus!
Aussi je reçois beaucoup d'avertissements de ce genre:
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for \
Intel with Mac OS X Deployment Target < 10.4 is invalid.
gcc -c -arch ppc -arch i386 -isysroot/-fno-strict-aliasing -DNDEBUG -g \
-fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include \
-DPy_BUILD_CORE -o Objects/structseq.o Objects/structseq.c
In file included from /usr/include/architecture/i386/math.h:626,
from /usr/include/math.h:28,
from Include/pyport.h:235,
from Include/Python.h:58,
from Objects/structseq.c:4:
'/usr/include/AvailabilityMacros.h:108:14: warning: #warning Construire pour \ Intel avec Mac OS X cible de déploiement <10.4 est invalide.» Ces erreurs sont causées par le script Python ./configure définissant MACOSX_DEPLOYMENT_TARGET sur 10.3 par défaut. Voir ma réponse pour savoir comment se débarrasser de ceux-ci. –
Plutôt que d'éditer le makefile, faites 'export MACOSX_DEPLOYMENT_TARGET = 10.6' avant d'exécuter'./Configure'. –