diff options
author | Markus Theil <theil.markus@gmail.com> | 2023-08-10 11:26:19 +0200 |
---|---|---|
committer | Markus Theil <theil.markus@gmail.com> | 2023-08-10 11:26:19 +0200 |
commit | e80f51a51493c00fe41bcbf35d251fcb555980d4 (patch) | |
tree | a5e15c18eb2977f07832bcb7db28136248d876a6 /pkgs/servers | |
parent | 833dd20ab2d7c366c2682e5679a573014e22531c (diff) |
frr: disable and warn on cross-compilation with net-snmp
Signed-off-by: Markus Theil <theil.markus@gmail.com>
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/frr/clippy-helper.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/frr/default.nix | 16 |
2 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/servers/frr/clippy-helper.nix b/pkgs/servers/frr/clippy-helper.nix index 9e554d4e17e6f..bb5887bda0f3a 100644 --- a/pkgs/servers/frr/clippy-helper.nix +++ b/pkgs/servers/frr/clippy-helper.nix @@ -1,9 +1,9 @@ { lib , stdenv -, frr_source -, frr_version +, frrSource +, frrVersion -# build time + # build time , autoreconfHook , flex , bison @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { pname = "frr-clippy-helper"; - version = frr_version; + version = frrVersion; - src = frr_source; + src = frrSource; nativeBuildInputs = [ autoreconfHook diff --git a/pkgs/servers/frr/default.nix b/pkgs/servers/frr/default.nix index fae9db04cf0aa..87fd2064a5630 100644 --- a/pkgs/servers/frr/default.nix +++ b/pkgs/servers/frr/default.nix @@ -30,8 +30,15 @@ , nettools , nixosTests -# general options -, snmpSupport ? true +# FRR's configure.ac gets SNMP options by executing net-snmp-config on the build host +# This leads to compilation errors when cross compiling. +# E.g. net-snmp-config for x86_64 does not return the ARM64 paths. +# +# SNMP_LIBS="`${NETSNMP_CONFIG} --agent-libs`" +# SNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags`" +, snmpSupport ? stdenv.buildPlatform.canExecute stdenv.hostPlatform + +# other general options besides snmp support , rpkiSupport ? true , numMultipath ? 64 , watchfrrSupport ? true @@ -71,7 +78,8 @@ , ospfApi ? true }: -assert snmpSupport -> stdenv.buildPlatform.canExecute stdenv.hostPlatform; +lib.warnIf (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) + "cannot enable SNMP support due to cross-compilation issues with net-snmp-config" stdenv.mkDerivation rec { pname = "frr"; @@ -119,7 +127,7 @@ stdenv.mkDerivation rec { # cross-compiling: clippy is compiled with the build host toolchain, split it out to ease # navigation in dependency hell - clippy-helper = buildPackages.callPackage ./clippy-helper.nix { frr_version = version; frr_source=src; }; + clippy-helper = buildPackages.callPackage ./clippy-helper.nix { frrVersion = version; frrSource = src; }; configureFlags = [ "--disable-silent-rules" |