Forums : Plateforme Mozilla

Aller à la discussion :  Plus récente Plus ancienne

# [Réglé] Compiler Xulrunner pour AMD64

Envoyé par : David

Date : 16/02/2006 12:17

Bonjour à tous,

Je viens de faire l'acquisition d'un PC équipé d'un processeur AMD 64 bits, sur lequel j'ai installé une distribution Linux 64 bits (Kubuntu, donc environnement KDE). Je veux y installer Xulrunner 1.8.0.1 (la release stable), mais comme il n'existe pas de version pour linux-AMD64 je me suis dis que j'allais le faire depuis les sources et là c'est le drame...

J'ai récupéré les sources de xulrunner et les aient décompréssées dans /usr/local . Je me suis créé le fichier le .mozconfig suivant:

export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/xulrunner-amd64-qt
ac_add_options --with-qtdir=/usr/lib/qt3
ac_add_options --enable-application=xulrunner
ac_add_options --enable-default-toolkit=qt
ac_add_options --disable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests

qui se trouve donc à /usr/local/mozilla/.mozconfig dans /usr/local/mozilla j'ai lancé la compilation avec la commande "$ sudo make -f client.mk build"

et voilà le résultat attention c'est un peu long:

Adding client.mk options from /usr/local/mozilla/.mozconfig:
   MOZILLA_OFFICIAL=1
   MOZ_CO_PROJECT=xulrunner
   MOZ_OBJDIR=$(TOPSRCDIR)/xulrunner-amd64-qt
make[1]: entrant dans le répertoire « /usr/local/mozilla »
cd /usr/local/mozilla/xulrunner-amd64-qt
/usr/local/mozilla/configure
Adding configure options from /usr/local/mozilla/.mozconfig:
 --with-qtdir=/usr/lib/qt3
 --enable-application=xulrunner
 --enable-default-toolkit=qt
 --disable-optimize
 --disable-debug
 --disable-tests
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for mawk... mawk
checking for nsinstall... no
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for ranlib... ranlib
checking for as... /usr/bin/as
checking for ar... ar
checking for ld... ld
checking for strip... strip
checking for windres... no
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... c++ -E
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for minimum required perl version >= 5.004... 5.008007
checking for full perl installation... yes
checking for doxygen... :
checking for whoami... /usr/bin/whoami
checking for autoconf... /usr/bin/autoconf
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for makedepend... /usr/bin/makedepend
checking for xargs... /usr/bin/xargs
checking for gmake... no
checking for make... /usr/bin/make
checking for X... libraries /usr/X11R6/lib, headers
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking whether ld has archive extraction flags... yes
checking for 64-bit OS... yes
checking for ANSI C header files... yes
checking for working const... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for st_blksize in struct stat... yes
checking for siginfo_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int64... no
checking for uint... yes
checking for uint_t... no
checking for uint16_t... no
checking for uname.domainname... yes
checking for uname.__domainname... no
checking for usable wchar_t (2 bytes, unsigned)... no
checking for compiler -fshort-wchar option... yes
checking for visibility(hidden) attribute... yes
checking for visibility pragma support... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for sys/byteorder.h... no
checking for compat.h... no
checking for getopt.h... yes
checking for sys/bitypes.h... yes
checking for memory.h... yes
checking for unistd.h... yes
checking for gnu/libc-version.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for X11/XKBlib.h... yes
checking for sys/statvfs.h... yes
checking for sys/statfs.h... yes
checking for sys/vfs.h... yes
checking for sys/mount.h... yes
checking for mmintrin.h... yes
checking for new... yes
checking for sys/cdefs.h... yes
checking for gethostbyname_r in -lc_r... no
checking for atan in -lm... yes
checking for dlopen in -ldl... yes
checking for dlfcn.h... yes
checking for socket in -lsocket... no
checking for XDrawLines in -lX11... yes
checking for XextAddDisplay in -lXext... yes
checking for XtFree in -lXt... yes
checking for XineramaIsActive in -lXinerama... yes
checking for X11/extensions/Xinerama.h... yes
checking for XShmCreateImage in -lXext... yes
checking for X11/extensions/XShm.h... yes
checking for XieFloGeometry in -lXIE... no
checking for X11/extensions/XIElib.h... no
checking for freetype-config... /usr/bin/freetype-config
checking for FreeType - version >= 6.1.0... yes
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking whether gcc accepts -pthread... yes
checking whether mmap() sees write()s... yes
checking whether gcc needs -traditional... no
checking for 8-bit clean memcmp... yes
checking for random... yes
checking for strerror... yes
checking for lchown... yes
checking for fchmod... yes
checking for snprintf... yes
checking for statvfs... yes
checking for memmove... yes
checking for rint... yes
checking for stat64... yes
checking for lstat64... yes
checking for flockfile... yes
checking for getpagesize... yes
checking for localtime_r... yes
checking for strtok_r... yes
checking for wcrtomb... yes
checking for mbrtowc... yes
checking for res_ninit()... yes
checking for gnu_get_libc_version()... yes
checking for iconv in -lc... yes
checking for iconv()... yes
checking for iconv() with const input... no
checking for nl_langinfo and CODESET... yes
checking for an implementation of va_copy()... yes
checking for an implementation of __va_copy()... yes
checking whether va_lists can be copied by value... no
checking for C++ exceptions flag... -fno-exceptions
checking for gcc 3.0 ABI... yes
checking for C++ "explicit" keyword... yes
checking for C++ "typename" keyword... yes
checking for modern C++ template specialization syntax support...  yes
checking whether partial template specialization works... yes
checking whether operators must be re-defined for templates derived  from templates... no
checking whether we need to cast a derived template to pass as its base class... no
checking whether the compiler can resolve const ambiguities for templates... yes
checking whether the C++ "using" keyword can change access... yes
checking whether the C++ "using" keyword resolves ambiguity... yes
checking for "std::" namespace... yes
checking whether standard template operator!=() is ambiguous... unambiguous
checking for C++ reinterpret_cast... yes
checking for C++ dynamic_cast to void*... yes
checking whether C++ requires implementation of unused virtual methods... yes
checking for trouble comparing to zero near std::operator!=()... no
checking for LC_MESSAGES... yes
checking for moc... no
configure: error: no acceptable moc preprocessor found
*** Fix above errors and then restart with "make -f client.mk build"
make[1]: *** [configure] Erreur 1
make[1]: quittant le répertoire « /usr/local/mozilla »
make: *** [/usr/local/mozilla/xulrunner-amd64-qt/Makefile] Erreur 2

La question est: c'est quoi ce "moc" qu'il cherche? Une recherche par le gestionnaire de paquets (Adept) me trouve bien un paquet "moc" non-installé mais c'est un player audio, aucun rapport avec notre histoire donc.

Si quelqu'un à une idée ou un paquet xulrunner pré-compilé pour Linux-AMD64 je suis preneur.

Bonne journée.

David

# Re: Compiler Xulrunner pour AMD64

Envoyé par : David

Date : 16/02/2006 16:18

Re-moi,

Je n'en suis pas sûr mais apparement "moc" à un rapport avec Qt, comme xulrunner n'est pas garantie pour l'environnement Qt, j'ai essayé avec GTK2. Voilà mon nouveau .mozconfig:

export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/xulrunner-amd64-gtk
ac_add_options --enable-application=xulrunner
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-optimize
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --with-java-include-path=/usr/local/mozilla/sun-java/stubs/include/

Maintenant la commande "$ sudo make -f client.mk build" va beaucoup, beaucoup plus loin mais crash quand même, en voici les dernières lignes:

/usr/bin/ld: jsapi.o: relocation R_X86_64_PC32 against `memset@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: édition de lien finale en échec: Mauvaise valeur
collect2: ld a retourné 1 code d'état d'exécution
make[4]: *** [libmozjs.so] Erreur 1
make[4]: quittant le répertoire « /usr/local/mozilla/xulrunner-amd64-gtk/js/src »
make[3]: *** [libs] Erreur 2
make[3]: quittant le répertoire « /usr/local/mozilla/xulrunner-amd64-gtk/js »
make[2]: *** [tier_2] Erreur 2
make[2]: quittant le répertoire « /usr/local/mozilla/xulrunner-amd64-gtk »
make[1]: *** [default] Erreur 2
make[1]: quittant le répertoire « /usr/local/mozilla/xulrunner-amd64-gtk »
make: *** [build] Erreur 2

Pour moi ce n'est pas très parlant comme erreur, je rajoute les dernières lignes du fichier config.log créé par ce make:

configure:17642: checking GLIB_CFLAGS
configure:17647: checking GLIB_LIBS
configure:19035: gcc -c -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -pthread -pipe    conftest.c 1>&5
configure: In function 'main':
configure:19029: warning: implicit declaration of function 'exit'
configure:19029: warning: incompatible implicit declaration of built-in function 'exit'

J'ai quand même essayé un "make -C xulrunner-amd64-gtk/xpinstall/packager" mais évidemment il échout.

QQun à une idée?

David

# Re: Compiler Xulrunner pour AMD64

Envoyé par : laurentj

Date : 16/02/2006 16:35

tu devrais exposer ton problème aux developpeurs de moz sur irc irc://irc.mozilla.org/build ou le cas échéant, irc://irc.mozilla.org/developer

Si tu reussi ta compil, tiens nous au courant ! :-)

# Re: Compiler Xulrunner pour AMD64

Envoyé par : David

Date : 16/02/2006 21:51

J'ai trouvé, ça vient d'un bug de gcc4, voir la solution ici: BSBlog

Il faut ajouter:

ac_cv_visibility_pragma=no

au fichier .mozconfig . Bon j'ai plus qu'a attendre la fin de la compilation moi, youpie :-)

Edit: Encore raté! Mais cette fois-çi ça doit venir de Java:

/usr/local/mozilla/extensions/java/xpcom/src/../nsJavaXPTCStubWeakRef.h:59: erreur: ‘jweak’ does not name a type
/usr/local/mozilla/extensions/java/xpcom/src/../nsJavaXPTCStub.h:122: erreur: ‘jweak’ does not name a type
/usr/local/mozilla/extensions/java/xpcom/src/../nsAppFileLocProviderProxy.cpp: In member function ‘virtual nsresult nsAppFileLocProviderProxy::GetFile(const char*, PRBool*, nsIFile**)’:
/usr/local/mozilla/extensions/java/xpcom/src/../nsAppFileLocProviderProxy.cpp:87: erreur: ‘struct JNIEnv_’ has no member named ‘ExceptionCheck’

Bon je continuerai demain...

David

# Re: Compiler Xulrunner pour AMD64

Envoyé par : David

Date : 17/02/2006 18:28

Voilà c'est réglé :-) ! J'ai créé un beau xulrunner-1.8.0.1.en-US.linux-x86_64.tar.gz . Mon dernier problème venait de javaXPCOM qui est compilé par défaut avec xulrunner (voir à ce sujet: devmo ) et je n'ai pas les SDK java ( et je me fiche d'avoir javaxpcom).

Pour info voici mon .mozconfig complet ça peut servir à d'autres:

mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/xulrunner-amd64-gtk
ac_add_options --enable-application=xulrunner
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --disable-javaxpcom
ac_add_options --enable-optimize='-pipe\ -w\ -O2\ -DDEBIAN\ -fno-strict-aliasing'
ac_add_options --enable-svg
ac_cv_visibility_pragma=no

David

Il n'est plus possible de poster des messages dans ce forum.


Copyright © 2003-2013 association xulfr, 2013-2016 Laurent Jouanneau - Informations légales.

Mozilla® est une marque déposée de la fondation Mozilla.
Mozilla.org™, Firefox™, Thunderbird™, Mozilla Suite™ et XUL™ sont des marques de la fondation Mozilla.