LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1686|回复: 5

使用glibc 2.4,mozilla-firefox不能通过编译的请看![转贴]

[复制链接]
发表于 2006-3-14 13:51:44 | 显示全部楼层 |阅读模式
转贴自:
http://forums.gentoo.org/viewtop ... hlight-mozilla.html

如果你使用glibc2.4可能会遇到以下的问题:

  1. i686-pc-linux-gnu-g++ -o nsStackFrameUnix.o -c -I../../dist/include/system_wrappers -include ../../config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE="Linux2.6" -DOSARCH="Linux" -DBUILD_ID=2006020611 -D_IMPL_NS_COM  -I../../dist/include/string -I../../dist/include/xpcom -I../../dist/include -I/usr/include/nspr    -I/usr/X11R6/include   -fPIC  -DGENTOO_NSPLUGINS_DIR="/usr/lib/nsplugins" -DGENTOO_NSBROWSER_PLUGINS_DIR="/usr/lib/nsbrowser/plugins"  -I/usr/X11R6/include -fno-rtti -fno-handle-exceptions  -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=pentium4 -pipe -Wno-return-type -w -freorder-blocks -fno-reorder-functions -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2  -DGENTOO_NSPLUGINS_DIR="/usr/lib/nsplugins" -DGENTOO_NSBROWSER_PLUGINS_DIR="/usr/lib/nsbrowser/plugins"  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsStackFrameUnix.pp nsStackFrameUnix.cpp
  2. nsIConsoleListener.idl
  3. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIConsoleListener nsIConsoleListener.idl
  4. nsIConsoleMessage.idl
  5. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIConsoleMessage nsIConsoleMessage.idl
  6. nsIConsoleService.idl
  7. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIConsoleService nsIConsoleService.idl
  8. nsIErrorService.idl
  9. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIErrorService nsIErrorService.idl
  10. nsIException.idl
  11. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIException nsIException.idl
  12. nsIExceptionService.idl
  13. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIExceptionService nsIExceptionService.idl
  14. nsIVersionComparator.idl
  15. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIVersionComparator nsIVersionComparator.idl
  16. nsIDebug.idl
  17. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIDebug nsIDebug.idl
  18. nsIInterfaceRequestor.idl
  19. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIInterfaceRequestor nsIInterfaceRequestor.idl
  20. nsIMemory.idl
  21. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIMemory nsIMemory.idl
  22. nsIProgrammingLanguage.idl
  23. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIProgrammingLanguage nsIProgrammingLanguage.idl
  24. nsISupports.idl
  25. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsISupports nsISupports.idl
  26. nsITraceRefcnt.idl
  27. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsITraceRefcnt nsITraceRefcnt.idl
  28. nsIWeakReference.idl
  29. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsIWeakReference nsIWeakReference.idl
  30. nsrootidl.idl
  31. ../../dist/bin/xpidl -m typelib -w -I ../../dist/idl -I. -o _xpidlgen/nsrootidl nsrootidl.idl
  32. ../../dist/bin/xpt_link _xpidlgen/xpcom_base.xpt _xpidlgen/nsIConsoleListener.xpt _xpidlgen/nsIConsoleMessage.xpt _xpidlgen/nsIConsoleService.xpt _xpidlgen/nsIErrorService.xpt _xpidlgen/nsIException.xpt _xpidlgen/nsIExceptionService.xpt _xpidlgen/nsIVersionComparator.xpt _xpidlgen/nsIDebug.xpt _xpidlgen/nsIInterfaceRequestor.xpt _xpidlgen/nsIMemory.xpt _xpidlgen/nsIProgrammingLanguage.xpt _xpidlgen/nsISupports.xpt _xpidlgen/nsITraceRefcnt.xpt _xpidlgen/nsIWeakReference.xpt _xpidlgen/nsrootidl.xpt
  33. nsStackFrameUnix.cpp: In function 'void DumpStackToFile(FILE*)':
  34. nsStackFrameUnix.cpp:101: error: 'JB_BP' was not declared in this scope
  35. gmake[3]: *** [nsStackFrameUnix.o] Error 1
  36. gmake[3]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.5-r11/work/mozilla/xpcom/base'
  37. gmake[2]: *** [libs] Error 2
  38. gmake[2]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.5-r11/work/mozilla/xpcom'
  39. gmake[1]: *** [tier_2] Error 2
  40. gmake[1]: Leaving directory `/var/tmp/portage/mozilla-firefox-1.5-r11/work/mozilla'
  41. make: *** [default] Error 2

  42. !!! ERROR: www-client/mozilla-firefox-1.5-r11 failed.
  43. Call stack:
  44.   ebuild.sh, line 1894:   Called dyn_compile
  45.   ebuild.sh, line 941:   Called src_compile

  46. !!! (no error message)
  47. !!! If you need support, post the topmost build error, and the call stack if relevant.
复制代码


试试这个:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2006-3-14 14:49:41 | 显示全部楼层
整了半天,mozilla的两个类似补丁打不上。有没有人可以写个overlay出来呢?
下面附上补丁:
  1. --- xpcom/base/nsTraceRefcntImpl.cpp    2004-02-11 07:16:10.000000000 +0000
  2. +++ xpcom/base/nsTraceRefcntImpl.cpp    2006-03-13 05:56:48.810241000 +0000
  3. @@ -50,19 +50,6 @@
  4.   
  5. #if defined(_WIN32)
  6. #include <windows.h>
  7. -#elif defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC))
  8. -#include <setjmp.h>
  9. -
  10. -//
  11. -// On glibc 2.1, the Dl_info api defined in <dlfcn.h> is only exposed
  12. -// if __USE_GNU is defined.  I suppose its some kind of standards
  13. -// adherence thing.
  14. -//
  15. -#if (__GLIBC_MINOR__ >= 1) && !defined(__USE_GNU)
  16. -#define __USE_GNU
  17. -#endif
  18. -
  19. -#include <dlfcn.h>
  20. #endif
  21.   
  22. #ifdef HAVE_LIBDL
  23. @@ -484,7 +471,7 @@
  24.   
  25. #endif /* NS_BUILD_REFCNT_LOGGING */
  26.   
  27. -nsresult
  28. +NS_COM nsresult
  29. nsTraceRefcntImpl::DumpStatistics(StatisticsType type, FILE* out)
  30. {
  31.    nsresult rv = NS_OK;
  32. @@ -561,7 +548,7 @@
  33.    return rv;
  34. }
  35.   
  36. -void
  37. +NS_COM void
  38. nsTraceRefcntImpl::ResetStatistics()
  39. {
  40. #ifdef NS_BUILD_REFCNT_LOGGING
  41. @@ -850,7 +837,7 @@
  42.   
  43. #if defined(_WIN32) && defined(_M_IX86) // WIN32 x86 stack walking code
  44. #include "nsStackFrameWin.h"
  45. -void
  46. +NS_COM void
  47. nsTraceRefcntImpl::WalkTheStack(FILE* aStream)
  48. {
  49.    DumpStackToFile(aStream);
  50. @@ -858,9 +845,9 @@
  51.   
  52. // WIN32 x86 stack walking code
  53. // i386 or PPC Linux stackwalking code or Solaris
  54. -#elif (defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC))) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)))
  55. +#elif (defined(linux) && defined(__GNUC__) && (defined(__i386) || defined(PPC))) || (defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)))
  56. #include "nsStackFrameUnix.h"
  57. -void
  58. +NS_COM void
  59. nsTraceRefcntImpl::WalkTheStack(FILE* aStream)
  60. {
  61.    DumpStackToFile(aStream);
  62. @@ -960,7 +947,7 @@
  63.   
  64. #else // unsupported platform.
  65.   
  66. -void
  67. +NS_COM void
  68. nsTraceRefcntImpl::WalkTheStack(FILE* aStream)
  69. {
  70.         fprintf(aStream, "write me, dammit!\n");
复制代码
  1. ---xpcom/base/nsStackFrameUnix.cpp     2004-03-08 07:47:44.000000000 +0000
  2. +++ xpcom/base/nsStackFrameUnix.cpp     2006-03-13 05:56:48.866244500 +0000
  3. @@ -78,25 +78,15 @@
  4. }
  5.   
  6.   
  7. -#if defined(linux) && defined(__GLIBC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code
  8. +#if defined(linux) && defined(__GNUC__) && (defined(__i386) || defined(PPC)) // i386 or PPC Linux stackwalking code
  9.   
  10. -#include <setjmp.h>
  11. -//
  12.   
  13. void DumpStackToFile(FILE* aStream)
  14. {
  15. -  jmp_buf jb;
  16. -  setjmp(jb);
  17. -
  18.    // Stack walking code courtesy Kipp's "leaky".
  19.   
  20. -  // Get the frame pointer out of the jmp_buf
  21. -  void **bp = (void**)
  22. -#if defined(__i386)
  23. -    (jb[0].__jmpbuf[JB_BP]);
  24. -#elif defined(PPC)
  25. -    (jb[0].__jmpbuf[JB_GPR1]);
  26. -#endif
  27. +  // Get the frame pointer
  28. +  void **bp = (void**) __builtin_frame_address(0);
  29.   
  30.    int skip = 2;
  31.    for ( ; (void**)*bp > bp; bp = (void**)*bp) {
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-3-14 15:45:51 | 显示全部楼层
正在用gcc4.1.0 emerge -e world
glibc2.4 已经成功编译过去了 希望firefox不要出问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-14 17:26:30 | 显示全部楼层
按我上面给的连接所说,你用glibc2.4后编译firefox不用那个补丁会出问题的。mozilla也会遇到同样的问题。
因为mozilla出问题,所以gnome中一些依赖于mozilla的也编译不过。
回复 支持 反对

使用道具 举报

发表于 2006-3-15 20:36:06 | 显示全部楼层
已经成功 emerge -e world 成功 没有所说的问题
gentoo 2006.0 amd64 gcc4.1.0 glibc2.4 firefox1.5.0.1 成功编译 中间没有问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-15 23:50:28 | 显示全部楼层
是吗?我是编译的32位系统;难道32位的和64位的不同?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表