Skip to content
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

zig cc: fix wrapper in Git Bash #6014

Closed
wants to merge 1 commit into from
Closed

Conversation

Doekin
Copy link
Contributor

@Doekin Doekin commented Dec 27, 2024

When installing a Makefile-based package in Git Bash with the zig cc toolchain, the following error occurs:

checking for C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\cc.cmd ... no
checking for the c compiler (cc) ... cc.cmd
checkinfo: C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\cc.cmd: line 1: @echo: command not found
lld-link: error: could not open '%*': Invalid argument
C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe  -I. -Iinclude -m64 -target x86_64-windows-gnu -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f\"" -DENGINESDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG   -c -o apps/apps.o apps/apps.c
C:/Users/leemu/AppData/Local/Temp/.xmake/2/usr/bin/sh: line 1: C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe: No such file or directory

@Doekin Doekin marked this pull request as draft December 27, 2024 23:51
@Doekin

This comment was marked as outdated.

@Doekin Doekin changed the title zig cc: fix incorrect wrapper invocation by Makefile in Git Bash zig cc: fix wrapper in Git Bash Dec 28, 2024
@Doekin
Copy link
Contributor Author

Doekin commented Dec 28, 2024

Test Results per Build System

At 4f408ebd0

Shell XMake CMake Makefile
PowerShell Not tested
Git Bash ✔[1] ✔[2] ❌[3]

[1] The toolchain check failed, but the package was installed successfully

图片

[2] The toolchain check failed, but the package was installed successfully

图片

[3] .exe extension is incorrectly appended to the wrapper script

图片

$ xrepo install -vD -p mingw --toolchain=zig openssl

checking for C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\ar.cmd ... no
checking for the static library archiver (ar: C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\ar.cmd) ... no
checkinfo: C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\ranlib.cmd: line 1: @echo: command not found
ranlib: error: unable to open '%*': Invalid argument

checking for C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\ranlib.cmd ... no
checking for the archive index generator (ranlib: C:\Users\leemu\AppData\Local\Temp\.xmake\241228\zigcc\ranlib.cmd) ... no
perl Configure no-tests mingw64 no-shared --prefix=/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f --openssldir=/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f
Configuring OpenSSL version 1.1.1w (0x1010117fL) for mingw64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
checking for make ... ok
make -j14 VERBOSE=1 V=1
perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
make[1]: Entering directory 'C:/Users/leemu/AppData/Local/.xmake/cache/packages/2412/o/openssl/1.1.1-w/source'
make[1]: Leaving directory 'C:/Users/leemu/AppData/Local/.xmake/cache/packages/2412/o/openssl/1.1.1-w/source'
make[1]: Entering directory 'C:/Users/leemu/AppData/Local/.xmake/cache/packages/2412/o/openssl/1.1.1-w/source'
C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe  -I. -Iinclude -m64 -target x86_64-windows-gnu -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f\"" -DENGINESDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG   -c -o apps/app_rand.o apps/app_rand.c
C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe  -I. -Iinclude -m64 -target x86_64-windows-gnu -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f\"" -DENGINESDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG   -c -o apps/apps.o apps/apps.c
/usr/bin/sh: line 1: C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe: No such file or directory
C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe  -I. -Iinclude -m64 -target x86_64-windows-gnu -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f\"" -DENGINESDIR="\"/C/Users/leemu/AppData/Local/.xmake/packages/o/openssl/1.1.1-w/75058b3fb10245d58e33ad13eb444a0f/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG   -c -o apps/bf_prefix.o apps/bf_prefix.c
make[1]: *** [Makefile:685: apps/app_ran/usr/bin/sh: line 1: C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe: No such file or directory
d.o] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:687: apps/apps.o] Error 127
/usr/bin/sh: line 1: C:/Users/leemu/AppData/Local/Temp/.xmake/241228/zigcc/cc.cmd.exe: No such file or directory
make[1]: *** [Makefile:689: apps/bf_prefix.o] Error 127
make[1]: Leaving directory 'C:/Users/leemu/AppData/Local/.xmake/cache/packages/2412/o/openssl/1.1.1-w/source'
make: *** [Makefile:186: all] Error 2

At Doekin/xmake@9e409d9c6e

Shell XMake CMake Makefile
PowerShell Not tested
Git Bash

@Doekin

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant