Can't require lua due to not finding ar #7380
Replies: 1 comment
-
|
Writing this out helped me figure it out... Suppose it's because I have multiple mingw directories. Will leave the thread up in case anyone else has the problem |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure if this is a bug or if I'm doing something wrong, so figured I'd post here instead of opening an issue.
I'm developing a command-line utility in C, on windows 10 using Git bash mingw. Everything works fine normally, but I am trying to add liblua, and adding it as a requirement fails at 60% because it is not able to build lzio.c. I am able to install other requirements, (curl & yyjson) but this one specifically fails. Seems as though it isn't able to find the 'ar' archiving program.
Summary, it says it can't run 'ar', then doesn't have the files it needs, and then quits.
But I DO have ar installed, by chocolatey. It is in my PATH variable. Seems to be the correct program.
That one is a link to the mingw executable, so I'm pretty sure it's exactly what I need. I was thinking maybe the problem was chocolatey, but xmake IS also looking in chocolatey's bin directory to compile this same exact file, but for gcc and not for ar
It is only looking in C:\Program Files\Git\mingw64\bin, and ar is not installed there. There isn't an executable with the naming convention spelling out the mingw platform. I tried to install ar from xrepo, but it isn't there. Updated xmake to the most recent version, still no. I updated Git for Windows the most recent version to see if it was added recently but no luck. That folder only has bash, git, and sh in it and it doesn't seem like anything else is meant to be there. I tried to make a symbolic link in that directory but it gave a permission denied error, and that seems like a bad solution anyway. I created an alias to point the x86_64...-ar=ar in the path, didn't work. I was trying to figure out how to manually tell xmake to check a different path just for this one program, but wasn't able to find anything in the documentation for setting specific arbitrary programs that might be required by other packages. I want to be able to compile this on new machines under new installations without a complicated setup process for something so small.
My build script is very simple;
Is there a simple way to add a line to xmake.lua that will tell it where to look for ar? Or even just to always check my PATH variable for programs? Is there possibly a different way to install it so that xmake can find it? Is the problem in the lua package itself and not my xmake.lua config?
Hope someone can help. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions