Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cross compiling for Solaris SPARC on Ubuntu

42 views
Skip to first unread message

mde...@gmail.com

unread,
Jan 7, 2020, 2:31:52 PM1/7/20
to
I managed to build native Firefox in Ubuntu 19.10 by following the directions here: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build/Linux_and_MacOS_build_preparation

Now, also in Ubuntu I'd like to cross compile Firefox for Solaris (either 10 or 11) SPARC. But the only information I've been able to find is this: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Cross-compiling_Mozilla

But that contains the disclaimer that "If you have to ask "where do I get... or why doesn't 'X' work", then this isn't for you." So I guess it isn't for me. It seems like it should be possible according to the post: https://groups.google.com/forum/#!topicsearchin/mozilla.dev.builds/solaris;context-place=topic/mozilla.dev.builds/kAnRhBYi9f0/mozilla.dev.builds/BjfjLJmUQk8/mozilla.dev.builds/BjfjLJmUQk8

"For Solaris, it should still be possible to cross-compile Firefox to SPARC from x86."

And Oracle is sending out FF 68 in their Solaris 11.4 updates, so it should indeed be possible. The question is, how? Can anyone give me some pointers on how to do this, more along the lines of the first link above rather than the second? It would be nice if I could just say "./mach build --target=solaris-sparc" but something tells me that's not how it works. Thanks!

mde...@gmail.com

unread,
Feb 29, 2020, 3:04:06 PM2/29/20
to
Am I perhaps asking in the wrong place? I could really use some help here. I now have a complete Rust cross-compiler working and have set the various env vars and created a mozconfig file. But I'm getting this:

$ ../configure --target=sparcv9-sun-solaris
...
checking for the target C compiler... /usr/bin/clang
checking whether the target C compiler can be used... yes
checking the target C compiler version... 9.0.0
checking the target C compiler works... yes
checking for the target C++ compiler... /usr/bin/clang++
checking whether the target C++ compiler can be used... yes
checking the target C++ compiler version... 9.0.0
checking the target C++ compiler works... yes
checking for the host C compiler... /usr/bin/clang
checking whether the host C compiler can be used... yes
checking the host C compiler version... 9.0.0
checking the host C compiler works... yes
checking for the host C++ compiler... /usr/bin/clang++
checking whether the host C++ compiler can be used... yes
checking the host C++ compiler version... 9.0.0
checking the host C++ compiler works... yes
...
checking for rustc... /home/michele/.cargo/bin/rustc
checking for cargo... /home/michele/.cargo/bin/cargo
Actually using '/home/michele/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc'
Actually using '/home/michele/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo'
...

DEBUG: configure:4041: /usr/bin/clang -std=gnu99 --target=sparcv9-solaris2 -o conftest -Qunused-arguments conftest.c 1>&5
DEBUG: /usr/bin/ld: unrecognized option '-C'
DEBUG: /usr/bin/ld: use the --help option for usage information
DEBUG: clang: error: linker command failed with exit code 1 (use -v to see invocation)
DEBUG: configure: failed program was:
DEBUG: #line 4034 "configure"
DEBUG: #include "confdefs.h"
DEBUG:
DEBUG: int main() {
DEBUG:
DEBUG: ; return 0; }
DEBUG: configure: error: compiler is incompatible with sanitize options
ERROR: old-configure failed

It appears it's using the wrong target gcc and the wrong rustc too.

Part of the problem may be this (confusing) statement in the cross-compiling guide:

"The main thing to remember is that when --target=${xtarget_arch} is passed to configure, configure expects to find the compiler toolchain as ${xtarget_arch}-TOOL where TOOL is gcc, g++, ranlib, etc."

So if my target is "sparcv9-sun-solaris", then it's going to look for "sparcv9-sun-solaris-gcc"? Where? That's not a complete file specification. FWIW, mine is here:

/usr/sparcv9-solaris/solaris/cross/sparcv9-solaris2.11/bin/sparcv9-solaris2.11-gcc

Any help would be most appreciated.
0 new messages