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

bacula: fix cross compiling for armv7l #66386

Merged
merged 1 commit into from Aug 14, 2019

Conversation

typetetris
Copy link
Contributor

got this error while cross compiling:

checking whether setpgrp takes no argument... configure: error: cannot
check setpgrp when cross compiling

autoconf manual says:

— Macro: AC_FUNC_SETPGRP

If setpgrp takes no argument (the Posix version), define SETPGRP_VOID. Otherwise, it is the BSD version, which takes two process IDs as arguments. This macro does not check whether setpgrp exists at all; if you need to work in that situation, first call AC_CHECK_FUNC for setpgrp.

The result of this macro is cached in the ac_cv_func_setpgrp_void variable.

This macro is obsolescent, as current systems have a setpgrp whose signature conforms to Posix. New programs need not use this macro.

So override it with caching variable.

Motivation for this change

get bacula to compile with arm

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @ domenkozar lovek323 eleanor

@typetetris
Copy link
Contributor Author

cc @domenkozar
cc @lovek323

notify didn't work in pull request message

@@ -18,7 +18,9 @@ stdenv.mkDerivation rec {
"--with-logdir=/var/log/bacula"
"--with-working-dir=/var/lib/bacula"
"--mandir=\${out}/share/man"
];
] ++ (if stdenv.buildPlatform != stdenv.hostPlatform then [
Copy link
Member

Choose a reason for hiding this comment

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

stdenv.lib.optional ... should do this as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used that now

got this error while cross compiling:

checking whether setpgrp takes no argument... configure: error: cannot
check setpgrp when cross compiling

autoconf manual says:

— Macro: AC_FUNC_SETPGRP

    If setpgrp takes no argument (the Posix version), define SETPGRP_VOID. Otherwise, it is the BSD version, which takes two process IDs as arguments. This macro does not check whether setpgrp exists at all; if you need to work in that situation, first call AC_CHECK_FUNC for setpgrp.

    The result of this macro is cached in the ac_cv_func_setpgrp_void variable.

    This macro is obsolescent, as current systems have a setpgrp whose signature conforms to Posix. New programs need not use this macro.

So override it with caching variable.
@matthewbauer matthewbauer merged commit 326f40e into NixOS:master Aug 14, 2019
@typetetris typetetris deleted the bacula-crosscompile-fix branch August 24, 2019 19:31
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.

None yet

2 participants