Fix firefox failing build #217

Merged
anonfunc merged 1 commits from strptrk/ALHP.GO:fix_firefox into main 2023-11-01 11:34:05 +01:00
Contributor

Hi,

After some experimentation and digging in the firefox repository I realized that the commas in link-arg are the cause of the error.

Also, correct me if I'm wrong here, but you do not have to pass -Wl to the linker, cargo handles that. Plus, according to the documentation, it is possible to pass link-arg multiple times to achieve the same result.

I managed to build firefox locally with this change, so I guess this should work here as well.

Hi, After some experimentation and digging in the firefox repository I realized that the commas in _link-arg_ are the cause of the error. Also, correct me if I'm wrong here, but you do not have to pass -Wl to the linker, cargo handles that. Plus, according to the [documentation](https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg), it is possible to pass _link-arg_ multiple times to achieve the same result. I managed to build firefox locally with this change, so I guess this should work here as well.
strptrk added 1 commit 2023-11-01 01:14:30 +01:00
Owner

Thanks for looking into this.

Did not know that passing them separately was possible. That makes for a relatively simple fix indeed.

I'll merge this and test the ff build.

Thanks for looking into this. Did not know that passing them separately was possible. That makes for a relatively simple fix indeed. I'll merge this and test the ff build.
anonfunc merged commit 2bf9bd0621 into main 2023-11-01 11:34:05 +01:00
Owner

Now we just need to wait for nodejs 21.1.0 to leave testing. 😄

Now we just need to wait for `nodejs 21.1.0` to leave `testing`. 😄
Author
Contributor

Hi, I saw that the build failed again, this time for a different reason.

54:25.86 clang-16: error: unable to execute command: Killed
54:25.86 clang-16: error: linker command failed due to signal (use -v to see invocation)
54:25.92 make[4]: *** [/startdir/src/firefox-119.0/config/rules.mk:526: libxul.so] Error 1
54:25.92 make[3]: *** [/startdir/src/firefox-119.0/config/recurse.mk:72: toolkit/library/build/target] Error 2
54:25.93 make[2]: *** [/startdir/src/firefox-119.0/config/recurse.mk:34: compile] Error 2
54:25.93 make[1]: *** [/startdir/src/firefox-119.0/config/rules.mk:361: default] Error 2
54:25.93 make: *** [client.mk:60: build] Error 2
54:25.95 W 168 compiler warnings present.
 Config object not found by mach.
Configure complete!
Be sure to run |mach build| to pick up any changes
  Parallelism determined by memory: using 12 jobs for 12 cores based on 30.7 GiB RAM and estimated job size of 1.0 GiB
==> ERROR: A failure occurred in build().

I ran into a similar issue, and the problem was an insufficient amount of RAM. I have 32GB of RAM, and had to add lots of swap space, because an LTO build of firefox used 73GB of RAM at its peak, during the linking phase.

You should either use Thin LTO to reduce the necessary amount of RAM, or just add a whole lot of swap.

Hi, I saw that the build failed again, this time for a different reason. ``` 54:25.86 clang-16: error: unable to execute command: Killed 54:25.86 clang-16: error: linker command failed due to signal (use -v to see invocation) 54:25.92 make[4]: *** [/startdir/src/firefox-119.0/config/rules.mk:526: libxul.so] Error 1 54:25.92 make[3]: *** [/startdir/src/firefox-119.0/config/recurse.mk:72: toolkit/library/build/target] Error 2 54:25.93 make[2]: *** [/startdir/src/firefox-119.0/config/recurse.mk:34: compile] Error 2 54:25.93 make[1]: *** [/startdir/src/firefox-119.0/config/rules.mk:361: default] Error 2 54:25.93 make: *** [client.mk:60: build] Error 2 54:25.95 W 168 compiler warnings present. Config object not found by mach. Configure complete! Be sure to run |mach build| to pick up any changes Parallelism determined by memory: using 12 jobs for 12 cores based on 30.7 GiB RAM and estimated job size of 1.0 GiB ==> ERROR: A failure occurred in build(). ``` I ran into a similar issue, and the problem was an insufficient amount of RAM. I have 32GB of RAM, and had to add lots of swap space, because an LTO build of firefox used 73GB of RAM at its peak, during the linking phase. You should either use Thin LTO to reduce the necessary amount of RAM, or just add a whole lot of swap.
Owner

I ran into a similar issue, and the problem was an insufficient amount of RAM. I have 32GB of RAM, and had to add lots of swap space, because an LTO build of firefox used 73GB of RAM at its peak, during the linking phase.

You should either use Thin LTO to reduce the necessary amount of RAM, or just add a whole lot of swap.

Yep I noticed. Will add some swap.

EDIT: But since the thunderbird build(s) run successfully I except the ff builds will do the same (if they do not run out of memory in the middle of linking). So this PR fixed #197.

> I ran into a similar issue, and the problem was an insufficient amount of RAM. I have 32GB of RAM, and had to add lots of swap space, because an LTO build of firefox used 73GB of RAM at its peak, during the linking phase. > > You should either use Thin LTO to reduce the necessary amount of RAM, or just add a whole lot of swap. Yep I noticed. Will add some swap. EDIT: But since the `thunderbird` build(s) run successfully I except the ff builds will do the same (if they do not run out of memory in the middle of linking). So this PR fixed #197.
Sign in to join this conversation.
No description provided.