Skip to content

firefox: new package#45083

Closed
teaguesterling wants to merge 121 commits intospack:developfrom
teaguesterling:packages/firefox
Closed

firefox: new package#45083
teaguesterling wants to merge 121 commits intospack:developfrom
teaguesterling:packages/firefox

Conversation

@teaguesterling
Copy link
Copy Markdown
Contributor

@teaguesterling teaguesterling commented Jul 7, 2024

This is a bit of a messy PR that creates a Firefox package that can compile with gcc14. The gcc@14: compatibility required a small number of patches that will probably be submitted upstream.

There were a pile of dependencies to get this working. They've been broken out into separate PRs, but all are merged into this as well to simplify review:

Firefox uses its own proprietary Python-based build system (mach). The package does not define a new spack build system as I don't suspect anything else actually uses it (aside from Thunderbird, maybe). Mach handles all stages, except the final build stage, which uses spack tooling. This is decidedly not air gap safe as it depends heavily on cargo to build dependencies.

rkevk and others added 22 commits February 15, 2023 10:49
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Copy link
Copy Markdown
Contributor

@bernhardkaindl bernhardkaindl left a comment

Choose a reason for hiding this comment

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

@teaguesterling I got around the Python _curses issue using the fix linked above. Now I get to these errors:

 2:00.75    Compiling dbus v0.6.5
 2:01.73 warning: trait `HasFloat` is never used
 2:01.73   --> third_party/rust/bindgen/ir/item.rs:89:18
 2:01.73    |
 2:01.73 89 | pub(crate) trait HasFloat {
 2:01.73    |                  ^^^^^^^^
 2:01.73    |
 2:01.73    = note: `#[warn(dead_code)]` on by default
 2:03.28    Compiling bindgen v0.63.999 (/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/build/rust/bindgen-0.63)
 2:03.62    Compiling time v0.3.23
 2:04.36 error[E0282]: type annotations needed for `Box<_>`
 2:04.36   --> /home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/third_party/rust/time/src/format_description/parse/mod.rs:83:9
 2:04.36    |
 2:04.36 83 |     let items = format_items
 2:04.36    |         ^^^^^
 2:04.36 ...
 2:04.36 86 |     Ok(items.into())
 2:04.36    |              ---- type must be known at this point
 2:04.36    |
 2:04.36    = note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`
 2:05.17 For more information about this error, try `rustc --explain E0282`.
 2:05.18 error: could not compile `time` (lib) due to 1 previous error
 2:05.18 warning: build failed, waiting for other jobs to finish...
 2:08.52 warning: `bindgen` (lib) generated 1 warning
 2:32.54 gmake[4]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/makefiles/rust.mk:498: force-cargo-library-build] Error 101
 2:32.55 gmake[3]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/recurse.mk:72: toolkit/library/rust/target-objects] Error 2
 2:32.55 gmake[2]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/recurse.mk:34: compile] Error 2
 2:32.55 gmake[1]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/rules.mk:361: default] Error 2
 2:32.55 gmake: *** [client.mk:60: build] Error 2
 2:32.55 W 98 compiler warnings present.
==> Error: ProcessError: Command exited with status 2:
    '/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/mach' '--verbose' 'build' '--jobs=64'

8 errors found in build log:
     1087     0:38.07 accessible/atk
     1088     0:38.13 accessible/base
     1089     0:38.16 accessible/basetypes
     1090     0:38.29 accessible/generic
     1091     0:38.31 accessible/html
     1092     0:38.32 /home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/build/unix/elfhack/relrhack.cpp: In function 'int run_command(std::vector<const char*>&, bool)':
  >> 1093    0:38.32 /home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/build/unix/elfhack/relrhack.cpp:429:30: error: variable 'std::array<const char*, 3> args_with_atfile' has initializer but incomplete type
     1094     0:38.32   429 |   std::array<const char*, 3> args_with_atfile{};
     1095     0:38.32       |                              ^~~~~~~~~~~~~~~~
     1096     0:38.32 accessible/ipc
     1097     0:38.32 accessible/xul
     1098     0:38.33 accessible/xpcom
     1099     0:38.60 browser/components/about
     1100     0:38.79 browser/components/shell
     1101     0:38.98 caps
  >> 1102    0:39.02 gmake[4]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/rules.mk:582: host_relrhack.o] Error 1
  >> 1103     0:39.02 gmake[3]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/recurse.mk:72: build/unix/elfhack/host-objects] Error 2
     1104     0:39.02 gmake[3]: *** Waiting for unfinished jobs....
     1105     0:39.03 chrome
     1106     0:39.86 In file included from Unified_cpp_mozglue_baseprofiler1.cpp:20:
     1107     0:39.86 /home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/mozglue/baseprofiler/lul/LulMain.cpp: In function 'bool lul::GetAndCheckStackTrace(LUL*, const char*)':
     1108     0:39.86 /home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/mozglue/baseprofiler/lul/LulMain.cpp:1568:9: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct lul::UnwindRegs'; use assignment or value-initialization instead [-Wclass-memaccess]
     1109     0:39.86  1568 |   memset(&startRegs, 0, sizeof(startRegs));

     ...

     2008     2:04.36    |
     2009     2:04.36    = note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`
     2010     2:05.17 For more information about this error, try `rustc --explain E0282`.
     2011     2:05.18 error: could not compile `time` (lib) due to 1 previous error
     2012     2:05.18 warning: build failed, waiting for other jobs to finish...
     2013     2:08.52 warning: `bindgen` (lib) generated 1 warning
  >> 2014    2:32.54 gmake[4]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/makefiles/rust.mk:498: force-cargo-library-build] Error 101
  >> 2015     2:32.55 gmake[3]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/recurse.mk:72: toolkit/library/rust/target-objects] Error 2
  >> 2016     2:32.55 gmake[2]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/recurse.mk:34: compile] Error 2
  >> 2017     2:32.55 gmake[1]: *** [/home/bkaindl/spack/.stage/spack-stage-firefox-127.0-2i5ik2a3qrqloaylctcysut3unre3anj/spack-src/config/rules.mk:361: default] Error 2
  >> 2018     2:32.55 gmake: *** [client.mk:60: build] Error 2
     2019     2:32.55 W 98 compiler warnings present.

As I installed gcc-13.1.0 on that host, it automatically used it.

I also guess that the fresh build of rust looks too new for this firefox version, some message in the compile errors mentioned that rust 1.80 changed something:

bin/spack find -v rust
-- linux-ubuntu22.04-skylake / gcc@13.1.0 -----------------------
rust@1.81.0~dev~docs+src build_system=generic

Which versions should work?

@teaguesterling
Copy link
Copy Markdown
Contributor Author

I was running this on approx rust 1.78. According to that error message, it looks like I'll need to refine the requirements further.

@teaguesterling
Copy link
Copy Markdown
Contributor Author

Builds that previously succeeded for Mr are failing now. Moving back to draft while I sort out the dependencies.

@teaguesterling teaguesterling changed the title firefox: new package [WiP] firefox: new package Oct 4, 2024
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
Signed-off-by: Teague Sterling <[email protected]>
@teaguesterling
Copy link
Copy Markdown
Contributor Author

@bernhardkaindl: I was able to build both v127 and v130 after fixing a few dependencies. I've moved this out of WIP.

It seems there are upper bounds on [email protected] for both versions and an upper bound on [email protected] for v127 as well as sup package bumps on py-glean-(parser|sdk) for v130.

There was also a small typo (or change in the Spack API) in the install method.

@teaguesterling teaguesterling changed the title [WiP] firefox: new package firefox: new package Oct 7, 2024
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had any activity in the last 6 months. It will be closed in 30 days if there is no further activity.

If the pull request is waiting for a reply from reviewers, feel free to ping them as a reminder. If it is waiting and has no assigned reviewer, feel free to ping @spack/spack-releasers or simply leave a comment saying this should not be marked stale. This will reset the pull request's stale state.

To get more eyes on your pull request, you can post a link in the #pull-requests channel of the Spack Slack.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Sep 14, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request was closed because it had no activity for 30 days after being marked stale. If you feel this is in error, please feel free to reopen this pull request.

@github-actions github-actions bot closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants