Construire Mercurial 1.3.1 sur Ubuntu Linux




build makefile (2)

J'essaye de construire mercurial 1.3.1. J'ai essayé ceci jusqu'ici sur ma machine de Mac OS X et sur une machine virtuelle d'Ubuntu de Linux que je cours.

Je continue d'obtenir des erreurs lors de l'exécution de la marque. Je sais qu'il existe des binaires disponibles pour Linux et Mac, mais je veux créer ma propre copie. J'ai toujours sauté sur le bâtiment et je veux apprendre à le faire.

Mais maintenant, j'ai besoin d'aide. Voici les résultats de l'ensemble du processus de construction de ma machine Ubuntu Linux v9.04 ... L'erreur d' error: Python.h: No such file or directory vers la fin. J'ai inclus tous les résultats au cas où cela aiderait quelqu'un à avoir des problèmes.

[email protected]:~/Desktop/mercurial-1.3.1$ sudo make install
[sudo] password for frank: 
python setup.py  build
running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/mercurial
copying mercurial/dirstate.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/bundlerepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/subrepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/httprepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/__version__.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/changelog.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/repo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/config.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/byterange.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/verify.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/encoding.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/keepalive.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/sshserver.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/fancyopts.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/__init__.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/merge.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/i18n.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/archival.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/match.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/mail.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/help.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/win32.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/posix.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/repair.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/dispatch.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/error.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/templatefilters.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/localrepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/sshrepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/node.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/templater.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/streamclone.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/context.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/strutil.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/ignore.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/hook.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/mdiff.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/ui.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/lsprofcalltree.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/transaction.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/commands.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/windows.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/revlog.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/store.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/lock.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/changegroup.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/lsprof.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/manifest.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/url.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/util.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/demandimport.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/graphmod.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/statichttprepo.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/cmdutil.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/extensions.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/filemerge.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/hg.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/filelog.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/copies.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/hbisect.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/patch.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/ancestor.py -> build/lib.linux-i686-2.6/mercurial
copying mercurial/simplemerge.py -> build/lib.linux-i686-2.6/mercurial
creating build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/webutil.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/request.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/wsgicgi.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/protocol.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/server.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/__init__.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/common.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/hgwebdir_mod.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/webcommands.py -> build/lib.linux-i686-2.6/mercurial/hgweb
copying mercurial/hgweb/hgweb_mod.py -> build/lib.linux-i686-2.6/mercurial/hgweb
creating build/lib.linux-i686-2.6/hgext
copying hgext/pager.py -> build/lib.linux-i686-2.6/hgext
copying hgext/purge.py -> build/lib.linux-i686-2.6/hgext
copying hgext/graphlog.py -> build/lib.linux-i686-2.6/hgext
copying hgext/win32text.py -> build/lib.linux-i686-2.6/hgext
copying hgext/gpg.py -> build/lib.linux-i686-2.6/hgext
copying hgext/hgk.py -> build/lib.linux-i686-2.6/hgext
copying hgext/color.py -> build/lib.linux-i686-2.6/hgext
copying hgext/bugzilla.py -> build/lib.linux-i686-2.6/hgext
copying hgext/bookmarks.py -> build/lib.linux-i686-2.6/hgext
copying hgext/__init__.py -> build/lib.linux-i686-2.6/hgext
copying hgext/notify.py -> build/lib.linux-i686-2.6/hgext
copying hgext/record.py -> build/lib.linux-i686-2.6/hgext
copying hgext/interhg.py -> build/lib.linux-i686-2.6/hgext
copying hgext/rebase.py -> build/lib.linux-i686-2.6/hgext
copying hgext/churn.py -> build/lib.linux-i686-2.6/hgext
copying hgext/keyword.py -> build/lib.linux-i686-2.6/hgext
copying hgext/mq.py -> build/lib.linux-i686-2.6/hgext
copying hgext/transplant.py -> build/lib.linux-i686-2.6/hgext
copying hgext/acl.py -> build/lib.linux-i686-2.6/hgext
copying hgext/children.py -> build/lib.linux-i686-2.6/hgext
copying hgext/fetch.py -> build/lib.linux-i686-2.6/hgext
copying hgext/extdiff.py -> build/lib.linux-i686-2.6/hgext
copying hgext/win32mbcs.py -> build/lib.linux-i686-2.6/hgext
copying hgext/share.py -> build/lib.linux-i686-2.6/hgext
copying hgext/parentrevspec.py -> build/lib.linux-i686-2.6/hgext
copying hgext/hgcia.py -> build/lib.linux-i686-2.6/hgext
copying hgext/patchbomb.py -> build/lib.linux-i686-2.6/hgext
creating build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/bzr.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/convcmd.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/gnuarch.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/cvsps.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/__init__.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/git.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/p4.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/subversion.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/transport.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/common.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/hg.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/monotone.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/cvs.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/filemap.py -> build/lib.linux-i686-2.6/hgext/convert
copying hgext/convert/darcs.py -> build/lib.linux-i686-2.6/hgext/convert
creating build/lib.linux-i686-2.6/hgext/highlight
copying hgext/highlight/highlight.py -> build/lib.linux-i686-2.6/hgext/highlight
copying hgext/highlight/__init__.py -> build/lib.linux-i686-2.6/hgext/highlight
creating build/lib.linux-i686-2.6/hgext/zeroconf
copying hgext/zeroconf/__init__.py -> build/lib.linux-i686-2.6/hgext/zeroconf
copying hgext/zeroconf/Zeroconf.py -> build/lib.linux-i686-2.6/hgext/zeroconf
creating build/lib.linux-i686-2.6/hgext/inotify
copying hgext/inotify/server.py -> build/lib.linux-i686-2.6/hgext/inotify
copying hgext/inotify/__init__.py -> build/lib.linux-i686-2.6/hgext/inotify
copying hgext/inotify/common.py -> build/lib.linux-i686-2.6/hgext/inotify
copying hgext/inotify/client.py -> build/lib.linux-i686-2.6/hgext/inotify
creating build/lib.linux-i686-2.6/hgext/inotify/linux
copying hgext/inotify/linux/__init__.py -> build/lib.linux-i686-2.6/hgext/inotify/linux
copying hgext/inotify/linux/watcher.py -> build/lib.linux-i686-2.6/hgext/inotify/linux
running build_ext
building 'mercurial.base85' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/mercurial
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c mercurial/base85.c -o build/temp.linux-i686-2.6/mercurial/base85.o
mercurial/base85.c:12:20: error: Python.h: No such file or directory
mercurial/base85.c: In function ‘b85prep’:
mercurial/base85.c:23: warning: implicit declaration of function ‘memset’
mercurial/base85.c:23: warning: incompatible implicit declaration of built-in function ‘memset’
mercurial/base85.c: At top level:
mercurial/base85.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mercurial/base85.c:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mercurial/base85.c:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘methods’
mercurial/base85.c:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initbase85’
error: command 'gcc' failed with exit status 1
make: *** [build] Error 1

Assurez-vous que le paquetage python-dev est installé:

apt-get install python-dev

Je sais que vous voulez construire à partir de la source, mais pour OS X (et ailleurs) vous pouvez simplement utiliser easy_install de Python (l'obtenir avec Setuptools ):

sudo easy_install mercurial

puisque Mercurial est écrit en Python. Cela trouve la dernière version (1.3.1 au moment de l'écriture) et (je n'utilise pas Macports ou Fink) l'installe bien sans aucun problème à:

/Library/Frameworks/Python.framework/Versions/2.6/bin/

Je cours Python 2.6 (sur Mac OS 10.4.11) ainsi ceci contourne également le paquet d'installation de Mercurial OS X (seulement à 1.2.1 en date du 25 juillet 2009) se plaignant d'avoir besoin de Python 2.5.





build-error