arthas icon indicating copy to clipboard operation
arthas copied to clipboard

Unable use as-package.sh install artahs

Open OrezzerO opened this issue 3 years ago • 2 comments

  • [x] 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • Arthas 版本: 3.5.6
  • 操作系统版本: Macos 10.15.4
  • Java version: 1.8.0_275, vendor: AdoptOpenJDK,
  • runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre

重现问题的步骤

  1. git checkout master (931ce392fdc6bf675bbc3997917079c9ce3c9cb2)
  2. sh as-package.sh

期望的结果

编译成功

实际运行的结果

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/zhaowang/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 1.8.0_275, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] arthas-all                                                         [pom]
[INFO] math-game                                                          [jar]
[INFO] arthas-common                                                      [jar]
[INFO] arthas-spy                                                         [jar]
[INFO] arthas-vmtool                                                      [jar]
[INFO] arthas-tunnel-common                                               [jar]
[INFO] arthas-tunnel-client                                               [jar]
[INFO] arthas-memorycompiler                                              [jar]
[INFO] arthas-core                                                        [jar]
[INFO] arthas-agent                                                       [jar]
[INFO] arthas-client                                                      [jar]
[INFO] arthas-boot                                                        [jar]
[INFO] arthas-agent-attach                                                [jar]
[INFO] arthas-site                                                        [jar]
[INFO] arthas-packaging                                                   [jar]
[INFO] arthas-spring-boot-starter                                         [jar]
[INFO] arthas-testcase                                                    [jar]
[INFO] arthas-tunnel-server                                               [jar]
[INFO] 
[INFO] --------------------< com.taobao.arthas:arthas-all >--------------------
[INFO] Building arthas-all 3.5.6                                         [1/18]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-all ---
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-all ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/.flattened-pom.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-all ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-all ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] argLine set to empty
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-all ---
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:flatten (flatten) @ arthas-all ---
[INFO] Generating flattened POM of project com.taobao.arthas:arthas-all:pom:3.5.6...
[WARNING] FlattenMode minimum is deprecated!
[INFO] 
[INFO] >>> maven-source-plugin:3.2.1:jar (attach-sources) > generate-sources @ arthas-all >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-all ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-all ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-all ---
[INFO] 
[INFO] <<< maven-source-plugin:3.2.1:jar (attach-sources) < generate-sources @ arthas-all <<<
[INFO] 
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar (attach-sources) @ arthas-all ---
[INFO] 
[INFO] --------------------< com.taobao.arthas:math-game >---------------------
[INFO] Building math-game 3.5.6                                          [2/18]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ math-game ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/math-game/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ math-game ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/math-game/.flattened-pom.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ math-game ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ math-game ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] argLine set to empty
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ math-game ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ math-game ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhaowang/company-git/com/arthas/math-game/src/main/resources
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:flatten (flatten) @ math-game ---
[INFO] Generating flattened POM of project com.taobao.arthas:math-game:jar:3.5.6...
[WARNING] FlattenMode minimum is deprecated!
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ math-game ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/zhaowang/company-git/com/arthas/math-game/target/classes
[WARNING] 未与 -source 1.6 一起设置引导类路径
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ math-game ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ math-game ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ math-game ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ math-game ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/math-game/target/math-game.jar
[INFO] 
[INFO] >>> maven-source-plugin:3.2.1:jar (attach-sources) > generate-sources @ math-game >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ math-game ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ math-game ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ math-game ---
[INFO] 
[INFO] <<< maven-source-plugin:3.2.1:jar (attach-sources) < generate-sources @ math-game <<<
[INFO] 
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar (attach-sources) @ math-game ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/math-game/target/math-game-sources.jar
[INFO] 
[INFO] ------------------< com.taobao.arthas:arthas-common >-------------------
[INFO] Building arthas-common 3.5.6                                      [3/18]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-common ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/common/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-common ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/common/.flattened-pom.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-common ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-common ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] argLine set to empty
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-common ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ arthas-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhaowang/company-git/com/arthas/common/src/main/resources
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:flatten (flatten) @ arthas-common ---
[INFO] Generating flattened POM of project com.taobao.arthas:arthas-common:jar:3.5.6...
[WARNING] FlattenMode minimum is deprecated!
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ arthas-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to /Users/zhaowang/company-git/com/arthas/common/target/classes
[WARNING] 未与 -source 1.6 一起设置引导类路径
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ arthas-common ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ arthas-common ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ arthas-common ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ arthas-common ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/common/target/arthas-common.jar
[INFO] 
[INFO] >>> maven-source-plugin:3.2.1:jar (attach-sources) > generate-sources @ arthas-common >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-common ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-common ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-common ---
[INFO] 
[INFO] <<< maven-source-plugin:3.2.1:jar (attach-sources) < generate-sources @ arthas-common <<<
[INFO] 
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar (attach-sources) @ arthas-common ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/common/target/arthas-common-sources.jar
[INFO] 
[INFO] --------------------< com.taobao.arthas:arthas-spy >--------------------
[INFO] Building arthas-spy 3.5.6                                         [4/18]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-spy ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/spy/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-spy ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/spy/.flattened-pom.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-spy ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-spy ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] argLine set to empty
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-spy ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ arthas-spy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhaowang/company-git/com/arthas/spy/src/main/resources
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:flatten (flatten) @ arthas-spy ---
[INFO] Generating flattened POM of project com.taobao.arthas:arthas-spy:jar:3.5.6...
[WARNING] FlattenMode minimum is deprecated!
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ arthas-spy ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/zhaowang/company-git/com/arthas/spy/target/classes
[WARNING] 未与 -source 1.6 一起设置引导类路径
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ arthas-spy ---
[INFO] Not copying test resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ arthas-spy ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ arthas-spy ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ arthas-spy ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/spy/target/arthas-spy.jar
[INFO] 
[INFO] >>> maven-source-plugin:3.2.1:jar (attach-sources) > generate-sources @ arthas-spy >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-spy ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-spy ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-spy ---
[INFO] 
[INFO] <<< maven-source-plugin:3.2.1:jar (attach-sources) < generate-sources @ arthas-spy <<<
[INFO] 
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar (attach-sources) @ arthas-spy ---
[INFO] Building jar: /Users/zhaowang/company-git/com/arthas/spy/target/arthas-spy-sources.jar
[INFO] 
[INFO] ------------------< com.taobao.arthas:arthas-vmtool >-------------------
[INFO] Building arthas-vmtool 3.5.6                                      [5/18]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-vmtool ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/arthas-vmtool/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-vmtool ---
[INFO] Deleting /Users/zhaowang/company-git/com/arthas/arthas-vmtool/.flattened-pom.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ arthas-vmtool ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (jacoco-initialize) @ arthas-vmtool ---
[INFO] Skipping JaCoCo execution because property jacoco.skip is set.
[INFO] argLine set to empty
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.1:revision (default) @ arthas-vmtool ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ arthas-vmtool ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/resources
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:flatten (flatten) @ arthas-vmtool ---
[INFO] Generating flattened POM of project com.taobao.arthas:arthas-vmtool:jar:3.5.6...
[WARNING] FlattenMode minimum is deprecated!
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ arthas-vmtool ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/classes
[WARNING] 未与 -source 1.6 一起设置引导类路径
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-11:javah (javah) @ arthas-vmtool ---
[INFO] /bin/sh -c cd '/Users/zhaowang/company-git/com/arthas/arthas-vmtool' && 'javah' '-d' '/Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/native/javah' '-classpath' '/Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/classes:/Users/zhaowang/company-git/com/arthas/common/target/arthas-common.jar' 'arthas.VmTool'
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-11:initialize (javah) @ arthas-vmtool ---
[INFO] 
[INFO] --- native-maven-plugin:1.0-alpha-11:compile (javah) @ arthas-vmtool ---
[INFO] /bin/sh -c cd '/Users/zhaowang/company-git/com/arthas/arthas-vmtool' && 'g++' '-arch' 'x86_64' '-arch' 'arm64' '-fpic' '-shared' '-o' '-I/Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src' '-I/Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/generated-sources/annotations' '-I/Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/native/javah' '-I/Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/head' '-I/Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/head/macos' '-o/Users/zhaowang/company-git/com/arthas/arthas-vmtool/target/objs/jni-library.o' '-c' '/Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp'
clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
note: '__uint128_t' declared here
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:70:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_wctype_t;
        ^
note: '__uint128_t' declared here
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:75:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
typedef __darwin_size_t        size_t;
        ^
In file included from /Users/zhaowang/company-git/com/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:118:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:76:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mbstate_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for arthas-all 3.5.6:
[INFO] 
[INFO] arthas-all ......................................... SUCCESS [  1.102 s]
[INFO] math-game .......................................... SUCCESS [  3.886 s]
[INFO] arthas-common ...................................... SUCCESS [  0.940 s]
[INFO] arthas-spy ......................................... SUCCESS [  0.154 s]
[INFO] arthas-vmtool ...................................... FAILURE [  4.331 s]
[INFO] arthas-tunnel-common ............................... SKIPPED
[INFO] arthas-tunnel-client ............................... SKIPPED
[INFO] arthas-memorycompiler .............................. SKIPPED
[INFO] arthas-core ........................................ SKIPPED
[INFO] arthas-agent ....................................... SKIPPED
[INFO] arthas-client ...................................... SKIPPED
[INFO] arthas-boot ........................................ SKIPPED
[INFO] arthas-agent-attach ................................ SKIPPED
[INFO] arthas-site ........................................ SKIPPED
[INFO] arthas-packaging ................................... SKIPPED
[INFO] arthas-spring-boot-starter ......................... SKIPPED
[INFO] arthas-testcase .................................... SKIPPED
[INFO] arthas-tunnel-server ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.015 s
[INFO] Finished at: 2022-03-04T19:56:24+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:native-maven-plugin:1.0-alpha-11:compile (javah) on project arthas-vmtool: Error executing command line. Exit code:1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :arthas-vmtool

OrezzerO avatar Mar 04 '22 11:03 OrezzerO

mvn package编译c/c++代码主要是用到了native-maven-plugin这个maven插件。

loongs-zhang avatar Mar 30 '22 15:03 loongs-zhang

Check it is 64bit of your gcc compiler.

lewiselau avatar Apr 09 '22 04:04 lewiselau