[alibaba/arthas]arthas-vmtool 模块编译失败

2025-11-10 803 views
0
环境信息 jdk版本:1.8 操作系统版本: Darwin IT-C02YT26NLVDL.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64 重现问题的步骤 根目录执行mvn clean package -Dmaven.test.skip=true 实际运行的结果
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: x86_64
[INFO] os.detected.bitness: 64
[INFO] os.detected.version: 10.14
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 14
[INFO] os.detected.classifier: osx-x86_64
[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-channel-common                                              [jar]
[INFO] arthas-channel-client                                              [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] arthas-channel-server                                              [jar]
[INFO] arthas-channel-server-starter                                      [jar]
[INFO] arthas-channel-server-app                                          [jar]
[INFO] 
[INFO] --------------------< com.taobao.arthas:arthas-all >--------------------
[INFO] Building arthas-all 3.5.6                                         [1/23]
[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/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/23]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ math-game ---
[INFO] Deleting /Users/chencheng/IdeaProjects/arthas/math-game/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ math-game ---
[INFO] Deleting /Users/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/math-game/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/math-game/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/arthas/math-game/target/math-game-sources.jar
[INFO] 
[INFO] ------------------< com.taobao.arthas:arthas-common >-------------------
[INFO] Building arthas-common 3.5.6                                      [3/23]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-common ---
[INFO] Deleting /Users/chencheng/IdeaProjects/arthas/common/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-common ---
[INFO] Deleting /Users/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/common/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/common/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/arthas/common/target/arthas-common-sources.jar
[INFO] 
[INFO] --------------------< com.taobao.arthas:arthas-spy >--------------------
[INFO] Building arthas-spy 3.5.6                                         [4/23]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-spy ---
[INFO] Deleting /Users/chencheng/IdeaProjects/arthas/spy/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-spy ---
[INFO] Deleting /Users/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/spy/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/spy/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/arthas/spy/target/arthas-spy-sources.jar
[INFO] 
[INFO] ------------------< com.taobao.arthas:arthas-vmtool >-------------------
[INFO] Building arthas-vmtool 3.5.6                                      [5/23]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ arthas-vmtool ---
[INFO] Deleting /Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target
[INFO] 
[INFO] --- flatten-maven-plugin:1.2.2:clean (flatten-clean) @ arthas-vmtool ---
[INFO] Deleting /Users/chencheng/IdeaProjects/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] argLine set to -javaagent:/Users/chencheng/Software/maven_repo/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/jacoco.exec,excludes=com/taobao/arthas/core/view/ObjectViewTest*:com/taobao/arthas/core/model/ObjectRenderTest*
[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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/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/chencheng/IdeaProjects/arthas/arthas-vmtool' && 'javah' '-d' '/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/native/javah' '-classpath' '/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/classes:/Users/chencheng/IdeaProjects/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/chencheng/IdeaProjects/arthas/arthas-vmtool' && 'g++' '-arch' 'x86_64' '-arch' 'arm64' '-fpic' '-shared' '-o' '-I/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src' '-I/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/generated-sources/annotations' '-I/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/native/javah' '-I/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/head' '-I/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/head/macos' '-o/Users/chencheng/IdeaProjects/arthas/arthas-vmtool/target/objs/jni-library.o' '-c' '/Users/chencheng/IdeaProjects/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/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/cdefs.h:784:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from /Users/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from /Users/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:70:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:70:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:75:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/chencheng/IdeaProjects/arthas/arthas-vmtool/src/main/native/src/jni-library.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/wchar.h:76:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_mbstate_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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 [  0.944 s]
[INFO] math-game .......................................... SUCCESS [  1.781 s]
[INFO] arthas-common ...................................... SUCCESS [  0.513 s]
[INFO] arthas-spy ......................................... SUCCESS [  0.150 s]
[INFO] arthas-vmtool ...................................... FAILURE [  1.858 s]
[INFO] arthas-tunnel-common ............................... SKIPPED
[INFO] arthas-tunnel-client ............................... SKIPPED
[INFO] arthas-memorycompiler .............................. SKIPPED
[INFO] arthas-channel-common .............................. SKIPPED
[INFO] arthas-channel-client .............................. 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] arthas-channel-server .............................. SKIPPED
[INFO] arthas-channel-server-starter ...................... SKIPPED
[INFO] arthas-channel-server-app .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.069 s
[INFO] Finished at: 2022-05-12T17:55:37+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 <goals> -rf :arthas-vmtool

回答

5

mac os arm xcode版本是10.14

0

是32位的CPU吗?

8

64位

6

根本原因应该是指令集的兼容问题,arm64兼容x86_64,x86_64不兼容arm64。

9

全局搜索下-arch x86_64 -arch arm64 然后把它改成-arch x86_64 再mvn打包,就可以了。

如果你乐意的话,可以尝试提交个PR。

0

@dragon-zhang 这个pr会导致在非arm的 mac上编译出来的 vmtool功能不全,不能跑在arm mac上。

这个issue的原因,我觉得是os/xcode版本太老了,不支持 arm 架构。

因为github action里的mac也是 x64 的,并不是arm的。 https://github.com/alibaba/arthas/blob/master/.github/workflows/build-vmtool.yaml#L24

7

@hengyunabc 好的。

@cc19931002 尝试升级下xcode/os呢?

9

看样子是交叉编译的时候,arm的mac可以交叉编译出x64 mac能用的dylib,x64 mac不能交叉编译出arm mac能用的dylib。 全局搜索下<os_arch_option>-arch x86_64 -arch arm64</os_arch_option>

然后把它改成<os_arch_option>-arch x86_64</os_arch_option> 再mvn打包,就可以了。

4

最后是怎么解决的呢,我按照这个修改,还是报错

全局搜索下-arch x86_64 -arch arm64 然后把它改成-arch x86_64 再mvn打包,就可以了。