LINK FLAGS "-z now" throws an error when cross-compiling
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cmake, node.js
- Lĩnh vực
- build-system
Hướng nghiên cứu
Kiểm tra module.cmake tại dòng 178 và tái hiện lệnh biên dịch chéo bằng tệp toolchain CMake được cung cấp. Kiểm tra cách thiết lập LINK_FLAGS được truyền đến trình liên kết x86_64-w64-mingw32, sau đó xác minh rằng target hello-world-native.abi-93 liên kết thành công mà không có tùy chọn không được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- CMake
- Star
- 20
- Fork
- 3
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/cmake-node-module
-
Running the example fails Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
mapbox/cmake-node-module#1 · 1 bình luận ·
Tất cả issue của mapbox/cmake-node-module
Issue tương tự
-
nix: vendorHash is outdated Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
typelevel/sbt-typelevel#929 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openSUSE/python-rpm-macros#219 ·
-
HMR stops working Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Qiskit/mcp-servers#221 ·