让 cygwin 识别我更新的 android ndk awk?
这开始是一个 Android 问题,但我认为变成了一个 linux/cygwin 问题。
Android ndk 附带了不合适的 awk 版本 - 此处提供最终报告< /a> - 所以我试图让 cygwin 接受我不想使用 ndk awk,而是使用 nawk 或 gawk。
记住我对 linux/cygwin 一无所知,这些是我的发现:
问题的第一部分已经得到解答 这里 所以我知道我需要将现有的 awk 重命名为 awk_ 这样它就不会被拾取(完成)。我需要将 cygwin 环境变量 HOST_AWk 设置为 gawk (或 nawk - 两者都由 cygwin 提供)。执行此操作的简单方法(对我来说)是在 Windows 中设置该环境变量 - 然后当 cygwin 运行时,它会从 Windows 导入所有环境内容。
所以我想我知道该怎么做,但是当我尝试直接在 eclipse (构建全部)或 bash 中的 cygwin 中进行构建时,HOST_AWK 的值似乎没有被拾取:
Barry@BARRY /cygdrive/c/data/eclipse/camfeeda/jni
$ ndk-build
make: awk: Command not found
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/DATA/eclipse/android/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
Barry@BARRY /cygdrive/c/data/eclipse/camfeeda/jni
$ printenv HOST_AWK
c:\cygwin\bin\gawk.exe
如你所见,我已经设置了 HOST_AWK到 gawk.exe 在正确的位置,但我已经尝试过:
HOST_AWK=c:\cygwin\bin\gawk.exe
HOST_AWK=c:\cygwin\bin\gawk
HOST_AWK=c:\cygwin\bin\nawk.exe
HOST_AWK=c:\cygwin\bin\nawk
并且我尝试使用正斜杠以防出现问题,但我仍然遇到相同的错误:(
我感觉好像我已经很接近了,但我无法完成最后一步。为什么 ndk-build 不读取环境变量 HOST_AWK 并完成这项枯燥的工作?!
非常感谢
Barry
编辑:我也尝试过:
HOST_AWK=/cygdrive/c/cygwin/bin/gawk.exe
等等,但是没有喜悦
B.
This starts off as an Android question but I think becomes a linux/cygwin question.
The Android ndk is shipped with an unsuitable version of awk - definitive report here - so I'm trying to get cygwin to accept that I don't want to use the ndk awk, but to use nawk or gawk instead.
Bearing in mind I know nothing about linux/cygwin, these are my discoveries:
The first part of the question has already been answered here so I know I need to rename the existing awk as awk_ so it isn't picked up (done). And I need to set the cygwin environment variable HOST_AWk to gawk (or nawk - both of which are supplied with cygwin). The easy way to do this (for me) is to set that environment variable in Windows - then when cygwin runs it imports all the environment stuff from Windows.
So I think I know what to do, but the value of HOST_AWK doesn't seem to be picked up when I try to do a build either directly in eclipse (build all) or in cygwin from bash:
Barry@BARRY /cygdrive/c/data/eclipse/camfeeda/jni
$ ndk-build
make: awk: Command not found
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/DATA/eclipse/android/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
Barry@BARRY /cygdrive/c/data/eclipse/camfeeda/jni
$ printenv HOST_AWK
c:\cygwin\bin\gawk.exe
As you see I have set HOST_AWK to gawk.exe in the correct location, but I've tried:
HOST_AWK=c:\cygwin\bin\gawk.exe
HOST_AWK=c:\cygwin\bin\gawk
HOST_AWK=c:\cygwin\bin\nawk.exe
HOST_AWK=c:\cygwin\bin\nawk
And I've tried using forward slashes in case that was the problem, but I still get the same error :(
I feel as if I am so close, but I can't make the last step. Why won't ndk-build read the environment variable HOST_AWK and do the dratted job?! Can anyone put me out of my misery?
Many thanks
Barry
Edit: I also tried:
HOST_AWK=/cygdrive/c/cygwin/bin/gawk.exe
etc, but no joy.
B.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,它只是删除/重命名 ndk-r7 附带的 awk.exe。他们一切正常。无需设置 HOST_AWK 环境变量。
For me it's just deleting/renaming awk.exe that is shipped with ndk-r7. And they everything works. No need for setting HOST_AWK env variable.