Re: arm-linux-androideabi-gcc cannot follow symlinks on cygwin

1,147 views
Skip to first unread message

David Turner

unread,
Aug 22, 2012, 3:51:54 AM8/22/12
to andro...@googlegroups.com
This is normal, the toolchain is a normal Windows binary, i.e. it's not linked against the Cygwin runtime, and this cannot use Cygwin symlinks.

(On the other hand, it's about 3x faster, and can be used with ndk-build.cmd directly).

This is unlikely to change, I recommend to put your sources in directories that are accessible from cmd.exe instead.

On Wed, Aug 22, 2012 at 1:23 AM, Jagan <jag...@gmail.com> wrote:
I created a simple file called hello_world.c. Filename and contents are irrelevant here because just want gcc to find the files.

I put the file inside a folder which is a symlink to another folder arm-linux-androideabi-gcc cannot find the file while regular cygwin gcc can.
Please ignore error from compilation on hello world.c with arm-linux-androideabi-gcc. Its just to illustrate that cygwin can find the files. 

See output
rjagannath@rjagannath /cygdrive/c/android-ndk-r8b
$ ls -al scratch
lrwxrwxrwx 1 rjagannath Domain Users 20 Aug 21 16:18 scratch -> /cygdrive/c/scratch/

=====================GCC Works ===========================
rjagannath@rjagannath /cygdrive/c/android-ndk-r8b
$ gcc hello_world.c

rjagannath@rjagannath /cygdrive/c/android-ndk-r8b
$ gcc scratch/hello_world.c

================arm-linux-androideabi-gcc DOES NOT WORK================

rjagannath@rjagannath /cygdrive/c/android-ndk-r8b
$ ./toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gcc hello_world.c
In file included from hello_world.c:1:0:
c:\android-ndk-r8b\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.6.x-google/include-fixed/stdio.h:50:23: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.

rjagannath@rjagannath /cygdrive/c/android-ndk-r8b
$  ./toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gcc scratch/hello_world.c
arm-linux-androideabi-gcc.exe: error: scratch/hello_world.c: No such file or directory
arm-linux-androideabi-gcc.exe: fatal error: no input files
compilation terminated.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/Ylq-5D9VussJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Ian Ni-Lewis

unread,
Aug 22, 2012, 2:07:54 PM8/22/12
to andro...@googlegroups.com
IIRC Windows command "mklink" will create a real NTFS symlink, which Cygwin can follow. (I think that's the right command--no Windows machine in front of me to check right now...)
--
Ian Ni-Lewis
Developer Advocate
Android Developer Relations


Ray Donnelly

unread,
Aug 22, 2012, 4:02:18 PM8/22/12
to andro...@googlegroups.com
Yeah, it's:

mklink /d link-name target
Reply all
Reply to author
Forward
0 new messages