*** config.sub.ORG Sat Jan 29 20:00:02 2005 --- config.sub Sat Jan 29 20:01:23 2005 *************** *** 212,218 **** | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 212,218 ---- | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* | hpcmips-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS.
*** config.sub.ORG Sat Jan 29 20:36:10 2005 --- config.sub Sat Jan 29 20:36:49 2005 *************** *** 212,218 **** | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 212,218 ---- | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* | hpcmips-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS.
*** configure.ORG Wed Feb 23 13:05:21 2005 --- configure Wed Feb 23 13:46:31 2005 *************** *** 76,81 **** --- 76,83 ---- --disable-glibtest Do not try to compile and run a test GLIB program" ac_help="$ac_help --with-x use the X Window System" + ac_help="$ac_help + --with-xlocale force use X_LOCALE" # Initialize some variables set by options. # The variables have the same names as the options, with *************** *** 427,432 **** --- 429,437 ---- # Obsolete; use --with-x. with_x=yes ;; + --with-xlocale) + with_xlocale=yes ;; + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; *************** *** 5845,5850 **** --- 5850,5859 ---- need_x_locale=yes fi rm -fr conftest* + fi + + if test "x$with_xlocale" = xyes; then + need_x_locale=yes fi echo "$ac_t""$need_x_locale" 1>&6
*** config.sub.ORG Sun Jan 30 01:04:19 2005 --- config.sub Sun Jan 30 01:05:10 2005 *************** *** 207,213 **** | mipstx39-* | mipstx39el-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 207,213 ---- | mipstx39-* | mipstx39el-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | hpcmips-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS.
. $topsrcdir/browser/config/mozconfig ac_add_options --disable-debug ac_add_options --enable-optimize
*** ./configure.in.ORG Sun Jan 30 11:32:59 2005 --- ./configure.in Sun Jan 30 12:38:11 2005 *************** *** 1115,1120 **** --- 1115,1124 ---- CFLAGS="$CFLAGS -Wa,-xgot" CXXFLAGS="$CXXFLAGS -Wa,-xgot" ;; + hpcmips*) + CFLAGS="$CFLAGS -Wa,-xgot" + CXXFLAGS="$CXXFLAGS -Wa,-xgot" + ;; esac ;; *************** *** 1288,1293 **** --- 1292,1300 ---- AC_DEFINE(_ALPHA_) ;; mips-*) + AC_DEFINE(_MIPS_) + ;; + hpcmips-*) AC_DEFINE(_MIPS_) ;; *) *** ./configure.ORG Tue Feb 1 12:29:55 2005 --- ./configure Sun Jan 30 12:37:19 2005 *************** *** 5360,5365 **** --- 5360,5369 ---- CFLAGS="$CFLAGS -Wa,-xgot" CXXFLAGS="$CXXFLAGS -Wa,-xgot" ;; + hpcmips*) + CFLAGS="$CFLAGS -Wa,-xgot" + CXXFLAGS="$CXXFLAGS -Wa,-xgot" + ;; esac ;; *************** *** 5571,5576 **** --- 5575,5586 ---- ;; mips-*) + cat >> confdefs.h <<\EOF + #define _MIPS_ 1 + EOF + + ;; + hpcmips-*) cat >> confdefs.h <<\EOF #define _MIPS_ 1 EOF
gmake[1]: Entering directory `/home/m-ito/tmp/mozilla/xpcom/string/src' nsObsoleteAStringThunk.cpp c++ -o nsObsoleteAStringThunk.o -c -DOSTYPE=\"NetBSD1.6\" -DOSARCH=\"NetBSD\" -D_IMPL_NS_COM -I../../../dist/include/xpcom -I../../../dist/include/string -I../../../dist/include -I/home/m-ito/tmp/mozilla/dist/include/nspr -I/usr/X11R6/include -fPIC -DPIC -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -Dunix -pipe -DNDEBUG -DTRIMMED -O -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsObsoleteAStringThunk.pp nsObsoleteAStringThunk.cpp {standard input}: Assembler messages: {standard input}:2218: Fatal error: {standard input}:997: bad return from bfd_install_relocation gmake[1]: *** [nsObsoleteAStringThunk.o] Error 1 gmake[1]: Leaving directory `/home/m-ito/tmp/mozilla/xpcom/string/src' make: *** [all] Error 2さて予期していた事ですが、やはりコンパイルエラーが発生しました。しかもアセンブラがエラーで 終了しております。「bad return from bfd_install_relocation」というキーワードで検索してみると、 なんやらmipsアーキテクチャ版g++(2.95.3)では-fPICオプションを指定すると、switch-case文をアセン ブラに落す段階でバグってるようです。
g++のバージョンをアップすると解決するかもしれないのですが、確信がなかったので、ソースをゴリゴリ 修正することにしました...。
まず-vオプションを追加して対象ソースを手動でコンパイルし、c++,asの 起動コマンド&オプションを確認します。その後、c++の-cオプションを-Sオプションに変更して、アセン ブラのソースを生成させて、そのアセンブラソースを手動でアセンブルし、エラーの発生したアセンブラ ソースの箇所から相当するc++ソースの箇所を推定し、その近辺の怪しそうなswitch-case文をif文に修正 していきました。
*** ./xpcom/string/src/nsTObsoleteAStringThunk.cpp.ORG Mon Jan 31 11:45:09 2005 --- ./xpcom/string/src/nsTObsoleteAStringThunk.cpp Mon Jan 31 12:29:24 2005 *************** *** 191,196 **** --- 191,206 ---- virtual const char_type *GetReadableFragment(const_fragment_type& frag, nsFragmentRequest which, PRUint32 offset) const { const substring_type* s = concrete_self(); + + #if defined(MIPSEL) + if (which == kFirstFragment || which == kLastFragment || which == kFragmentAt){ + frag.mStart = s->Data(); + frag.mEnd = frag.mStart + s->Length(); + return frag.mStart + offset; + }else{ + return 0; + } + #else switch (which) { case kFirstFragment: *************** *** 204,214 **** --- 214,237 ---- default: return 0; } + #endif } virtual char_type *GetWritableFragment(fragment_type& frag, nsFragmentRequest which, PRUint32 offset) { substring_type* s = concrete_self(); + + #if defined(MIPSEL) + if (which == kFirstFragment || which == kLastFragment || which == kFragmentAt){ + char_type* start; + s->BeginWriting(start); + frag.mStart = start; + frag.mEnd = start + s->Length(); + return frag.mStart + offset; + }else{ + return 0; + } + #else switch (which) { case kFirstFragment: *************** *** 224,229 **** --- 247,253 ---- default: return 0; } + #endif } }; *** ./htmlparser/src/COtherElements.h.ORG Tue Feb 1 10:21:29 2005 --- ./htmlparser/src/COtherElements.h Tue Feb 1 12:23:43 2005 *************** *** 1813,1818 **** --- 1813,1881 ---- nsIHTMLContentSink* aSink) { nsresult result=NS_OK; + #if defined(MIPSEL) + if (aTag == eHTMLTag_doctypeDecl){ + result=HandleDoctypeDecl(aNode,aTag,aContext,aSink); + }else if (aTag == eHTMLTag_frameset){ + result=aSink->OpenFrameset(*aNode); + result=OpenContext(aNode,aTag,aContext,aSink); + aContext->mFlags.mHadFrameset=PR_TRUE; + }else if (aTag == eHTMLTag_base || //nothing to do for these empty tags... + aTag == eHTMLTag_isindex || + aTag == eHTMLTag_link || + aTag == eHTMLTag_meta){ + { + CElement* theHead=GetElement(eHTMLTag_head); + if(theHead) { + result=theHead->OpenContext(aNode,aTag,aContext,aSink); + if(NS_SUCCEEDED(result)) { + result=aSink->AddLeaf(*aNode); + if(NS_SUCCEEDED(result)) { + result=theHead->CloseContext(aNode,aTag,aContext,aSink); + } + } + } + } + }else if (aTag == eHTMLTag_object){ + { + CElement* theHead=GetElement(eHTMLTag_head); + if(theHead) { + result=theHead->OpenContext(aNode,aTag,aContext,aSink); + if(NS_SUCCEEDED(result)) { + result=OpenContainerInContext(aNode,aTag,aContext,aSink); + } + } + } + }else if (aTag == eHTMLTag_script || + aTag == eHTMLTag_style || + aTag == eHTMLTag_title){ + result=OpenContext(aNode,aTag,aContext,aSink); //force the title onto the context stack + }else if (aTag == eHTMLTag_newline || + aTag == eHTMLTag_whitespace || + aTag == eHTMLTag_comment){ + /* do nothing */; + }else{ + CElement* theBody=GetElement(eHTMLTag_body); + if(theBody) { + CElement *theChildElement=GetElement(aTag); + if(theBody->CanContain(theChildElement,aContext)) { + //let's auto open the body + + CToken* theToken=(CStartToken*)aContext->mTokenAllocator->CreateTokenOfType(eToken_start,eHTMLTag_body); + nsCParserNode* theNode=aContext->mNodeAllocator->CreateNode(theToken, 0); + + result=theBody->HandleStartToken(theNode,eHTMLTag_body,aContext,aSink); + + if(NS_SUCCEEDED(result)) { + if(eHTMLTag_body==aContext->Last()) { + result=theBody->HandleStartToken(aNode,aTag,aContext,aSink); + } + } + } + } + //for now, let's drop other elements onto the floor. + } + #else switch(aTag) { case eHTMLTag_doctypeDecl: result=HandleDoctypeDecl(aNode,aTag,aContext,aSink); *************** *** 1888,1893 **** --- 1951,1957 ---- //for now, let's drop other elements onto the floor. break; }//switch + #endif return result; } *** ./content/base/src/nsRuleNode.cpp.ORG Tue Feb 1 16:43:28 2005 --- ./content/base/src/nsRuleNode.cpp Tue Feb 1 16:49:31 2005 *************** *** 884,889 **** --- 884,947 ---- *prop_end = prop + structData->nprops; prop != prop_end; ++prop) + #if defined(MIPSEL) + if (prop->type == eCSSType_Value){ + { + ++total; + const nsCSSValue& value = ValueAtOffset(aRuleDataStruct, prop->offset); + if (eCSSUnit_Null != value.GetUnit()) { + ++specified; + if (eCSSUnit_Inherit == value.GetUnit()) { + ++inherited; + } + } + } + }else if (prop->type == eCSSType_Rect){ + total += 4; + ExamineRectProperties(RectAtOffset(aRuleDataStruct, prop->offset), + specified, inherited); + }else if (prop->type == eCSSType_ValueList){ + { + ++total; + const nsCSSValueList* valueList = + ValueListAtOffset(aRuleDataStruct, prop->offset); + if (valueList) { + ++specified; + if (eCSSUnit_Inherit == valueList->mValue.GetUnit()) { + ++inherited; + } + } + } + }else if (prop->type == eCSSType_CounterData){ + { + ++total; + const nsCSSCounterData* counterData = + CounterDataAtOffset(aRuleDataStruct, prop->offset); + if (counterData) { + ++specified; + if (eCSSUnit_Inherit == counterData->mCounter.GetUnit()) { + ++inherited; + } + } + } + }else if (prop->type == eCSSType_Quotes){ + { + ++total; + const nsCSSQuotes* quotes = + QuotesAtOffset(aRuleDataStruct, prop->offset); + if (quotes) { + ++specified; + if (eCSSUnit_Inherit == quotes->mOpen.GetUnit()) { + ++inherited; + } + } + } + }else if (prop->type == eCSSType_Shadow){ + NS_NOTYETIMPLEMENTED("nsCSSShadow not yet transferred to structs"); + }else{ + NS_NOTREACHED("unknown type"); + } + #else switch (prop->type) { case eCSSType_Value: *************** *** 956,961 **** --- 1014,1020 ---- break; } + #endif #if 0 printf("CheckSpecifiedProperties: SID=%d total=%d spec=%d inh=%d chei=%s.\n", *** ./content/html/style/src/nsROCSSPrimitiveValue.h.ORG Tue Feb 1 20:59:39 2005 --- ./content/html/style/src/nsROCSSPrimitiveValue.h Tue Feb 1 21:15:03 2005 *************** *** 191,196 **** --- 191,214 ---- void Reset(void) { + #if defined(MIPSEL) + if (mType == CSS_IDENT){ + NS_ASSERTION(mValue.mAtom, "Null atom should never happen"); + NS_RELEASE(mValue.mAtom); + }else if (mType == CSS_STRING){ + NS_ASSERTION(mValue.mString, "Null string should never happen"); + nsMemory::Free(mValue.mString); + mValue.mString = nsnull; + }else if (mType == CSS_URI){ + NS_IF_RELEASE(mValue.mURI); + }else if (mType == CSS_RECT){ + NS_ASSERTION(mValue.mRect, "Null Rect should never happen"); + NS_RELEASE(mValue.mRect); + }else if (mType == CSS_RGBCOLOR){ + NS_ASSERTION(mValue.mColor, "Null RGBColor should never happen"); + NS_RELEASE(mValue.mColor); + } + #else switch (mType) { case CSS_IDENT: NS_ASSERTION(mValue.mAtom, "Null atom should never happen"); *************** *** 213,218 **** --- 231,237 ---- NS_RELEASE(mValue.mColor); break; } + #endif } private: *** ./embedding/components/commandhandler/src/nsCommandParams.h.ORG Wed Feb 2 11:10:46 2005 --- ./embedding/components/commandhandler/src/nsCommandParams.h Wed Feb 2 11:40:39 2005 *************** *** 125,130 **** --- 125,149 ---- void Reset(PRUint8 inNewType) { + #if defined(MIPSEL) + if (mEntryType == eNoType){ + /* do nothing */; + }else if (mEntryType == eBooleanType){ + mData.mBoolean = PR_FALSE; + }else if (mEntryType == eLongType){ + mData.mLong = 0; + }else if (mEntryType == eDoubleType){ + mData.mDouble = 0.0; + }else if (mEntryType == eWStringType){ + delete mData.mString; mData.mString = nsnull; + }else if (mEntryType == eISupportsType){ + mISupports = nsnull; // clear the nsCOMPtr + }else if (mEntryType == eStringType){ + delete mData.mCString; mData.mCString = nsnull; + }else{ + NS_ASSERTION(0, "Unknown type"); + } + #else switch (mEntryType) { case eNoType: break; *************** *** 137,142 **** --- 156,162 ---- default: NS_ASSERTION(0, "Unknown type"); } + #endif mEntryType = inNewType; }そして、ビルドに成功(^_^)/!。 ちなみに通しでビルドすると31時間ほどかかりました(^^;。
*** ./xpinstall/packager/Makefile.in.ORG Fri Feb 4 13:08:09 2005 --- ./xpinstall/packager/Makefile.in Fri Feb 4 14:05:23 2005 *************** *** 87,93 **** TAR_CREATE_FLAGS = -cvLf endif ! CREATE_FINAL_TAR = tar -c --owner=0 --group=0 --numeric-owner --mode="go-w" -f ifeq ($(MOZ_PKG_FORMAT),TAR) PKG_SUFFIX = .tar --- 87,94 ---- TAR_CREATE_FLAGS = -cvLf endif ! #CREATE_FINAL_TAR = tar -c --owner=0 --group=0 --numeric-owner --mode="go-w" -f ! CREATE_FINAL_TAR = tar -c -f ifeq ($(MOZ_PKG_FORMAT),TAR) PKG_SUFFIX = .tar
1823 NS_TIMELINE_ENTER("appShellService->CreateHiddenWindow"); 1824 rv = appShellService->CreateHiddenWindow(); 1825 NS_TIMELINE_LEAVE("appShellService->CreateHiddenWindow"); 1826 NS_ENSURE_SUCCESS(rv, 1); 1827 1828 // Extension Compatibility Checking and Startup 1829 nsCOMPtrプリプロセッサによる展開後のソースでは以下のようになっている。em(do_GetService("@mozilla.org/extensions/manager;1")); 1830 NS_ENSURE_TRUE(em, 1); <-- ここで終了 1831 1832 if (CheckArg("install-global-extension") || 1833 CheckArg("install-global-theme") || CheckArg("list-global-items") || 1834 CheckArg("lock-item") || CheckArg("unlock-item")) { 1835 // Do the required processing and then shut down. 1836 em->HandleCommandLineArgs(); 1837 return 0; 1838 }
nsCOMPtr1829行目で生成しようとしているem(ポインタオブジェクト?)が生成できていない?という ことなのだろうが、どう対処したらいいのか判らない...。em(do_GetService("@mozilla.org/extensions/manager;1")); do { if (( !( em ) ) ) { ; return 1 ; } } while (0) ; <-- ここで終了 if (CheckArg("install-global-extension") || CheckArg("install-global-theme") || CheckArg("list-global-items") || CheckArg("lock-item") || CheckArg("unlock-item")) {
その後、minimoプロジェクト なるものを教えてもらう。いろいろ調べてみると、なんと手元のソースツリーのなかに ./embedding/minimo/mozconfigというコンフィグファイルがあり、省資源に徹したビルドが 出来そうな気配が漂っている。
現在(2005/02/06)デバッグ敢行中。とりあえず、許容範囲で機能を切り詰めた コンフィグ設定を模索中。
export MOZ_PHOENIX=1 mk_add_options MOZ_PHOENIX=1 ac_add_options --disable-ldap ac_add_options --disable-mailnews ac_add_options --enable-extensions=cookie,xmlextras ac_add_options --enable-crypto ac_add_options --disable-composer ac_add_options --enable-single-profile ac_add_options --disable-profilesharing ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --enable-default-toolkit=gtk ac_add_options --disable-xft ac_add_options --disable-freetype2 ac_add_options --disable-profilesharing ac_add_options --disable-profilelocking ac_add_options --enable-single-profile ac_add_options --disable-accessibility ac_add_options --disable-composer ac_add_options --enable-plaintext-editor-only ac_add_options --disable-postscript ac_add_options --disable-mathml ac_add_options --disable-jsd ac_add_options --disable-installer ac_add_options --disable-xprint ac_add_options --disable-necko-disk-cache ac_add_options --enable-necko-small-buffers ac_add_options --disable-logging ac_add_options --disable-tests ac_add_options --enable-crypto ac_add_options --enable-necko-protocols=http,file,res,jar ac_add_options --enable-image-decoders=png,gif,jpeg ac_add_options --enable-strip ac_add_options --enable-reorder
WARNING: NS_ENSURE_TRUE(em) failed, file nsAppRunner.cpp, line 1878 ###!!! ASSERTION: Can't veto change!: 'Error', file nsXREDirProvider.cpp, line 462 Break: at file nsXREDirProvider.cpp, line 462メモリの絶対量が足らんとか、ヒープ領域の限界とか、それ系の問題とは思うのですが、 とりあえず、こちらはペンディング。
pref("network.proxy.type", 1); pref("network.proxy.ftp", "192.168.0.100"); pref("network.proxy.ftp_port", 8080); pref("network.proxy.http", "192.168.0.100"); pref("network.proxy.http_port", 8080); pref("network.proxy.ssl", "192.168.0.100"); pref("network.proxy.ssl_port", 8080); pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, artie.or.jp, 192.168.0.0/24");
さらなる研究が必要かと思ってます。
I subscribed to join port-hpcmips in 7 Mar 2005. I hope that I can report about successing to use minimo on NetBSD/hpcmips as soon as possible.
で進捗状況はというと、gtk+-2.2.4のビルドには成功しました。ただ、localeまわり の問題とからんで日本語入力(xim)関係の調整に時間がかかっています。方向性として は、X_LOCALEの利用はやめて、LD_PRELOADで独自setlocaleにoverrideさせる方法で 作業を進めています。
export MOZ_PHOENIX=1 mk_add_options MOZ_PHOENIX=1 ac_add_options --disable-ldap ac_add_options --disable-mailnews ac_add_options --enable-extensions=cookie,xmlextras ac_add_options --enable-crypto ac_add_options --disable-composer ac_add_options --enable-single-profile ac_add_options --disable-profilesharing ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --enable-default-toolkit=gtk2 ac_add_options --disable-xft ac_add_options --disable-freetype2 ac_add_options --disable-profilesharing ac_add_options --disable-profilelocking ac_add_options --enable-single-profile ac_add_options --disable-accessibility ac_add_options --disable-composer ac_add_options --enable-plaintext-editor-only ac_add_options --disable-postscript ac_add_options --disable-mathml ac_add_options --disable-jsd ac_add_options --disable-installer ac_add_options --disable-xprint ac_add_options --disable-necko-disk-cache ac_add_options --enable-necko-small-buffers ac_add_options --disable-logging ac_add_options --disable-tests ac_add_options --enable-crypto ac_add_options --enable-necko-protocols=http,file,res,jar ac_add_options --enable-image-decoders=png,gif,jpeg ac_add_options --enable-strip ac_add_options --enable-reorder
new_gtk_browser menu bar tool bar location bar status bar Segmentation fault - core dumped
んで、動作確認をしてみたんですが、gtk+-1.xをリンクしてたときの <input type="text" ... >タグでの日本語化けは回避できてた のですが、<input type="submit" ... >タグ(ボタン)には、やはり 反応してくれませんでした...。
で、現在は .mozconfig の設定でもう少し改善できないか調査中です。
最後の最後で、さんざん悩んだんですが、今一度ビルドのログを眺めてみると、 そこここに「Unknown option: -」(若干不正確かも)というようなメッセージが 出ており、なんじゃいなと調べてみると、 config/rules.mk の中で、perlに引き渡す「--」オプションの記述位置が おかしかったようです(元バグ?)。ただし、perlのバージョンが新しいと、問題に ならないようでもありますが...。
で、config/rules.mk を修正して、ビルドし直したら、見事に<input type="submit" ... >タグ(ボタン)に 反応してくれました :-)
と言うわけで、(私にとっては)永かったminimo on NetBSD/hpcmipsのビルドも 一応の完結を迎えることができました。ビルドのサマリは以下からどうぞ。
Summary of building Minimo on NetBSD/hpcmips