在i386上使用LLVM3.4或更新版本构建Thunderbird / Firefox会导致安装阶段崩溃;amd64不会出现这个问题。在VMware和裸机上运行的VM都出现了这个问题,但我也可以在其他裸机i386系统上运行,没有任何问题。我的猜测是,这可能是LLVM的代码生成问题,从我在其他地方听到的,这开始于LLVM 3.3和3.4之间的某个地方,但我不知道这是否真的是LLVM问题,还是Thunderbird / Firefox安装程序中的相关代码问题。
gmake[1]: Entering directory '/usr/ports/pobj/thunderbird-24.2.0/build-i386/mail/installer'
OMNIJAR_NAME=omni.ja \
/usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/_virtualenv/bin/python /usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/packager.py -DMOZ_GLUE_IN_PROGRAM -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"OpenBSD5\" -DOSARCH=OpenBSD -DNO_NSPR_10_SUPPORT -DAB_CD=en-US -DMOZ_APP_NAME=thunderbird -DPREF_DIR=defaults/pref -DMOZ_ENABLE_GNOME_COMPONENT=1 -DMOZ_GTK2=1 -DJAREXT= -DMOZ_NATIVE_NSPR=1 -DMOZ_NATIVE_NSS=1 -DMOZ_CHILD_PROCESS_NAME=plugin-container -DDLL_PREFIX=lib -DDLL_SUFFIX=.so.28.0 -DBIN_SUFFIX= -DBINPATH=bin \
--format omni \
--removals /usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mail/installer/removed-files.in \
\
\
\
--optimizejars \
\
package-manifest ../../mozilla/dist ../../mozilla/dist/thunderbird \
--non-resource defaults/messenger/mailViews.dat
Executing /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/xpcshell -g /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/ -a /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/ -f /usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/precompile_cache.js -e precompile_startupcache("resource://gre/");
Traceback (most recent call last):
File "/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/packager.py", line 375, in <module>
main()
File "/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/packager.py", line 367, in main
args.source, gre_path, base)
File "/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/packager.py", line 148, in precompile_cache
errors.fatal('Error while running startup cache precompilation')
File "/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/python/mozbuild/mozpack/errors.py", line 101, in fatal
self._handle(self.FATAL, msg)
File "/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/python/mozbuild/mozpack/errors.py", line 96, in _handle
raise ErrorMessage(msg)
mozpack.errors.ErrorMessage: Error: Error while running startup cache precompilation我正在寻找一些相关工具的帮助,试图确定这个非法指令错误的来源。
Core was generated by `xpcshell'.
Program terminated with signal 4, Illegal instruction.我使用的是核心文件,而不是您指定的运行gdb。
# egdb build-i386/mozilla/dist/bin/xpcshell build-i386/mail/installer/xpcshell.core
Python Exception <type 'exceptions.ImportError'> No module named gdb:
warning:
Could not load the Python gdb module from `/usr/local/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd5.5".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/xpcshell...(no debugging symbols found)...done.
[New process 13685]
Core was generated by `xpcshell'.
Program terminated with signal 4, Illegal instruction.
#0 0x002ead4d in mozilla::BinaryPath::GetFile(char const*, nsIFile**) () from /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/libxul.so.28.0
(gdb) x/i $pc
=> 0x2ead4d <_ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile+157>: ud2
(gdb) quit
# echo _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile+157 | c++filt
mozilla::BinaryPath::GetFile(char const*, nsIFile**)+157发布于 2014-02-28 23:22:01
正在寻找相关工具的帮助,以尝试确定此非法指令错误的来源
您的第一个任务是了解您正在尝试执行的非法指令。
在GDB下运行xpcshell,如下所示:
gdb --args /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/xpcshell \
-g /usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/ -a \
/usr/ports/pobj/thunderbird-24.2.0/build-i386/mozilla/dist/bin/ -f \
/usr/ports/pobj/thunderbird-24.2.0/comm-esr24/mozilla/toolkit/mozapps/installer/precompile_cache.js -e \
precompile_startupcache("resource://gre/");
(gdb) run
... GDB will stop on SIGILL
(gdb) x/i $pc一旦你知道了非法指令是什么,你就需要弄清楚为什么Clang会产生它。
一种可能的可能性是ud2指令,Clang在程序中检测到undefined behavior时会发出该指令。
https://stackoverflow.com/questions/22086381
复制相似问题