Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no merge] [help] firefox-esr: update to 60 #3516

Closed
wants to merge 13 commits into from

Conversation

yopito
Copy link
Contributor

@yopito yopito commented Oct 6, 2018

as discussed today on #xbps:

  • runtime untested: not enough resources to achieve personal build (only 2GB of RAM)
  • as for ff, probably won't be cross-build until rust: cross build (&template cleanup) #3233
  • try to package as close as possible of ff 62 packaging

ping @Cogitri : please try building (and test) if you have enough time and resources.

@Johnnynator
Copy link
Member

Johnnynator commented Oct 6, 2018

the sndio build options is broken as of now.
0:05.54 mozbuild.configure.options.InvalidOptionError: Unknown option: --enable-sndio
Also you shoudl add [ci skip] to the commit message so that travis doesn't try to build firefox

@yopito
Copy link
Contributor Author

yopito commented Oct 6, 2018

bad mix of commits, sorry. I fix asap.

@Johnnynator
Copy link
Member

Johnnynator commented Oct 6, 2018

index: added `firefox-esr-60.2.2_1' (x86_64). Compiled fine for x86_64.
Edit: Also runs fine on 86_64.

@yopito
Copy link
Contributor Author

yopito commented Oct 6, 2018

@Johnnynator : thanks for your build. Will you have time to test the runtime ?

@Johnnynator
Copy link
Member

@Johnnynator : thanks for your build. Will you have time to test the runtime ?

Read my Edit in my last post. Yep runtime was fine.
I'm currently compiling for musl.

@Cogitri
Copy link
Contributor

Cogitri commented Oct 6, 2018

Will test if this cross builds to aarch64 tomorrow

@Johnnynator
Copy link
Member

Doesn't compile on musl

18:15.47 In file included from /builddir/firefox-60.2.2/obj-x86_64-unknown-linux-musl/tools/profiler/Unified_cpp_tools_profiler1.cpp:47:
18:15.47 /builddir/firefox-60.2.2/tools/profiler/lul/LulMain.cpp: In constructor 'lul::LUL::LUL(void (*)(const char*))':
18:15.47 /builddir/firefox-60.2.2/tools/profiler/lul/LulMain.cpp:681:20: error: 'gettid' was not declared in this scope
18:15.47    , mAdminThreadId(gettid())
18:15.47                     ^~~~~~
18:15.47 /builddir/firefox-60.2.2/tools/profiler/lul/LulMain.cpp:681:20: note: suggested alternative: 'getgid'
18:15.47    , mAdminThreadId(gettid())
18:15.47                     ^~~~~~
18:15.47                     getgid
18:17.49 In file included from /builddir/firefox-60.2.2/tools/profiler/core/platform.cpp:2119,
18:17.49                  from /builddir/firefox-60.2.2/obj-x86_64-unknown-linux-musl/tools/profiler/Unified_cpp_tools_profiler0.cpp:65:
18:17.49 /builddir/firefox-60.2.2/tools/profiler/core/platform-linux-android.cpp: In static member function 'static int Thread::GetCurrentId()':
18:17.49 /builddir/firefox-60.2.2/tools/profiler/core/platform-linux-android.cpp:75:10: error: 'gettid' was not declared in this scope
18:17.49    return gettid();
18:17.49           ^~~~~~
18:17.49 /builddir/firefox-60.2.2/tools/profiler/core/platform-linux-android.cpp:75:10: note: suggested alternative: 'getgid'
18:17.49    return gettid();
18:17.49           ^~~~~~
18:17.49           getgid

@Cogitri
Copy link
Contributor

Cogitri commented Oct 7, 2018

Okay, seems like cross is broken. With --disable-elf-hack (or without any argument):
mozbuild.configure.options.InvalidOptionError: --disable-elf-hack is not available in this configuration

With --enable-elf-hack:
mozbuild.configure.options.InvalidOptionError: --enable-elf-hack is not available in this configuration

Not quite sure what it's trying to tell me with that :P

@yopito
Copy link
Contributor Author

yopito commented Oct 8, 2018

Thanks for your inputs.
added fix for musl build.
my x86_64-musl build reach the same status than x86_64 (fail on libxul.so since memory lacks)

@Cogitri : I don't catch: you tried cross-build on ff-esr with #3233 fixed ?

Edit: i686 fails at the very beginning, I'm working on it.

@Cogitri
Copy link
Contributor

Cogitri commented Oct 8, 2018

@Cogitri : I don't catch: you tried cross-build on ff-esr with #3233 fixed ?

Yes. Seems like something's broken about the elf-hack option when cross compiling - will look into it in a bit.

@Johnnynator
Copy link
Member

Thanks for your inputs.
added fix for musl build.
my x86_64-musl build reach the same status than x86_64 (fail on libxul.so since memory lacks)

index: added `firefox-esr-60.2.2_1' (x86_64-musl). Yep compiles now.

@yopito
Copy link
Contributor Author

yopito commented Oct 11, 2018

Fails early for i686, see below.
rustc fails to cross-build. I know how rustc should be launched (see my guess below), but don't know to make it happen within firefox-esr build.

output log:

 0:13.76 checking for rustc... /usr/bin/rustc                                                  
 0:13.76 checking for cargo... /usr/bin/cargo                                                  
 0:14.26 checking rustc version... 1.28.0                                                      
 0:14.36 checking cargo version... 1.29.0                                                      
 0:14.83 DEBUG: Executing: `/usr/bin/rustc --crate-type staticlib --target=i686-unknown-linux-gnu -o /tmp/conftestE2268d.rlib /tmp/conftestwWHUnc.rs`                                         
 0:14.84 DEBUG: The command returned non-zero exit status 101.                                 
 0:14.84 DEBUG: Its error output was:                                                          
 0:14.84 DEBUG: | error[E0463]: can't find crate for `std`                                     
 0:14.84 DEBUG: |   |                                                                          
 0:14.84 DEBUG: |   = note: the `i686-unknown-linux-gnu` target may not be installed           
 0:14.84 DEBUG: |                                                                              
 0:14.84 DEBUG: | error: aborting due to previous error                                        
 0:14.84 DEBUG: |                                                                              
 0:14.84 DEBUG: | For more information about this error, try `rustc --explain E0463`.          
 0:14.84 ERROR: Cannot compile for i686-pc-linux-gnu with /usr/bin/rustc                       
 0:14.84 The target may be unsupported, or you may not have                                    
 0:14.84 a rust std library for that target installed. Try:                                    
 0:14.84                                                                                       
 0:14.84   rustup target add i686-unknown-linux-gnu                                            
 0:14.84                                                                                       
 0:14.92 *** Fix above errors and then restart with\                                           
 0:14.92                "/usr/bin/make -f client.mk build"                                     
 0:14.92 make: *** [client.mk:149: configure] Error 1                                          

After testing, I think that rustc should work if called that way, with the additional directives "-L" and "-C":

/usr/bin/rustc --crate-type staticlib --target=i686-unknown-linux-gnu \
                         -L /usr/i686-linux-gnu/lib/rustlib/i686-unknown-linux-gnu/lib \
                         -C linker=i686-linux-gnu-gcc \
                        -o /tmp/conftestE2268d.rlib /tmp/conftestwWHUnc.rs

@yopito
Copy link
Contributor Author

yopito commented Oct 11, 2018

my tests to debug cross-build with rustc: https://gist.github.com/yopito/e7b86aca2ffa4c833fd420d651bcf2e8

@Cogitri
Copy link
Contributor

Cogitri commented Oct 11, 2018

After testing, I think that rustc should work if called that way, with the additional directives "-L" and "-C"

Wait for #3558 which sets RUSTFLAGS in the build style, that will fix it.

@Cogitri
Copy link
Contributor

Cogitri commented Oct 20, 2018

Here's what I've done so far:

https://gist.github.com/e4c41e39fab7e7065993d06e7310de88

It builds half way through but fails during build, build log:

aarch64: https://gist.github.com/ef7885c541e3c93ff49880de3990165b

aarch64-musl: https://gist.github.com/7ab6ca5a750e985370fb0f293641436d

@yopito
Copy link
Contributor Author

yopito commented Oct 21, 2018

@Cogitri: many thanks for your work and ideas. picked many of them, let's see what's happen now.

@yopito yopito changed the title [no merge] [help] firefox-esr: update to 60.2.2 [no merge] [help] firefox-esr: update to 60 Nov 11, 2018
@yopito
Copy link
Contributor Author

yopito commented Nov 11, 2018

last WIP: updated to 60.3.0. Crossbuild is better but still fails. Travis CI is still unable to start building with unrelated python error ?

@yopito
Copy link
Contributor Author

yopito commented Nov 11, 2018

personal crossbuild output:

my comments:

  • gcc: -m32 and -m64 options available only for arch == x86_64 (ref: https://linux.die.net/man/1/gcc)
  • aarch64 and i686 have trouble both with libloading, but msg error is different: "64bit is not available" with i686 and "-m64 option unrecognized" if aarch64
  • libloading in firefox build:
    • the fail is not about compile but about rust/cargo link : "cargo:rustc-link-lib=dl"; might be the first case in the build that is about it.
    • which of crossbuild or native build is needed at this point ?
    • cargo crossbuild support might be broken ?
    • ff build misses that crossbuild is requested for libloading?

@Cogitri
Copy link
Contributor

Cogitri commented Nov 11, 2018

It appears that FF's build system gets some stuff wrong:

 7:32.79 error: failed to run custom build command for `libloading v0.5.0`
 7:32.79 process didn't exit successfully: `/builddir/firefox-60.3.0/obj-aarch64-linux-gnu/toolkit/library/release/build/libloading-e35629bc59b625ae/build-script-build` (exit code: 101)
 7:32.79 --- stdout
 7:32.79 cargo:rustc-link-lib=dl
 7:32.79 TARGET = Some("x86_64-unknown-linux-gnu")
 7:32.79 OPT_LEVEL = Some("2")
 7:32.79 TARGET = Some("x86_64-unknown-linux-gnu")
 7:32.79 HOST = Some("x86_64-unknown-linux-gnu")
 7:32.79 TARGET = Some("x86_64-unknown-linux-gnu")
 7:32.79 TARGET = Some("x86_64-unknown-linux-gnu")
 7:32.79 HOST = Some("x86_64-unknown-linux-gnu")
 7:32.79 CC_x86_64-unknown-linux-gnu = None
 7:32.79 CC_x86_64_unknown_linux_gnu = None
 7:32.80 HOST_CC = None
 7:32.80 CC = Some(" /builddir/.xbps-firefox-esr/wrappers/aarch64-linux-gnu-gcc -std=gnu99")
 7:32.80 TARGET = Some("x86_64-unknown-linux-gnu")
 7:32.80 HOST = Some("x86_64-unknown-linux-gnu")
 7:32.80 CFLAGS_x86_64-unknown-linux-gnu = None
 7:32.80 CFLAGS_x86_64_unknown_linux_gnu = None
 7:32.80 HOST_CFLAGS = Some(" -MD -MP -MF .deps/force-cargo-library-build.pp")
 7:32.80 DEBUG = Some("false")
 7:32.80 running: "/builddir/.xbps-firefox-esr/wrappers/aarch64-linux-gnu-gcc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-MD" "-MP" "-MF" ".deps/force-cargo-library-build.pp" "-m64" "-Wall" "-Wextra" "-o" "/builddir/firefox-60.3.0/obj-aarch64-linux-gnu/toolkit/library/release/build/libloading-b944b4eba704bdd7/out/src/os/unix/global_static.o" "-c" "src/os/unix/global_static.c"
 7:32.80 cargo:warning=aarch64-linux-gnu-gcc: error: unrecognized command line option '-m64'

cargo crossbuild support might be broken ?

I doubt that, since everything else that uses cargo directly does cross compile.

echo "ac_add_options --disable-gold" >>.mozconfig
echo "ac_add_options --enable-release" >>.mozconfig
echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig
echo "ac_add_options --target=${XBPS_TRIPLET}" >>.mozconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very wrong to me and most likely is the cause of the cross-compile woes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cogitri : thanks for your inputs.

these --host/--target directives are needed for musl build.
In case of crossbuild, this directive is also used (few lines below), that makes it "working":

echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig

@yopito
Copy link
Contributor Author

yopito commented Dec 6, 2018

Keep working on it.
(aarch64) crossbuild is still broken, although all rust libs build fine, except libloading.
ff build system is complicated, but I think that Makefile stuff is fine.
so my last candidate is third_party/rust/libloading/build.rs that changes some build directives. rust and cargo build system is new for me, so it take time ...

@Cogitri
Copy link
Contributor

Cogitri commented Dec 6, 2018

Will take a look at this at the weekend, I suppose

@Cogitri
Copy link
Contributor

Cogitri commented Jan 8, 2019

superseded by #6660

@maxice8 maxice8 closed this Jan 8, 2019
@yopito yopito deleted the firefox.esr.60.2.2 branch January 25, 2019 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants