ProgramerModa 2021-05-19 16:22 采纳率: 0%
浏览 201

OpenJDK 编译环境搭建的遇到的问题

我最近在看《深入理解Java虚拟机》这本书,跟着书本我自己在尝试搭建一个JDK。发现在使用make images 命令后遇到如下问题。

=== Output from failing command(s) repeated here ===
* For target support_native_java.desktop_libjsound_PLATFORM_API_MacOSX_MidiUtils.o:
/Users/moda/Desktop/OpenJDK/jdk12/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_MidiUtils.c:263:31: error: cast to smaller integer type 'MIDIClientRef' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
static MIDIClientRef client = (MIDIClientRef) NULL;
                              ^~~~~~~~~~~~~~~~~~~~
/Users/moda/Desktop/OpenJDK/jdk12/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_MidiUtils.c:264:29: error: cast to smaller integer type 'MIDIPortRef' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
static MIDIPortRef inPort = (MIDIPortRef) NULL;
                            ^~~~~~~~~~~~~~~~~~
/Users/moda/Desktop/OpenJDK/jdk12/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_MidiUtils.c:265:30: error: cast to smaller integer type 'MIDIPortRef' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
static MIDIPortRef outPort = (MIDIPortRef) NULL;
                             ^~~~~~~~~~~~~~~~~~
/Users/moda/Desktop/OpenJDK/jdk12/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_MidiUtils.c:471:32: error: cast to smaller integer type 'MIDIEndpointRef' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
    MIDIEndpointRef endpoint = (MIDIEndpointRef) NULL;
                               ^~~~~~~~~~~~~~~~~~~~~~
   ... (rest of output omitted)

* All command lines available in /Users/moda/Desktop/OpenJDK/jdk12/build/macosx-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===

这个错误提示的文档我去翻看了,它好像是一个类型转换问题,但文档过于复杂,我不知如何去修改。望各位大佬能教教我!谢谢

  • 写回答

3条回答 默认 最新

  • CSDN专家-Time 2021-05-19 16:25
    关注

    cast to smaller integer type 'MIDIPortRef' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]

    强转啊

    评论

报告相同问题?

悬赏问题

  • ¥15 这个如何解决详细步骤
  • ¥15 在微信h5支付申请中,别人给钱就能用我的软件,这个的所属行业是啥?
  • ¥30 靶向捕获探针设计软件包
  • ¥15 别人给钱就能用我的软件,这个的经营场景是啥?
  • ¥15 react-diff-viewer组件,如何解决数据量过大卡顿问题
  • ¥20 遥感植被物候指数空间分布图制作
  • ¥15 安装了xlrd库但是import不了…
  • ¥20 Github上传代码没有contribution和activity记录
  • ¥20 SNETCracker
  • ¥15 数学建模大赛交通流量控制