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

sasquatch: pass -fcommon to fix build on -fno-common toolchains #147627

Closed
wants to merge 1 commit into from

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Nov 27, 2021

Without the change build on clang-12 or upstream gcc-12 fails as:

$ nix build --impure --expr 'with import ./. {}; sasquatch.override { stdenv = clang12Stdenv; }' -L
...
c++   ./LZMA/lzmalt/*.o ... -o sasquatch
ld: squashfs-tools/./error.h:34: multiple definition of `verbose'; unsquashfs.o:error.h:34: first defined here

Until upstream fixes it by fixing verbose variable declaration at:
devttys0/sasquatch#44
and fork rebases let's set -fcommon explicitly.

Without the change build on clang-12 or upstream gcc-12 fails as:

    $ nix build --impure --expr 'with import ./. {}; sasquatch.override { stdenv = clang12Stdenv; }' -L
    ...
    c++   ./LZMA/lzmalt/*.o ... -o sasquatch
    ld: squashfs-tools/./error.h:34: multiple definition of `verbose'; unsquashfs.o:error.h:34: first defined here

Until upstrea fixes it by fixing `verbose` variable declaration at:
  devttys0/sasquatch#44
and fork rebases let's set `-fcommon` explicitly.
@ofborg ofborg bot requested a review from Pamplemousse November 27, 2021 22:51
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 27, 2021
Comment on lines -48 to +51
substituteInPlace squashfs-tools/Makefile --replace ' -Werror' ' '
# Add -fcommon as a woarkaround for compiler that default to -fno-common
# like upstream gcc-10 or clang-11. Will be fixed upstream at:
# https://github.com/devttys0/sasquatch/pull/44
substituteInPlace squashfs-tools/Makefile --replace ' -Werror' ' -fcommon'
Copy link
Member

Choose a reason for hiding this comment

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

Can we fetch the patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately not directly. nixpkgs's sasquatch if a fork by @cole-h with a very invasive devttys0/sasquatch#40 applied (changes every hunk offset).

The repository format is already storing a patch (and not just the source) which makes any (even trivial) changes to it effectively non-composable.

@trofi
Copy link
Contributor Author

trofi commented Feb 7, 2022

Does not seem to happen.

@trofi trofi closed this Feb 7, 2022
@trofi trofi deleted the fix-sasquatch-for-fno-common branch February 7, 2022 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants