I am trying to cross compile Firefox (version 39) for Arm. But, I am getting the following error:

/firefox-39.0/mozilla-release-849542617a46/build/unix/gold/ld: fatal error
/armv7l-linux-gnueabi/toolchain/lib/crt1.o: unsupported ELF machine number 40
collect2: error: ld returned 1 exit status
configure: error: couldn't compile a simple C file

What should I do ?

  • Are you compiling in a virtual? And if so how is it setup?
    – Torxed
    Commented Jan 12, 2016 at 18:29
  • No I am not compiling in a virtual.
    – Som
    Commented Jan 12, 2016 at 18:45
  • Are you compiling on a 64/32 bit machine? If so I have never heard that this is possible without a virtenv
    – Torxed
    Commented Jan 12, 2016 at 18:47
  • I using a 32 bit machine. I think we can do it... But I am not sure.
    – Som
    Commented Jan 12, 2016 at 18:55
  • Sorry yes ofc it's supported but question is how you compile it and with which tool chain. How are you executing the compile
    – Torxed
    Commented Jan 12, 2016 at 18:58

1 Answer 1


I got the same error after I cross-compiled Qt for an iMX6 device. I usually ran a build script from the build directory, and my script assumed that, but this time I forgot, and the build happened in my top level ~/dev directory. Somehow (I have no idea how), this affected my regular desktop build of Qt, so that any project I built with that desktop build would somehow be affected by the misplaced embedded build.

The fix was to remove the misplaced embedded directories (and add an extra cd $qtBuildDir step to my build script ;)).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .