Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8320533

Adjust capstone integration for v6 changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • tools
    • None
    • b26
    • aarch64
    • os_x

      Capstone hsdis integration fails to build on latest openjdk/jdk on aarch64 (macos) with:

      ```
      === Output from failing command(s) repeated here ===
      * For target support_hsdis_hsdis-capstone.o:
      In file included from /Users/galder/1/jdk/src/utils/hsdis/capstone/hsdis-capstone.c:55:
      /Users/galder/opt/capstone/include/capstone/capstone.h:341:14: error: expected member name or ';' after declaration specifiers
                      cs_aarch64 aarch64; ///< AARCH64 architecture (aka AArch64)
                      ~~~~~~~~~~ ^
      <command line>:9:17: note: expanded from macro 'aarch64'
      #define aarch64 1
                      ^
      In file included from /Users/galder/1/jdk/src/utils/hsdis/capstone/hsdis-capstone.c:55:
      /Users/galder/opt/capstone/include/capstone/capstone.h:341:13: error: expected ';' at end of declaration list
                      cs_aarch64 aarch64; ///< AARCH64 architecture (aka AArch64)
                                ^
                                ;
      /Users/galder/1/jdk/src/utils/hsdis/capstone/hsdis-capstone.c:145:15: error: use of undeclared identifier 'CS_ARCH_ARM64'; did you mean 'CS_ARCH_ARM'?
        if (cs_open(CAPSTONE_ARCH, CAPSTONE_MODE, &cs_handle) != CS_ERR_OK) {
                    ^~~~~~~~~~~~~
         ... (rest of output omitted)

      * All command lines available in /Users/galder/1/jdk/build/fast/make-support/failure-logs.
      === End of repeated output ===

      No indication of failed target found.
      HELP: Try searching the build log for '] Error'.
      HELP: Run 'make doctor' to diagnose build problems.

      make[2]: *** [/Users/galder/1/jdk/make/Init.gmk:323: main] Error 2
      make[1]: *** [/Users/galder/1/jdk/make/Init.gmk:189: default] Error 2
      make[1]: Leaving directory '/Users/galder/1/jdk'
      make: *** [Makefile:76: build] Error 2
      ```

      Looks to me jdk needs to be updated to deal with the changes 1 week ago related to aarch64 (https://github.com/capstone-engine/capstone/commit/ef89b18a88d64b17e86847bca1c9ad8d12f0431b). It doesn't look to be OS specific.

      I'm going to try to update the integration.

            galder Galder ZamarreƱo
            galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: