トップ «前の日記(2011年10月28日) 最新 次の日記(2011年11月06日)» 編集

Masa's blog

検索キーワード:

2011年10月30日 firefox-1.0.8 on ARMedslack (挫折) [長年日記]

_ firefox-1.0.8 on ARMedslack (挫折)

ARMedslack on zaurus(SL-C860)でブラウザとなるとw3mdilloあたりが快適に使える限界で、軽量と言われるaroramidoriでも、もはや重すぎて常用するには耐えがたい状況だ。

そこで、あえて古いfirefox-1.0.x系をgtk+-1.2.xと組み合わせてビルドし、ビットマップフォントベースで利用してみようと考えた。

gtk+-1.2.10関係のインストール

glib-1.2.10
  • tar xvzf glib-1.2.10.tar.gz
  • cd glib-1.2.10
  • patch -p0 <glib-1.2.10.diff
*** ./gstrfuncs.c.ORG   2011-10-21 20:03:01.000000000 +0900
--- ./gstrfuncs.c       2011-10-21 21:23:44.000000000 +0900
***************
*** 867,874 ****
                    /* beware of positional parameters
                     */
                  case '$':
!                   g_warning (G_GNUC_PRETTY_FUNCTION
!                              "(): unable to handle positional parameters (%%n$)");
                    len += 1024; /* try adding some safety padding */
                    break;

--- 867,874 ----
                    /* beware of positional parameters
                     */
                  case '$':
!                   g_warning (G_GNUC_PRETTY_FUNCTION);
!                   g_warning ("(): unable to handle positional parameters (%%n$)");
                    len += 1024; /* try adding some safety padding */
                    break;

***************
*** 1034,1041 ****
                    /*          n   .   dddddddddddddddddddddddd   E   +-  eeee */
                    conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
                    if (spec.mod_extra_long)
!                     g_warning (G_GNUC_PRETTY_FUNCTION
!                                "(): unable to handle long double, collecting double only");
  #ifdef HAVE_LONG_DOUBLE
  #error need to implement special handling for long double
  #endif
--- 1034,1041 ----
                    /*          n   .   dddddddddddddddddddddddd   E   +-  eeee */
                    conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
                    if (spec.mod_extra_long)
!                     g_warning (G_GNUC_PRETTY_FUNCTION);
!                     g_warning ("(): unable to handle long double, collecting double only");
  #ifdef HAVE_LONG_DOUBLE
  #error need to implement special handling for long double
  #endif
***************
*** 1077,1084 ****
                    conv_done = TRUE;
                    if (spec.mod_long)
                      {
!                       g_warning (G_GNUC_PRETTY_FUNCTION
!                                  "(): unable to handle wide char strings");
                        len += 1024; /* try adding some safety padding */
                      }
                    break;
--- 1077,1084 ----
                    conv_done = TRUE;
                    if (spec.mod_long)
                      {
!                       g_warning (G_GNUC_PRETTY_FUNCTION);
!                       g_warning ("(): unable to handle wide char strings");
                        len += 1024; /* try adding some safety padding */
                      }
                    break;
***************
*** 1108,1115 ****
                    conv_len += format - spec_start;
                    break;
                  default:
!                   g_warning (G_GNUC_PRETTY_FUNCTION
!                              "(): unable to handle `%c' while parsing format",
                               c);
                    break;
                  }
--- 1108,1115 ----
                    conv_len += format - spec_start;
                    break;
                  default:
!                   g_warning (G_GNUC_PRETTY_FUNCTION);
!                   g_warning ("(): unable to handle `%c' while parsing format",
                               c);
                    break;
                  }
  • ./configure --prefix=/usr/local/gtk1
  • make
  • make install
libIDL-0.6.8
  • tar xvzf libIDL-0.6.8.tar.gz
  • cd libIDL-0.6.8
  • ./configure --prefix=/usr/local/gtk1
  • make
  • make install
gtk+-1.2.10
  • tar xvzf gtk+-1.2.10.tar.gz
  • cd gtk+-1.2.10
  • ./configure --prefix=/usr/local/gtk1 --with-locale=ja_JP.eucJP
  • make
  • make install

firefox-1.0.8 ビルド

  • tar xvjf firefox-1.0.8-source.tar.bz2
  • cd mozilla
  • patch -p0 <firefox-1.0.8.diff
*** ./security/coreconf/rules.mk.ORG    2011-10-23 09:31:09.000000000 +0900
--- ./security/coreconf/rules.mk        2011-10-23 10:25:19.000000000 +0900
***************
*** 881,915 ****

  ifneq (,$(filter-out OpenVMS OS2 WIN%,$(OS_TARGET)))
  # Can't use sed because of its 4000-char line length limit, so resort to perl
! .DEFAULT:
!       @perl -e '                                                            \
            open(MD, "< $(DEPENDENCIES)");                                    \
            while (<MD>) {                                                    \
!               if (m@ \.*/*$< @) {                                           \
!                   $$found = 1;                                              \
!                   last;                                                     \
!               }                                                             \
            }                                                                 \
            if ($$found) {                                                    \
!               print "Removing stale dependency $< from $(DEPENDENCIES)\n";  \
!               seek(MD, 0, 0);                                               \
!               $$tmpname = "$(OBJDIR)/fix.md" . $$$$;                        \
!               open(TMD, "> " . $$tmpname);                                  \
!               while (<MD>) {                                                \
!                   s@ \.*/*$< @ @;                                           \
!                   if (!print TMD "$$_") {                                   \
!                       unlink(($$tmpname));                                  \
!                       exit(1);                                              \
!                   }                                                         \
!               }                                                             \
!               close(TMD);                                                   \
!               if (!rename($$tmpname, "$(DEPENDENCIES)")) {                  \
!                   unlink(($$tmpname));                                      \
!               }                                                             \
            } elsif ("$<" ne "$(DEPENDENCIES)") {                             \
!               print "$(MAKE): *** No rule to make target $<.  Stop.\n";     \
!               exit(1);                                                      \
!           }'
  endif

  #############################################################################
--- 881,917 ----

  ifneq (,$(filter-out OpenVMS OS2 WIN%,$(OS_TARGET)))
  # Can't use sed because of its 4000-char line length limit, so resort to perl
! PERL_DEPENDENCIES_PROGRAM =                                                   \
            open(MD, "< $(DEPENDENCIES)");                                    \
            while (<MD>) {                                                    \
!               if (m@ \.*/*$< @) {                                           \
!                   $$found = 1;                                              \
!                   last;                                                     \
!               }                                                             \
            }                                                                 \
            if ($$found) {                                                    \
!               print "Removing stale dependency $< from $(DEPENDENCIES)\n";  \
!               seek(MD, 0, 0);                                               \
!               $$tmpname = "$(OBJDIR)/fix.md" . $$$$;                        \
!               open(TMD, "> " . $$tmpname);                                  \
!               while (<MD>) {                                                \
!                   s@ \.*/*$< @ @;                                           \
!                   if (!print TMD "$$_") {                                   \
!                       unlink(($$tmpname));                                  \
!                       exit(1);                                              \
!                   }                                                         \
!               }                                                             \
!               close(TMD);                                                   \
!               if (!rename($$tmpname, "$(DEPENDENCIES)")) {                  \
!                   unlink(($$tmpname));                                      \
!               }                                                             \
            } elsif ("$<" ne "$(DEPENDENCIES)") {                             \
!               print "$(MAKE): *** No rule to make target $<.  Stop.\n";     \
!               exit(1);                                                      \
!           }
!
! .DEFAULT:
!           @perl -e '$(PERL_DEPENDENCIES_PROGRAM)'
  endif

  #############################################################################
*** ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp.ORG   2011-10-22 09:53:50.000000000 +0900
--- ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp       2011-10-22 09:54:47.000000000 +0900
***************
*** 45,51 ****
  #endif

  /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol.  */
! static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");

  static nsresult
  PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
--- 45,51 ----
  #endif

  /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol.  */
! static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch") __attribute__((used));

  static nsresult
  PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
*** ./nsprpub/pr/src/misc/prdtoa.c.ORG  2011-10-24 19:13:16.000000000 +0900
--- ./nsprpub/pr/src/misc/prdtoa.c      2011-10-24 19:17:07.000000000 +0900
***************
*** 132,139 ****
   *    is not strictly legal and can cause trouble with aggressively
   *    optimizing compilers (e.g., gcc 2.95.1 under -O2).
   */
! #if defined(__arm) || defined(__arm__) || defined(__arm26__) \
!     || defined(__arm32__)
  #define IEEE_ARM
  #elif defined(IS_LITTLE_ENDIAN)
  #define IEEE_8087
--- 132,139 ----
   *    is not strictly legal and can cause trouble with aggressively
   *    optimizing compilers (e.g., gcc 2.95.1 under -O2).
   */
! #if (defined(__arm) || defined(__arm__) || defined(__arm26__) \
!     || defined(__arm32__)) && !defined(__ARM_EABI__) && !defined(__ARMEB__)
  #define IEEE_ARM
  #elif defined(IS_LITTLE_ENDIAN)
  #define IEEE_8087
*** ./nsprpub/pr/include/md/_linux.h.ORG        2011-10-24 19:17:40.000000000 +0900
--- ./nsprpub/pr/include/md/_linux.h    2011-10-24 19:22:55.000000000 +0900
***************
*** 285,291 ****
  #error "Linux/MIPS pre-glibc2 not supported yet"
  #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */

! #elif defined(__arm__)
  /* ARM/Linux */
  #if defined(__GLIBC__) && __GLIBC__ >= 2
  #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
--- 285,291 ----
  #error "Linux/MIPS pre-glibc2 not supported yet"
  #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */

! #elif defined(__arm__) && !defined(__ARM_EABI__)
  /* ARM/Linux */
  #if defined(__GLIBC__) && __GLIBC__ >= 2
  #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
***************
*** 295,300 ****
--- 295,312 ----
  #define _MD_SP_TYPE __ptr_t
  #else
  #error "ARM/Linux pre-glibc2 not supported yet"
+ #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+
+ #elif defined(__arm__) && defined(__ARM_EABI__)
+ /* ARM/Linux */
+ #if defined(__GLIBC__) && __GLIBC__ >= 2
+ #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
+ #define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
+ #define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
+ #define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
+ #define _MD_SP_TYPE __ptr_t
+ #else
+ #error "ARM/Linux pre-glibc2 not supported yet"
  #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */

  #else
*** ./toolkit/xre/nsAppRunner.cpp.ORG   2011-10-25 12:01:00.000000000 +0900
--- ./toolkit/xre/nsAppRunner.cpp       2011-10-25 12:01:16.000000000 +0900
***************
*** 1162,1168 ****
      return NS_ERROR_FAILURE;

    char *exePath = info.name;
! #elif
  #error Oops, you need platform-specific code here
  #endif

--- 1162,1168 ----
      return NS_ERROR_FAILURE;

    char *exePath = info.name;
! #else
  #error Oops, you need platform-specific code here
  #endif

*** toolkit/xre/nsXREDirProvider.cpp.ORG        2011-10-25 12:37:20.000000000 +0900
--- toolkit/xre/nsXREDirProvider.cpp    2011-10-25 12:37:56.000000000 +0900
***************
*** 181,187 ****

    *p = 0;
    return NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE, getter_AddRefs(mAppDir));
! #elif
  #error Oops, you need platform-specific code here
  #endif
  }
--- 181,187 ----

    *p = 0;
    return NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE, getter_AddRefs(mAppDir));
! #else
  #error Oops, you need platform-specific code here
  #endif
  }
  • vi .mozconfig
. $topsrcdir/browser/config/mozconfig
##ac_add_options --disable-debug
ac_add_options --enable-debug
ac_add_options --enable-optimize
ac_add_options --enable-default-toolkit=gtk
ac_add_options --disable-xft
ac_add_options --disable-freetype2

ac_add_options --with-gtk-prefix=/usr/local/gtk1
ac_add_options --with-glib-prefix=/usr/local/gtk1
ac_add_options --with-libIDL-prefix=/usr/local/gtk1

#ac_add_options --disable-freetypetest
#ac_add_options --disable-gtktest
#ac_add_options --disable-mailnews
#ac_add_options --disable-ldap
#ac_add_options --disable-postscript
#ac_add_options --disable-xprint
#ac_add_options --disable-gnomevfs
#ac_add_options --disable-jsd
#ac_add_options --disable-plugins
#ac_add_options --disable-oji
#ac_add_options --disable-view-source
#ac_add_options --disable-accessibility
#ac_add_options --disable-xpfe-components
##MUST_DEL_ac_add_options --disable-xpinstall
#ac_add_options --disable-jsloader
#ac_add_options --disable-composer
#ac_add_options --disable-mathml
#ac_add_options --disable-installer
#ac_add_options --disable-activex
#ac_add_options --disable-activex-scripting
#ac_add_options --disable-tests
#ac_add_options --disable-logging
#ac_add_options --disable-pedantic
#ac_add_options --disable-auto-deps
#ac_add_options --disable-md
#ac_add_options --disable-static-component-loader
#ac_add_options --disable-libIDLtest
#ac_add_options --disable-glibtest
##MUST_DEL_ac_add_options --disable-xul
#ac_add_options --disable-profilesharing
#ac_add_options --disable-profilelocking
#ac_add_options --disable-necko-disk-cache
  • make -f client.mk build
  • cd xpinstall/packager
  • make MOZILLA_BIN=../../dist/bin/firefox

結果

惨敗。

なんのメッセージも吐かずに、exit code 1で終了。