- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试在 Windows 10 PC 上从 msys2 环境中构建 binutils-gdb。
git://sourceware.org/git/binutils-gdb.git
大部分代码编译正常,但 libiberty 构建失败,pex-win32.c 中出现错误:
./pex-win32.c:121:10: warning: implicit declaration of function ‘_open’; did you mean ‘open’? [-Wimplicit-function-declaration]
./pex-win32.c:121:23: error: ‘_O_RDONLY’ undeclared (first use in this function); did you mean ‘O_RDONLY’?
(注意:以上是前几个编译错误的示例)。
我怀疑我需要将一个选项传递给 ./configure 以更正此问题但不确定它是什么。我目前正在运行 ./configure,没有任何选项。
默认情况下,构建、主机和目标系统类型都设置为 x86_64-w64-mingw32。
configure:2678: checking build system type
configure:2692: result: x86_64-w64-mingw32
如果我在 pex-win32.c 上运行预处理器,我可以看到它包含以下打开声明:
# 201 "/usr/include/sys/_default_fcntl.h" 2 3 4
extern int open (const char *, int, ...);
但是 pex-win32.c 不使用 open,它使用 _open(pex-win32.c 文件中带下划线的其他符号也存在类似问题,但标题中没有)。
return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
在 _default_fcntl.h header 的更下方,我看到包含在 #ifdef _COMPILING_NEWLIB 中的正确声明:
/* Provide _<systemcall> prototypes for functions provided by some versions
of newlib. */
#ifdef _COMPILING_NEWLIB
extern int _open (const char *, int, ...);
但是,如果我将 CFLAGS+="-D_COMPILING_NEWLIB"传递给 make,则会产生其他构建错误,我认为这不是答案。
关于如何让 binutils-gdb 从 msys2 环境构建的任何想法?
谢谢!
更新
我尝试重现构建 msys2 gdb 包。
这失败了:
==> ERROR: A failure occurred in build().
Aborting...
完整输出:
MSYS /
$cd /d/git
MSYS /d/git
$echo $MSYSTEM
MSYS
MSYS /d/git
$git clone https://github.com/Alexpux/MSYS2-packages.git
Cloning into 'MSYS2-packages'...
remote: Counting objects: 19033, done.
remote: Compressing objects: 100% (93/93), done.
remote: Total 19033 (delta 31), reused 81 (delta 25), pack-reused 18911
Receiving objects: 100% (19033/19033), 16.14 MiB | 9.82 MiB/s, done.
Resolving deltas: 100% (9917/9917), done.
MSYS /d/git
$cd MSYS2-packages/gdb
MSYS /d/git/MSYS2-packages/gdb
$makepkg -sCLf --skippgpcheck
==> Making package: gdb 7.12.1-1 (Mon, Jul 30, 2018 4:12:59 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading gdb-7.12.1.tar.xz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 18.3M 100 18.3M 0 0 8187k 0 0:00:02 0:00:02 --:--:-- 8187k
-> Downloading gdb-7.12.1.tar.xz.sig...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 72 100 72 0 0 295 0 --:--:-- --:--:-- --:--:-- 295
-> Found gdbinit
-> Found 0001-Teach-gdb-how-to-unwind-cygwin-_sigbe-and-sigdelayed.patch
-> Found 0002-7.8-windows-nat-cygwin.patch
-> Found 0003-Better-handling-for-realpath-failures-in-windows_mak.patch
-> Found 0004-7.8-symtab-cygwin.patch
-> Found 0005-Remove-a-spurious-target_terminal_ours-from-windows_.patch
-> Found 0006-PR-build-21187-Static-linking-of-libstdc-and-libgcc-.patch
-> Found 0010-Support-settings-thread-name-MS-Windows.patch
-> Found gdb-7.11.1-msysize.patch
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
gdb-7.12.1.tar.xz ... Passed
gdb-7.12.1.tar.xz.sig ... Skipped
gdbinit ... Passed
0001-Teach-gdb-how-to-unwind-cygwin-_sigbe-and-sigdelayed.patch ... Passed
0002-7.8-windows-nat-cygwin.patch ... Passed
0003-Better-handling-for-realpath-failures-in-windows_mak.patch ... Passed
0004-7.8-symtab-cygwin.patch ... Passed
0005-Remove-a-spurious-target_terminal_ours-from-windows_.patch ... Passed
0006-PR-build-21187-Static-linking-of-libstdc-and-libgcc-.patch ... Passed
0010-Support-settings-thread-name-MS-Windows.patch ... Passed
gdb-7.11.1-msysize.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting gdb-7.12.1.tar.xz with bsdtar
==> Starting prepare()...
patching file gdb/amd64-windows-tdep.c
patching file gdb/i386-cygwin-tdep.c
patching file gdb/windows-tdep.c
patching file gdb/windows-tdep.h
patching file gdb/windows-nat.c
patching file gdb/windows-nat.c
patching file gdb/symtab.c
patching file gdb/windows-nat.c
patching file gdb/ChangeLog
patching file gdb/NEWS
Hunk #1 succeeded at 142 with fuzz 2 (offset 141 lines).
patching file gdb/windows-nat.c
Hunk #1 succeeded at 173 (offset 1 line).
Hunk #2 succeeded at 454 (offset 1 line).
Hunk #3 succeeded at 1063 (offset 20 lines).
Hunk #4 succeeded at 1091 (offset 19 lines).
Hunk #5 succeeded at 1173 (offset 19 lines).
Hunk #6 succeeded at 1224 (offset 19 lines).
Hunk #7 succeeded at 1580 (offset 19 lines).
Hunk #8 succeeded at 2591 (offset 17 lines).
Hunk #9 succeeded at 2623 (offset 17 lines).
patching file bfd/acinclude.m4
Hunk #1 succeeded at 21 (offset -2 lines).
patching file bfd/config.bfd
Hunk #1 succeeded at 729 with fuzz 2 (offset 50 lines).
Hunk #2 succeeded at 782 with fuzz 2 (offset 51 lines).
patching file bfd/configure
Hunk #1 succeeded at 5996 (offset 6 lines).
Hunk #2 succeeded at 6338 (offset 6 lines).
Hunk #3 succeeded at 6918 (offset 6 lines).
Hunk #4 succeeded at 8502 (offset 6 lines).
Hunk #5 succeeded at 8584 (offset 6 lines).
Hunk #6 succeeded at 9046 (offset 6 lines).
Hunk #7 succeeded at 9161 (offset 6 lines).
Hunk #8 succeeded at 9592 (offset 6 lines).
Hunk #9 succeeded at 10493 (offset 6 lines).
Hunk #10 succeeded at 10524 (offset 6 lines).
Hunk #11 succeeded at 11166 (offset 6 lines).
Hunk #12 succeeded at 13767 (offset 97 lines).
Hunk #13 succeeded at 13943 (offset -1015 lines).
Hunk #14 succeeded at 14098 (offset -1015 lines).
patching file bfd/configure.ac
Hunk #1 succeeded at 267 (offset -316 lines).
patching file config/dfp.m4
patching file config/elf.m4
Hunk #1 succeeded at 15 with fuzz 2 (offset 2 lines).
patching file config/lthostflags.m4
patching file config/mmap.m4
patching file config/picflag.m4
Hunk #1 succeeded at 25 (offset 6 lines).
patching file config/tcl.m4
patching file config.guess
Hunk #1 succeeded at 888 (offset 22 lines).
patching file config.rpath
patching file configure
Hunk #1 succeeded at 3036 (offset 17 lines).
Hunk #2 succeeded at 3556 (offset 116 lines).
Hunk #3 succeeded at 3569 (offset 118 lines).
Hunk #4 succeeded at 3843 (offset 136 lines).
Hunk #5 succeeded at 3987 (offset 145 lines).
Hunk #6 succeeded at 6138 with fuzz 2 (offset -119 lines).
Hunk #7 succeeded at 6156 (offset -118 lines).
Hunk #8 succeeded at 6167 (offset -118 lines).
Hunk #9 succeeded at 6177 (offset -118 lines).
Hunk #10 succeeded at 7048 (offset -36 lines).
Hunk #11 succeeded at 7556 (offset -29 lines).
patching file configure.ac
Hunk #1 succeeded at 409 (offset 33 lines).
Hunk #2 succeeded at 892 (offset 127 lines).
Hunk #3 succeeded at 905 (offset 126 lines).
Hunk #4 succeeded at 1179 (offset 144 lines).
Hunk #5 succeeded at 1323 (offset 153 lines).
Hunk #6 succeeded at 1817 (offset 112 lines).
Hunk #7 succeeded at 1828 (offset 112 lines).
Hunk #8 succeeded at 1838 (offset 112 lines).
Hunk #9 succeeded at 2652 (offset 190 lines).
Hunk #10 succeeded at 3155 (offset 198 lines).
patching file gdb/config/i386/msys.mh
patching file gdb/config/i386/msys64.mh
patching file gdb/configure
Hunk #1 succeeded at 8002 (offset 901 lines).
Hunk #2 succeeded at 14418 (offset 1285 lines).
Hunk #3 succeeded at 15095 (offset 1062 lines).
Hunk #4 succeeded at 15138 (offset 1062 lines).
Hunk #5 succeeded at 15267 (offset 1062 lines).
patching file gdb/configure.ac
Hunk #1 succeeded at 610 (offset -8 lines).
Hunk #2 succeeded at 1960 (offset -132 lines).
Hunk #3 succeeded at 2032 (offset -139 lines).
patching file gdb/configure.host
Hunk #1 succeeded at 116 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 184 (offset -4 lines).
patching file gdb/configure.tgt
Hunk #1 succeeded at 239 (offset 1 line).
Hunk #2 succeeded at 677 with fuzz 2 (offset 2 lines).
Hunk #3 succeeded at 722 (offset 2 lines).
patching file gdb/gdbserver/configure.srv
Hunk #1 succeeded at 111 (offset 13 lines).
Hunk #2 succeeded at 377 (offset 48 lines).
patching file gdb/gnulib/import/Makefile.am
Hunk #1 succeeded at 427 (offset 44 lines).
patching file gdb/gnulib/import/Makefile.in
Hunk #1 succeeded at 1972 (offset 284 lines).
patching file gdb/testsuite/gdb.base/bigcore.exp
Hunk #1 succeeded at 33 with fuzz 1 (offset -1 lines).
patching file gdb/testsuite/gdb.base/fileio.exp
Hunk #1 succeeded at 253 (offset 7 lines).
patching file gdb/testsuite/gdb.base/maint.exp
Hunk #1 succeeded at 138 (offset -8 lines).
Hunk #2 succeeded at 443 (offset -5 lines).
patching file gdb/testsuite/gdb.base/shreloc.exp
Hunk #2 succeeded at 248 (offset 1 line).
patching file gdb/testsuite/gdb.base/solib-weak.exp
patching file gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
patching file gdb/testsuite/gdb.server/wrapper.exp
patching file gdb/testsuite/lib/gdb.exp
Hunk #1 succeeded at 1802 (offset 6 lines).
Hunk #2 succeeded at 3420 (offset 76 lines).
Hunk #3 succeeded at 3429 (offset 76 lines).
Hunk #4 succeeded at 3454 with fuzz 1 (offset 74 lines).
Hunk #5 succeeded at 3502 (offset 74 lines).
Hunk #6 succeeded at 3621 (offset 74 lines).
Hunk #7 succeeded at 3630 (offset 74 lines).
Hunk #8 succeeded at 3662 (offset 77 lines).
Hunk #9 succeeded at 4070 (offset 79 lines).
Hunk #10 succeeded at 5059 (offset 93 lines).
Hunk #11 succeeded at 5095 (offset 93 lines).
patching file gdb/windows-nat.c
Hunk #1 succeeded at 674 with fuzz 2 (offset -8 lines).
patching file libdecnumber/configure
Hunk #1 succeeded at 4655 (offset 36 lines).
patching file libiberty/configure
Hunk #1 succeeded at 5109 (offset 212 lines).
Hunk #2 succeeded at 6175 (offset 363 lines).
patching file libiberty/configure.ac
Hunk #1 succeeded at 549 (offset 10 lines).
patching file libtool.m4
patching file ltmain.sh
patching file ltoptions.m4
patching file opcodes/configure
Hunk #1 succeeded at 5718 (offset 1 line).
Hunk #2 succeeded at 6060 (offset 1 line).
Hunk #3 succeeded at 6640 (offset 1 line).
Hunk #4 succeeded at 8225 (offset 1 line).
Hunk #5 succeeded at 8307 (offset 1 line).
Hunk #6 succeeded at 8769 (offset 1 line).
Hunk #7 succeeded at 8884 (offset 1 line).
Hunk #8 succeeded at 9315 (offset 1 line).
Hunk #9 succeeded at 10216 (offset 1 line).
Hunk #10 succeeded at 10247 (offset 1 line).
Hunk #11 succeeded at 10889 (offset 1 line).
Hunk #12 succeeded at 12343 (offset 46 lines).
Hunk #13 succeeded at 12513 (offset 46 lines).
patching file opcodes/configure.ac
Hunk #1 succeeded at 175 (offset -6 lines).
patching file readline/configure
patching file readline/configure.in
patching file readline/support/config.guess
patching file readline/support/config.rpath
patching file readline/support/config.sub
patching file readline/support/shlib-install
patching file readline/support/shobj-conf
patching file sim/arm/configure
Hunk #1 succeeded at 6229 (offset 99 lines).
Hunk #2 succeeded at 6571 (offset 99 lines).
Hunk #3 succeeded at 7193 (offset 99 lines).
Hunk #4 succeeded at 9906 (offset 567 lines).
Hunk #5 succeeded at 10450 (offset 567 lines).
Hunk #6 succeeded at 10565 (offset 567 lines).
Hunk #7 succeeded at 10996 (offset 567 lines).
Hunk #8 succeeded at 11897 (offset 567 lines).
Hunk #9 succeeded at 11928 (offset 567 lines).
Hunk #10 succeeded at 12570 (offset 567 lines).
==> Starting build()...
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking target system type... x86_64-pc-msys
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... no, using cp -p
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking to see if cat works as expected... yes
checking for x86_64-pc-msys-gcc... x86_64-pc-msys-gcc
==> ERROR: A failure occurred in build().
Aborting...
MSYS /d/git/MSYS2-packages/gdb
$which gcc
/usr/bin/gcc
MSYS /d/git/MSYS2-packages/gdb
$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-msys/7.3.0/lto-wrapper.exe
Target: x86_64-pc-msys
Configured with: /msys_scripts/gcc/src/gcc-7.3.0/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=x86-64 --with-tune=generic --disable-multilib --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --disable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 7.3.0 (GCC)
MSYS /d/git/MSYS2-packages/gdb
$
更新
从环境中删除它,您可以构建 gdb 包:
MSYS_PATH_TYPE=inherit
最佳答案
您的构建环境不正确。
MSYS2 有 3 个 shell(和工具链)
libiberty/configure 根据这个逻辑选择要使用的 pex 版本:
# Figure out which version of pexecute to use.
case "${host}" in
*-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;;
*-*-msdosdjgpp*) pexecute=pex-djgpp ;;
*-*-msdos*) pexecute=pex-msdos ;;
*) pexecute=pex-unix ;;
esac
如果您使用的是 msys shell(posix 仿真),您的 configure --build 应该是 x86_64-pc-msys,上面的逻辑应该选择 pex-unix.c。
此外,如果您想使用 msys shell 构建 posix 模拟 gdb,那么您可能应该使用这些补丁:https://github.com/Alexpux/MSYS2-packages/tree/master/gdb .
关于windows - 为什么 binutils-gdb 无法从 MSYS2 构建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51585102/
我在使用 gradle 构建一个特定应用程序时遇到问题。该应用程序可以用 eclipse 编译和构建,它在平板电脑上运行良好。当我尝试使用 Gradle 构建它时,“compileDebugJava”
我有一个 C 程序,是一位离开的开发人员留给我的。我试图弄清楚他到底在做什么,并将软件重新安排成更合乎逻辑的东西,这样我就可以更轻松地构建它。我正在使用 CMake 构建,而他使用的是 Make。 有
我刚开始阅读“Pro Spring MVC with web flow”,它附带了一个我想遵循的代码示例。 我要什么 - 我想像书中那样构建应用程序,使用 Gradle 有什么问题 - 我没用过 Gr
我希望有人已经这样做了。我正在尝试为我的一个 angular 2 项目在 teamcity 中建立一个连续的构建。在做了一些研究之后,我按照以下步骤操作: 构建步骤 1:为 teamcity 安装 j
我有一个旧的 ASP.Net 网站解决方案,看起来像: 当我在 Visual Studio 中构建解决方案时,我得到以下输出: ------ Build started: Project: C:\..
我使用 gulp-usref、gulp-if、gulp-uglify、gulp-csso 和 gulp-file-include 来构建我的应用程序。除了 HTML 保持原样外,构建中的一切都运行良好
我正在使用 ionic2 开发内部移动应用程序。我可以通过以下方式成功构建 ios: ionic build ios and ionic build ios --prod 但当我这样做时,它一直失败
我是一位经验丰富的 .NET/C# 开发人员,但对这里的几乎所有技术/库(包括 SQL/DB 工作)都是新手。 我正在开发一个具有 Azure/Entity Framework .NET 后端和可移植
我正在使用 VS 2008。我可以使用 IDE 成功编译我的解决方案。但是,当我尝试使用 devenv.com 构建它时,它失败并提示“错误:找不到项目输出组'(无法确定名称)的输出”。该组、其配置或
版本: ember.js 2.7,ember-data 2.7 ember-cli 2.9.1//同样适用于 ember-cli 2.7 node 6.9.1, npm 3.10.9//也适用于 no
我第一次修补 AzureDevops,设置一些 CI 任务。 我有一个公共(public)存储库(开源)和一个包含 3 个 F# 项目的解决方案(.sln)。该解决方案在 Windows/Mac/Li
目前 5.1.5 版本或 STLPort CVS 存储库似乎仍不支持 VS2008。如果有人已经完成了这项工作,那么如果可能的话,分享会很有用:) 同样,了解 VS2005 或 2008 x64 构建
我有一个 Python 2.7 项目,到目前为止一直使用 gfortran 和 MinGW 来构建扩展。我使用 MinGW,因为它似乎支持 Fortran 代码中的写入语句和可分配数组,而 MSVC
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
我想知道为什么在 Zimbra Wiki 中只列出了构建过程的特定平台。这意味着不可能在其他 Linux 发行版上构建 Zimbra? Zimbra 社区选择一个特殊的 Linux 发行版来构建 Zi
我将在 Swift 中构建一个 CLI 工具。我用这个命令创建了项目 swift package init --type executable当我构建我的项目并解析 时读取别名 Xcode 中的参数并
我想为添加到 docker 镜像的文件设置文件权限。我有这个简单的 Dockerfile: FROM ubuntu:utopic WORKDIR /app RUN groupadd -g 1000 b
当我使用 clBuildProgram在我的 OpenCl 代码中,它失败并显示错误代码 -11,没有任何日志信息。 这是我的代码的样子: ret = clBuildProgram(program
我有一个底部导航栏,它有一个列表页面,该页面使用状态块。 class _MainPageState extends State { int _index = 0; @override Wi
我在本地计算机上使用Jenkins(Jenkins URL未通过Internet公开,但该计算机上已启用Internet。) 我进行了以下配置更改: 在Jenkins工具上安装了Git和Github插
我是一名优秀的程序员,十分优秀!