编程技术网

关注微信公众号,定时推送前沿、专业、深度的编程技术资料。

 找回密码
 立即注册

QQ登录

只需一步,快速开始

极客时间

支持矮人5:Support DWARF 5

作者: 14wml 2022-5-12 16:16:43 显示全部楼层 |阅读模式

Support DWARF 5

编译OpenJ9-OpenJDK时,我收到此错误:

[  0%] Generating /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/j9ddr.dat, /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/superset.dat
Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:114 getSourcelist - Getting compilation directory string: DW_DLE_STRP_OFFSET_BAD(204)

Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:1524 traverse_cu_in_debug_section - Failed to get source file list.

Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:1591 startScan - Failure scanning /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/libj9ddr_misc29.debuginfo

gmake[10]: *** [CMakeFiles/j9ddr.dir/build.make:749: /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/j9ddr.dat] Error 1

I think this is related to https://gcc.gnu.org/gcc-11/changes.html:

对于生产矮人调试信息的目标,现在默认为矮版5(vxworks和darwin/mac OS X除外,默认为版本2和AIX默认为版本4)。与早期版本相比,这可以产生多达25%的紧凑型调试信息。

可以通过指定-GDWARF -4来解决这一点,但是最好支持现代矮人。

该问题来自:eclipse/omr/issues/6135 , 试试查看该项目更多issue.

问题解答

cquliaoli 2022-5-12 16:49:48 显示全部楼层

On which Linux distribution did you encounter this? gcc-11 is not immediately available in Ubuntu 20.04 and the version of libdwarf.so on Ubuntu 18.04 doesn't support DWARF 5 (at least not well).

Sarvar Khalimo 2022-5-12 17:16:31 显示全部楼层

我在Gentoo Linux上使用GCC 11.2.0和Libdwarf 20210305进行此编译。

Cornel Ciobanu 2022-5-12 18:10:50 显示全部楼层

I just bumped into this problem while (native) building on RISC-V (gcc 11.2.0). Has been there any progress on this? Shall I just hack build scripts to pass -gdwarf-4?

Winston Ewert 2022-5-12 17:45:16 显示全部楼层

I looked at it briefly, but didn't have time to even collect a consistent set of tools. I'd be surprised if gcc-11 works without #6301 that addresses code problems that cause failures with gcc-10. I think using -gdwarf-4 in the meantime is reasonable

jesserockz 2022-5-12 17:10:57 显示全部楼层

I'd be surprised if gcc-11 works without #6301 On RISC-V there's no JIT so this is no problem. I'll use -gdwarf-4 temporarily.

腾讯云服务器 阿里云服务器
腾讯云服务器 腾讯云服务器
关注微信
^