Bug 1477487 Comment 16 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It worked for me also.

But when trying a robocop test I see

> ▶  ./mach robocop --serve
> Error running mach:
>
>     ['robocop', '--serve']
>
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> ADBTimeoutError: args: /Users/petru.lingurar/.mozbuild/android-sdk-macosx/platform-tools/adb -s 2259f4e8480d7ece wait-for-device shell su 0 id; echo adb_returncode=$?, exitcode: None, stdout: 
> 
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mochitest/mach_commands.py", line 572, in run_robocop
>     device_serial=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 237, in verify_android_device
>     device = _get_device(build_obj.substs, device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 101, in _get_device
>     device = ADBDevice(adb=adb_path, verbose=verbose_logging, device=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 642, in __init__
>     self.shell_output("su 0 id", timeout=timeout).find(uid) != -1):
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 1443, in shell_output
>     raise ADBTimeoutError("%s" % adb_process)

Don't really know it's because of this patch or not. Tested on a real device. `com.android.shell` was granted su.
It worked for me also but just when targeting `arm-linux-androideabi`
 
Otherwise when targeting 
`x86_64-linux-android` or
`x86_64-linux-android` I get
> 0:09.40 checking whether the C compiler (/Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -fno-short-enums -fno-exceptions  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld) works... no
> 0:09.40 configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.40 DEBUG: <truncated - see config.log for full output>
> 0:09.40 DEBUG: configure:1360: /Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -o conftest -fno-short-enums -fno-exceptions  -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include/x86_64-linux-android -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 -D__ANDROID_API__=21  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld conftest.c  1>&5
> 0:09.40 DEBUG: configure:1357:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.40 DEBUG: ^
> 0:09.40 DEBUG: 1 warning generated.
> 0:09.40 DEBUG: ld.lld: error: cannot open crtbegin_dynamic.o: No such file or directory
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: cannot open crtend_android.o: No such file or directory
> 0:09.40 DEBUG: clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
> 0:09.40 DEBUG: configure: failed program was:
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: #line 1355 "configure"
> 0:09.40 DEBUG: #include "confdefs.h"
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.41 DEBUG: configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.41 ERROR: old-configure failed
> 0:09.44 *** Fix above errors and then restart with               "./mach build"
> 0:09.44 make: *** [configure] Error 1

`i686-linux-android` or
`aarch64-linux-android`
gives mainly the same error but from `ld.lld` just
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc



Also when trying a robocop test I see

> ▶  ./mach robocop --serve
> Error running mach:
>
>     ['robocop', '--serve']
>
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> ADBTimeoutError: args: /Users/petru.lingurar/.mozbuild/android-sdk-macosx/platform-tools/adb -s 2259f4e8480d7ece wait-for-device shell su 0 id; echo adb_returncode=$?, exitcode: None, stdout: 
> 
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mochitest/mach_commands.py", line 572, in run_robocop
>     device_serial=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 237, in verify_android_device
>     device = _get_device(build_obj.substs, device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 101, in _get_device
>     device = ADBDevice(adb=adb_path, verbose=verbose_logging, device=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 642, in __init__
>     self.shell_output("su 0 id", timeout=timeout).find(uid) != -1):
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 1443, in shell_output
>     raise ADBTimeoutError("%s" % adb_process)

Don't really know it's because of this patch or not. Tested on a real device. `com.android.shell` was granted su.
For the ADBTimeout I see there's already a ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=1510059
It worked for me also but just when targeting `arm-linux-androideabi`
 
Otherwise when targeting 
`x86_64-linux-android` I get
> 0:09.40 checking whether the C compiler (/Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -fno-short-enums -fno-exceptions  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld) works... no
> 0:09.40 configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.40 DEBUG: <truncated - see config.log for full output>
> 0:09.40 DEBUG: configure:1360: /Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -o conftest -fno-short-enums -fno-exceptions  -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include/x86_64-linux-android -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 -D__ANDROID_API__=21  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld conftest.c  1>&5
> 0:09.40 DEBUG: configure:1357:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.40 DEBUG: ^
> 0:09.40 DEBUG: 1 warning generated.
> 0:09.40 DEBUG: ld.lld: error: cannot open crtbegin_dynamic.o: No such file or directory
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: cannot open crtend_android.o: No such file or directory
> 0:09.40 DEBUG: clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
> 0:09.40 DEBUG: configure: failed program was:
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: #line 1355 "configure"
> 0:09.40 DEBUG: #include "confdefs.h"
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.41 DEBUG: configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.41 ERROR: old-configure failed
> 0:09.44 *** Fix above errors and then restart with               "./mach build"
> 0:09.44 make: *** [configure] Error 1

`i686-linux-android` or
`aarch64-linux-android`
gives mainly the same error but from `ld.lld` just
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc



Also when trying a robocop test I see

> ▶  ./mach robocop --serve
> Error running mach:
>
>     ['robocop', '--serve']
>
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> ADBTimeoutError: args: /Users/petru.lingurar/.mozbuild/android-sdk-macosx/platform-tools/adb -s 2259f4e8480d7ece wait-for-device shell su 0 id; echo adb_returncode=$?, exitcode: None, stdout: 
> 
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mochitest/mach_commands.py", line 572, in run_robocop
>     device_serial=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 237, in verify_android_device
>     device = _get_device(build_obj.substs, device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 101, in _get_device
>     device = ADBDevice(adb=adb_path, verbose=verbose_logging, device=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 642, in __init__
>     self.shell_output("su 0 id", timeout=timeout).find(uid) != -1):
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 1443, in shell_output
>     raise ADBTimeoutError("%s" % adb_process)

Don't really know it's because of this patch or not. Tested on a real device. `com.android.shell` was granted su.
For the ADBTimeout I see there's already a ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=1510059
It worked for me also but ony when targeting `arm-linux-androideabi`
 
Otherwise when targeting 
`x86_64-linux-android` I get
> 0:09.40 checking whether the C compiler (/Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -fno-short-enums -fno-exceptions  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld) works... no
> 0:09.40 configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.40 DEBUG: <truncated - see config.log for full output>
> 0:09.40 DEBUG: configure:1360: /Users/petru.lingurar/.mozbuild/clang/bin/clang -std=gnu99 --target=arm-linux-androideabi -o conftest -fno-short-enums -fno-exceptions  -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include/x86_64-linux-android -isystem /Users/petru.lingurar/.mozbuild/android-ndk-r17b/sysroot/usr/include -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 -D__ANDROID_API__=21  -L/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib -Wl,-rpath-link=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64/usr/lib --sysroot=/Users/petru.lingurar/.mozbuild/android-ndk-r17b/platforms/android-21/arch-x86_64 -Wl,--allow-shlib-undefined -gcc-toolchain /Users/petru.lingurar/.mozbuild/android-ndk-r17b/toolchains/x86_64-4.9/prebuilt/darwin-x86_64  -fuse-ld=lld conftest.c  1>&5
> 0:09.40 DEBUG: configure:1357:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.40 DEBUG: ^
> 0:09.40 DEBUG: 1 warning generated.
> 0:09.40 DEBUG: ld.lld: error: cannot open crtbegin_dynamic.o: No such file or directory
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.40 DEBUG: ld.lld: error: unable to find library -ldl
> 0:09.40 DEBUG: ld.lld: error: cannot open crtend_android.o: No such file or directory
> 0:09.40 DEBUG: clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
> 0:09.40 DEBUG: configure: failed program was:
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: #line 1355 "configure"
> 0:09.40 DEBUG: #include "confdefs.h"
> 0:09.40 DEBUG:
> 0:09.40 DEBUG: main(){return(0);}
> 0:09.41 DEBUG: configure: error: installation or configuration problem: C compiler cannot create executables.
> 0:09.41 ERROR: old-configure failed
> 0:09.44 *** Fix above errors and then restart with               "./mach build"
> 0:09.44 make: *** [configure] Error 1

`i686-linux-android` or
`aarch64-linux-android`
gives mainly the same error but from `ld.lld` just
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc
> 0:09.91 DEBUG: ld.lld: error: unable to find library -lgcc



Also when trying a robocop test I see

> ▶  ./mach robocop --serve
> Error running mach:
>
>     ['robocop', '--serve']
>
> The error occurred in code that was called by the mach command. This is either
> a bug in the called code itself or in the way that mach is calling it.
> 
> You should consider filing a bug for this issue.
> 
> If filing a bug, please include the full output of mach, including this error
> message.
> 
> The details of the failure are as follows:
> 
> ADBTimeoutError: args: /Users/petru.lingurar/.mozbuild/android-sdk-macosx/platform-tools/adb -s 2259f4e8480d7ece wait-for-device shell su 0 id; echo adb_returncode=$?, exitcode: None, stdout: 
> 
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mochitest/mach_commands.py", line 572, in run_robocop
>     device_serial=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 237, in verify_android_device
>     device = _get_device(build_obj.substs, device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 101, in _get_device
>     device = ADBDevice(adb=adb_path, verbose=verbose_logging, device=device_serial)
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 642, in __init__
>     self.shell_output("su 0 id", timeout=timeout).find(uid) != -1):
>   File "/Users/petru.lingurar/Projects/Clients/mozilla-unified/testing/mozbase/mozdevice/mozdevice/adb.py", line 1443, in shell_output
>     raise ADBTimeoutError("%s" % adb_process)

Don't really know if it's because of this patch or not. Tested on a real device. `com.android.shell` was granted su.
For the ADBTimeout I see there's already a ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=1510059

Back to Bug 1477487 Comment 16