【问题标题】:GNU Make 3.82 on Ubuntu 18.04 segfault in glob callglob 调用中 Ubuntu 18.04 上的 GNU Make 3.82 段错误
【发布时间】:2019-03-08 03:41:28
【问题描述】:

我的第一个 SO 问题!

我正在尝试在我的 Ubuntu 18.04 发行版上安装 GNU Make 3.82。但是我遇到了一个问题。

我已经尝试过提到here 的解决方法(修改glob/glob.c 的第55 行),但无济于事。不过,下面的控制台输出并未反映这种尝试。

当我尝试在我的 Ubuntu 18.04 环境中运行 make 时会发生这种情况,在进行前面提到的更改后:

sgowen@stephen-Parallels-Ubuntu:~$ gdb make
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from make...done.
(gdb) run
Starting program: /usr/local/bin/make 

Program received signal SIGSEGV, Segmentation fault.
0x000055555579d381 in ?? ()
(gdb) bt
#0  0x000055555579d381 in ?? ()
#1  0x00007ffff7acba8b in glob_lstat (pglob=0x7fffffffc530, 
    fullname=0x7fffffffbc10 "./.out", flags=516) at ../posix/glob.c:204
#2  glob_in_dir (pattern=pattern@entry=0x55555579f580 ".out", 
    directory=directory@entry=0x7ffff7b997d8 <dot> ".", flags=flags@entry=516, 
    errfunc=errfunc@entry=0x0, pglob=pglob@entry=0x7fffffffc530, 
    alloca_used=<optimized out>, alloca_used@entry=0) at ../posix/glob.c:1299
#3  0x00007ffff7acc589 in __glob (pattern=pattern@entry=0x55555579f580 ".out", 
    flags=flags@entry=516, errfunc=errfunc@entry=0x0, 
    pglob=pglob@entry=0x7fffffffc530) at ../posix/glob.c:1096
#4  0x000055555556d246 in parse_file_seq (
    stringp=stringp@entry=0x7fffffffc5c0, size=size@entry=40, 
    stopchar=stopchar@entry=0, prefix=prefix@entry=0x0, flags=flags@entry=0)
    at read.c:3115
#5  0x000055555555ceda in set_default_suffixes () at default.c:545
#6  0x0000555555559eb2 in main (argc=<optimized out>, argv=<optimized out>, 
    envp=<optimized out>) at main.c:1600
(gdb) 

【问题讨论】:

  • 我尝试在第 55 行进行更改,就像您引用的线程中建议的那样,它为我解决了这个问题。做出这样的改变后,你遇到了什么问题?
  • 调用 make 只会导致分段错误,我会看看我是否可以挖掘更多细节。
  • 分段错误与构建问题完全不同。如果您确实可以在这方面添加一些细节,最好是可以重现的东西......
  • @ReinierTorenbeek 帖子已更新。
  • 只是出于好奇,您为什么需要这么旧版本的 GNU Make?

标签: ubuntu gnu-make


【解决方案1】:

纯粹出于参考目的,因为我自己遇到了段错误问题(尽管使用 Make 4.2.1),实际问题是由于 Make 对 glibc 做出假设,而这些假设对于新版本不再适用。

除了进行alloca相关的更改,还需要拉入上游提交哈希193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4

更多细节:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/XCYUF5BQLICUAAI3OM7EORCNOKEYP2MF/

【讨论】:

    猜你喜欢
    • 2019-01-11
    • 2020-08-18
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    • 1970-01-01
    • 2014-12-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多