LINK FLAGS "-z now" throws an error when cross-compiling
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- cmake, node.js
- 领域
- build-system
调研方向
检查第 178 行的 module.cmake,并使用提供的 CMake 工具链文件重现交叉编译命令。检查 LINK_FLAGS 设置如何传递到 x86_64-w64-mingw32 链接器,然后验证 hello-world-native.abi-93 目标是否能够在不使用不受支持的选项的情况下成功链接。
由索引模型根据 Issue 内容生成。
描述
I was using cmake-js in conjunction with cmake-node-module to cross-compile node modules for windows from linux. However at line number 178 of module.cmake the LINK_FLAGS "-z now" turns out to be invalid option for the linker x86_64-w64-mingw32-ld. I get the following output,
# Running the following command from a CMakeLists file dir to build the node modules
cmake-js compile --CDCMAKE_TOOLCHAIN_FILE=<path-to-cmake-toolchain-file>
# The configuring and generating are successful, and build files are written successfully.
# However, in the subsequent linking step I get the following output.
Scanning dependencies of target hello-world-native.abi-93
[ 3%] Building CXX object CMakeFiles/hello-world-native.abi-93.dir/src/hello_world.cpp.obj
[ 6%] Linking CXX shared library hello-world-native.abi-93.node
/usr/bin/x86_64-w64-mingw32-ld: unrecognized option '-z'
/usr/bin/x86_64-w64-mingw32-ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/hello-world-native.abi-93.dir/build.make:106: hello-world-native.abi-93.node] Error 1
make[1]: *** [CMakeFiles/Makefile2:131: CMakeFiles/hello-world-native.abi-93.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
ERR! OMG Process terminated: 2
- 主要语言
- CMake
- 星标
- 20
- 派生
- 3
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mapbox/cmake-node-module 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
mapbox/cmake-node-module#1 · 1 条评论 ·
查看 mapbox/cmake-node-module 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
bazel-contrib/rules_go#4726 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 85/100
HL7/fhir-ig-publisher#1375 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#122386 · 1 条评论 ·