Git Product home page Git Product logo

Comments (16)

evandrix avatar evandrix commented on September 26, 2024

I have set ANDROID_NDK as instructed, and added the appropriate toolchain's gcc to PATH, and downloaded both NDK 32-bit and 64-bit.

from fb-adb.

dcolascione avatar dcolascione commented on September 26, 2024

Can you share config.log, or at least the portion relating to the error? I can build on 14.04.

from fb-adb.

jduck avatar jduck commented on September 26, 2024

See my comment on #6, perhaps that will work for you too.

from fb-adb.

evandrix avatar evandrix commented on September 26, 2024

hmm, I can't seem to get it to build on Mac OS X 10.9.4 either, encountering the same error message, even after trying your linked comment #6

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

configure: error: could not find Android cross-compiler for i686-pc-linux-android
configure: error: ../../stub-x86/configure failed for stub-x86

I had a similar issue on Mac. I resolved it by downgrading my NDK from "android-ndk-r10b" to "android-ndk-r10". No other changes were necessary.

from fb-adb.

dcolascione avatar dcolascione commented on September 26, 2024

Merged #6 here

from fb-adb.

dcolascione avatar dcolascione commented on September 26, 2024

The build works for me using NDKs r9b and r10b. I can't help debug build issues without a copy of all config.log files produced by the failed configure attempt.

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

@dcolascione apologies for the lack of detail. When experiencing problems, sometimes it is easy to mistakenly assume an issue is self evident. I dug into this a little more. The cause is actually that I'm using the 64b target NDK (android-ndk64-r10b-darwin-x86_64.tar.bz2). The 32b target NDK (android-ndk32-r10b-darwin-x86_64.tar.bz2) works fine. I can provide my config.log on request (GitHub only supports image attachments).

from fb-adb.

dcolascione avatar dcolascione commented on September 26, 2024

@niedzielski Thanks. I tested with both the 32-bit and 64-bit versions of the 10b NDK, but maybe there's something else different. Can you email your config.log to [email protected]?

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

@dcolascione sent!

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

This is no longer issue using r10c for Mac.

from fb-adb.

evandrix avatar evandrix commented on September 26, 2024

@niedzielski:

I had a similar issue on Mac. I resolved it by downgrading my NDK from "android-ndk-r10b" to "android-ndk-r10". No other changes were necessary.

This is no longer issue using r10c for Mac.

  • Which of the following "android-ndk-r10" worked for you?
http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86_64.tar.bz2
http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86_64.tar.bz2

None of them worked for me, esp. the ndk64's - which both failed in not being able to find i686-linux-android-gcc

  • Does it work using r10d for OSX - isn't it only meant to work on linux - seeing that it's trying to use i686-linux-android-gcc?

I couldn't get any r10{,a,b,c,d} to work on my OSX 10.10.1 - failed at step:

checking for i686-linux-android-gcc... i686-linux-android-gcc
checking whether the C compiler works... no
configure: error: in `/path/to/AndroidSDK/fb-adb/build/stub-x86':
configure: error: C compiler cannot create executables
  • Is it the case the fb-adb only supports the x86 ie. 32-bit version of the Android NDK?

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

I've only tried on Mac lately, android-ndk-r10d-darwin-x86_64.bin. I tested the build with the following command:

 fb-adb rcmd screencap -p  > screenshot-$(timestamp).png

Happy to share configs, binaries, etc as helpful.

from fb-adb.

evandrix avatar evandrix commented on September 26, 2024

@niedzielski: mmm, ok. I don't have access to my OSX (now @ work; have to wait till later this evening when I return home) but the command that you've quoted is for when fb-adb is already compiled & installed, right?

I'm still facing trouble getting configure to complete successfully (see previous historical posts in this issue) Reproducing the relevant extract from the failed configure run ([ and ] are added by me):

...
checking for i686-linux-android-gcc... [i686-linux-android-gcc]
checking whether the C compiler works... no
configure: error: in `/path/to/AndroidSDK/fb-adb/build/stub-x86':
configure: error: [C compiler cannot create executables]
...

So then you managed to get past this stage by export ANDROID_NDK=/path/to/extracted/version/of/android-ndk-r10d-darwin-x86_64.bin ?

from fb-adb.

niedzielski avatar niedzielski commented on September 26, 2024

I couldn't say definitively why my build passes but I do have NDK exported as you said. I use the 64b NDK because I'm running on a 64b host. Are you on a 32 or 64b Linux machine? From my fb-adb build directory, I can run file stub-x86*/toolchain/bin/i686-linux-android-gcc and see:

stub-x86-pic/toolchain/bin/i686-linux-android-gcc: Mach-O 64-bit executable x86_64
stub-x86/toolchain/bin/i686-linux-android-gcc:     Mach-O 64-bit executable x86_64

Anything telling in your config.log files?

from fb-adb.

evandrix avatar evandrix commented on September 26, 2024

Ah!! I finally managed to get it to build (using the latest r10d NDK for my platform - aside: it turns out that after r10, they decided to streamline it and just distribute a single version of the NDK per platform, so that there won't be the -ndk32- or -ndk64- paired with a x86/x86_64 suffix confusion anymore), after days of trying...

So, it turns out that I've stuck some custom export CXXFLAGS and export LDFLAGS in my $SHELL's .rc file. This was the main culprit behind the C compiler cannot create executables error I was encountering time and again.

After that, my make process choked on ptsname, warning that it's not thread-safe, and advising instead to switch it for ptsname_r. Bummer, because OSX apparently doesn't ship with this variant of the function. So instead I opted to modify configure.ac, to remove all instances of -Werror (treat all warnings as errors)

It failed again at the 2nd last step of make, because OSX's Xcode decide that they'd like to ship an old version of the assembler as (or GNU assembler gas if you prefer), which doesn't understand /stubs.s. There's some fixes for people who encounter this in other projects, like someone wrote a Perl script to do this in AndroidFFmpeg, but I just used cc (the clang-based one) instead of gcc, and it worked.

With all that, it now compiles nicely on OSX 10.10.1 (64-bit of course), as well as (X)Ubuntu 14.04.

I'm logging this notes in case anyone (especially the future me) is stuck and needs to refer to this.

Many thanks once again to @niedzielski for your help!

from fb-adb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.