我最近在看《深入理解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 ===
这个错误提示的文档我去翻看了,它好像是一个类型转换问题,但文档过于复杂,我不知如何去修改。望各位大佬能教教我!谢谢