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

bug: wheel build did NOT complete successfully in mac silicon #85

Open
roventine opened this issue May 18, 2024 · 3 comments
Open

bug: wheel build did NOT complete successfully in mac silicon #85

roventine opened this issue May 18, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@roventine
Copy link

Describe the bug

This happened when i build or install from source.
compiling lib/concat-filename.c...
compiling lib/findprog-in.c...
./lib/findprog-in.c:149:25: error: call to undeclared function 'eaccess'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (eaccess (progpathname, X_OK) == 0)
^
./lib/findprog-in.c:149:25: note: did you mean 'access'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:431:6: note: 'access' declared here
int access(const char *, int);
^
./lib/findprog-in.c:301:21: error: call to undeclared function 'eaccess'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (eaccess (progpathname, X_OK) == 0)
^
2 errors generated.
Compilation failed.
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make_tool_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make_tool_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make_tool_foreign_cc/BootstrapGNUMake.log

Target //:whispercpp_wheel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 13.996s, Critical Path: 13.63s
INFO: 29 processes: 8 internal, 20 darwin-sandbox, 1 local.
FAILED: Build did NOT complete successfully

To reproduce

Step to reproduce:
1、git clone https://github.com/AIWintermuteAI/whispercpp.git
2、cd whispercpp
3、git submodule update --init --recursive
4、there are two ways I have tried :
4.1、python3 -m pip install build
4.2、./tools/bazel build //:whispercpp_wheel

Expected behavior

No response

Environment

python 3.10
platfrom: mac os 14.4.1

@roventine roventine added the bug Something isn't working label May 18, 2024
@AIWintermuteAI
Copy link
Owner

Thanks for the report!
I just received it, for some reason GH didn't notify me about an open issue. I'll see if I can reproduce.
Meanwhile, would you like to try earlier version from this commit e46fd2d
I verified it manually that time, while the later commits were only tested with CI.

@AIWintermuteAI
Copy link
Owner

Looks like you're hitting bazel-contrib/rules_foreign_cc#859 (comment)
Try installing xcode (not the same as Xcode command line tools) and cleaning bazel cache afterwards?

@AIWintermuteAI
Copy link
Owner

Okay, so if you saw the discussion in rules_foregin_cc, the xcode version has nothing to do with it.

it seems very specific to a set of packages that are installed / aren't installed on the host and how the toolchain is configured.

It is definitely true, as I can reproduce the issue on my x86 Mac, but cannot on my M1 Mac, both running the same OS. Also the issue is not present in CI, as macos builds are green.

I'll leave this open and put label help-wanted, as I won't be fixing it by myself soon. Someone could follow the suggestion here

However I will state the same advice that I'll always give with regard to rules_foreign_cc; prefer to spend the effort you'd spend debugging issues with rules_foreign_cc on porting the project to native bazel BUILD files and submit those to the BCR; you'll benefit the wider ecosystem, achieving a more reliable scalable build.

and replace rules_foreign_cc with native bazel build for SDL. Or maybe (hopefully) I'll get rid of SDL completely.

@AIWintermuteAI AIWintermuteAI added the help wanted Extra attention is needed label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants