runfalk / synology-wireguard

WireGuard support for some Synology NAS drives
MIT License
918 stars 131 forks source link

DSM7 monaco build fails #158

Open mietzen opened 1 year ago

mietzen commented 1 year ago

Description I tried to build wireguard for the DS216Play on DSM7, but the build fails with:

scripts/Makefile.build:312: recipe for target '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.o' failed
make[3]: *** [/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.o] Error 1
Makefile:1243: recipe for target '_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src' failed
make[2]: *** [_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src] Error 2
Makefile:26: recipe for target 'module' failed
make[1]: *** [module] Error 2
make[1]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src'
Makefile:72: recipe for target 'wireguard-linux-compat-1.0.20220627/src/wireguard.ko' failed
make: *** [wireguard-linux-compat-1.0.20220627/src/wireguard.ko] Error 2
[Error] Build project fail!

Full Build log: build.log

mietzen commented 1 year ago

I tried #131 without success:

/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c: In function '__siphash_aligned':
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c:80:36: error: 'fallthrough' undeclared (first use in this function)
  case 7: b |= ((u64)end[6]) << 48; fallthrough;
                                    ^~~~~~~~~~~
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c:80:36: note: each undeclared identifier is reported only once for each function it appears in
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c: In function '__siphash_unaligned':
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c:112:36: error: 'fallthrough' undeclared (first use in this function)
  case 7: b |= ((u64)end[6]) << 48; fallthrough;
                                    ^~~~~~~~~~~
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c: In function '__hsiphash_aligned':
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c:429:36: error: 'fallthrough' undeclared (first use in this function)
  case 3: b |= ((u32)end[2]) << 16; fallthrough;
                                    ^~~~~~~~~~~
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c: In function '__hsiphash_unaligned':
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.c:451:36: error: 'fallthrough' undeclared (first use in this function)
  case 3: b |= ((u32)end[2]) << 16; fallthrough;
                                    ^~~~~~~~~~~
scripts/Makefile.build:312: recipe for target '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.o' failed
make[3]: *** [/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/compat/siphash/siphash.o] Error 1
Makefile:1243: recipe for target '_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src' failed
make[2]: *** [_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src] Error 2
Makefile:26: recipe for target 'module' failed
make[1]: *** [module] Error 2
make[1]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src'
Makefile:72: recipe for target 'wireguard-linux-compat-1.0.20220627/src/wireguard.ko' failed
make: *** [wireguard-linux-compat-1.0.20220627/src/wireguard.ko] Error 2
[Error] Build project fail!
Time cost: 00:02:32 [Build-->WireGuard]
[INFO] Build WireGuard finished!

----------------- Time cost statistics -----------------
Time cost: 00:02:32 [Build-->WireGuard]

########################################################
      Error(s) occurred on project "WireGuard"
########################################################
1 projects, 1 failed, 0 blocked.

[Error] Check [/logs/error.build] for fixing errors.
Install log
===========
cat: /build_env/ds.monaco-7.0/logs.install: No such file or directory

build.log

yoghurt-x86 commented 1 year ago

I had a similar issue building monaco / DSM7 on master. But using #131, rebased on the current master, it build without a problem.

mietzen commented 2 months ago

I just visited this again:

/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.c:25:8: error: unknown type name 'hsiphash_key_t'
   25 | static hsiphash_key_t key;
      |        ^~~~~~~~~~~~~~
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.c: In function 'wg_ratelimiter_allow':
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.c:109:36: error: implicit declaration of function 'hsiphash_2u32'; did you mean 'siphash_2u32'? [-Werror=implicit-function-declaration]
  109 |                 bucket = &table_v4[hsiphash_2u32(net_word, ip, &key) &
      |                                    ^~~~~~~~~~~~~
      |                                    siphash_2u32
/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.c:116:36: error: implicit declaration of function 'hsiphash_3u32'; did you mean 'siphash_3u32'? [-Werror=implicit-function-declaration]
  116 |                 bucket = &table_v6[hsiphash_3u32(net_word, ip >> 32, ip, &key) &
      |                                    ^~~~~~~~~~~~~
      |                                    siphash_3u32
cc1: some warnings being treated as errors
scripts/Makefile.build:312: recipe for target '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.o' failed
make[3]: *** [/source/WireGuard/wireguard-linux-compat-1.0.20220627/src/ratelimiter.o] Error 1
Makefile:1243: recipe for target '_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src' failed
make[2]: *** [_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src] Error 2
Makefile:26: recipe for target 'module' failed
make[1]: *** [module] Error 2
make[1]: Leaving directory '/source/WireGuard/wireguard-linux-compat-1.0.20220627/src'
Makefile:78: recipe for target 'wireguard-linux-compat-1.0.20220627/src/wireguard.ko' failed
make: *** [wireguard-linux-compat-1.0.20220627/src/wireguard.ko] Error 2
[Error] Build project fail!
Time cost: 00:00:35 [Build-->WireGuard]
[INFO] Build WireGuard finished!

----------------- Time cost statistics -----------------
Time cost: 00:00:35 [Build-->WireGuard]

########################################################
      Error(s) occurred on project "WireGuard"
########################################################
1 projects, 1 failed, 0 blocked.

I still failed