-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xmake create has bug #314313
Comments
This looks like an issue with xmake not the nix package, I'll send over an updated xmake package once I've got it sorted |
Maybe https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/tools/build-managers/xmake/default.nix need to be modified? And xmake-core-sv is same as libsv. Should we use the latter during building of xmake @waruqi ? |
sure, libsv should be used. |
Even we edit % cat shell.nix
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
name = "hello";
buildInputs = [
xmake
];
}
% nix-shell
% xmake create -lc -Phello
create Desktop ...
error: cannot open file: xmake.lua, Not access because it is busy
% cd hello
% vi xmake.lua
% cat xmake.lua
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.c")
% xmake build
checking for platform ... linux
checking for architecture ... x86_64
[ 50%]: cache compiling.release src/main.c
[ 75%]: linking.release hello
error: /nix/store/bgcaxhhxswzvmxjbbgvvaximm5hwghz1-binutils-2.41/bin/ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu |
you can run I think this should be a gcc/clang compiler issue on nixos, nothing to do with xmake. |
❯ xmake build -rv
checking for platform ... linux
checking for architecture ... x86_64
checking for gcc ... /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/gcc
checking for zig ... no
checking for zig ... no
checking for nim ... no
checking for nim ... no
checking for gcc ... /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/gcc
checking for the c compiler (cc) ... gcc
checking for /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/gcc ... ok
checking for flags (-fPIC) ... ok
checking for flags (-O3) ... ok
checking for flags (-DNDEBUG) ... ok
[ 50%]: cache compiling.release src/main.c
/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/gcc -c -m64 -fvisibility=hidden -O3 -DNDEBUG -o build/.objs/hello/linux/x86_64/release/src/main.c.o src/main.c
checking for flags (-MMD -MF) ... ok
checking for flags (-fdiagnostics-color=always) ... ok
checking for ld ... /nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/ld
checking for the linker (ld) ... ld
[ 75%]: linking.release hello
/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/ld -o build/linux/x86_64/release/hello build/.objs/hello/linux/x86_64/release/src/main.c.o -m64 -s
error: /nix/store/bgcaxhhxswzvmxjbbgvvaximm5hwghz1-binutils-2.41/bin/ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu |
Maybe $LD is affecting xmake's detection of linkers. xmake should use g++/clang++ as a linker by default, not ld. |
You are right:
|
Now I must change shell.nix to make it work: { pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
name = "hello";
buildInputs = [
xmake
];
shellHook = ''
LD=$CC
'';
} |
For |
|
miss write permission |
|
The should be the bug of xmake. A repro steps: umask 222
sudo git clone https://github.com/xmake-io/xmake Now all files doesn't have write permission. |
Refer xmake-io/xmake#5138
Xmake Version
v2.9.1+20240422,
Operating System Version and Architecture
Linux 6.9.1
Describe Bug
Expected Behavior
Project Configuration
/
Additional Information and Error Logs
And xmake.lua generated by
xmake create
has permissionr--r--r--
. Why not use umask?The text was updated successfully, but these errors were encountered: