-
Notifications
You must be signed in to change notification settings - Fork 252
Build of GNU Make failed on Apple Silicon #936
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
Comments
This is a known issue with building make on Apple Silicon on macOS. I don't have access to such a machine to debug this so fixing this requires contributions from the community. |
To point anyone in the right direction - it seems configure has a check for eaccess which can define eaccess to access which from the error looks to be the behaviour needed for Apple Silicon. Someone with access to a Apple Silicon machine needs to track down why this test is giving the wrong results. |
How do you reproduce this? I tested on my M1 machine and building the toolchain directly, or the simple_make example works fine. Maybe because I have a full Xcode install though? |
@devillove084 are you setting up a custom toolchain or any additional features or copts when you get this failure? |
Here is the log for the eaccess check on my machine:
It looks like cc_wrapper.sh is hardcoding
Edit: Actually don't think that's the issue, when I disable the custom CC toolchain it still fails. Furthermore the build script is using the same |
I'm facing the same problem and I'd be glad to help debug this but I'm new to bazel and I would need some help to get me started on Bazel debugging and this module/plugin. Maybe if we can reach out in slack that would be easier/faster to debug live ? @jsharpe |
@darkrift are you setting any Feel free to reach out to me on slack but I am in the UK so timezones may make live debugging trickier! |
this actually works on main, after #894 was merged, but no version was released since. |
I too was seeing configure incorrectly detect symbols which were not available at compile time (in my case SYNC_FILE_RANGE while compiling postgres). I am unable to reproduce it now so I cannot confirm but I think the issue only existed when using "xcode command line tools". In my case I believe that one of the following commands fixed it:
If neither of those help you it also could have been launching the xcode GUI, walking through the wizards and then existing the GUI prior to a full command line rebuild of your bazel targets. |
@hochhaus Is there a way to get around the |
@kpark-hrp Unfortunately, I don't know of a way but I also didn't spend any time looking. If you find a solution could you please post the answer here? |
./lib/findprog-in.c:137:25: error: implicit declaration of function 'eaccess' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (eaccess (progpathname, X_OK) == 0)
^
./lib/findprog-in.c:137: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:211:21: error: implicit declaration of function 'eaccess' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (eaccess (progpathname, X_OK) == 0)
^
2 errors generated.
The text was updated successfully, but these errors were encountered: