Wireguard compilation creates error

Currently reading
Wireguard compilation creates error

2
0
NAS
DS 15717+
Operating system
  1. Linux
Mobile operating system
  1. Android
I tried do create the spk file by using blackvoidclub/synobuild71.
For this I used following code:
Code:
docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest

I tried this by two way's:
1st) I did this on SSH console as root
2nd) I tried it by the taskplaner, also as root.
In both cases I got a script error, that the script must be run as root.
I have a DS 1517+, The codename for the system is Avoton.
The volume i used exists,and is empty

Any idea, what I did wrong/ what can be done?
Thank you in advance.

following the log I got:

Code:
sh-4.4# docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest
WireGuard version:        1.0.20220627
WireGuard tools version:  1.0.20210914
libmnl version:           1.0.5

Cloning into 'pkgscripts-ng'...
[2022-11-01 17:25:16,566] INFO: Download... https://dataupdate7.synology.com/toolchain/v1/get_download_list?identify=toolkit&version=7.1&platform=base
[2022-11-01 17:25:55,977] INFO: Download... https://dataupdate7.synology.com/toolchain/v1/get_download_list?identify=toolkit&version=7.1&platform=avoton
[2022-11-01 17:26:26,752] INFO: tar -xhf /toolkit_tarballs/base_env-7.1.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:29:21,155] INFO: tar -xhf /toolkit_tarballs/ds.avoton-7.1.env.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:30:23,577] INFO: tar -xhf /toolkit_tarballs/ds.avoton-7.1.dev.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:31:35,083] INFO: All task finished.
--2022-11-01 17:31:35--  https://crt.sh/?d=8395
Resolving crt.sh (crt.sh)... 91.199.212.73, 2a0e:ac00:c7:d449::5bc7:d449
Connecting to crt.sh (crt.sh)|91.199.212.73|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1200 (1.2K) [application/pkix-cert]
Saving to: 'DSTRootCAX3_Extended.crt'

     0K .                                                     100%  368M=0s

2022-11-01 17:31:35 (368 MB/s) - 'DSTRootCAX3_Extended.crt' saved [1200/1200]

============================================================
                   Parse argument result                  
------------------------------------------------------------
platforms     : avoton
env_section   : default
env_version   : 7.1
dep_level     : 1
parallel_proj : 1
branch        : master
suffix        :
collect       : True
collecter     : True
link          : True
update_link   : False
build         : True
install       : True
only_install  : False
parallel      : 4
build_opt     : -J
install_opt   :
print_log     : True
tee           : True
sdk_ver       : 6.2
package       : WireGuard

Processing [7.1-42784]: avoton
============================================================
              Start to run "Traverse project"              
------------------------------------------------------------
Projects: WireGuard

============================================================
                Start to run "Link Project"                
------------------------------------------------------------
Link /pkgscripts-ng -> /build_env/ds.avoton-7.1/pkgscripts-ng
Link //source/WireGuard -> /build_env/ds.avoton-7.1/source/WireGuard


============================================================
                Start to run "Build Package"              
------------------------------------------------------------
[avoton] env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard
/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied
ERROR: This script must be run as root
Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/exec_env.py", line 76, in execute
    output = commandrunner.run(cmd, display=display, **kwargs)
  File "//pkgscripts-ng/include/python/commandrunner.py", line 39, in run
    raise RunShellFailed(p.returncode, cmd, output)
commandrunner.RunShellFailed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/parallel.py", line 15, in __call__
    result = self.__callable(*args, **kwargs)
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 191, in run_command
    env.execute(cmd, display=len(self.env_config.platforms)
  File "//pkgscripts-ng/include/python/exec_env.py", line 79, in execute
    raise EnvError(
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/exec_env.py", line 76, in execute
    output = commandrunner.run(cmd, display=display, **kwargs)
  File "//pkgscripts-ng/include/python/commandrunner.py", line 39, in run
    raise RunShellFailed(p.returncode, cmd, output)
commandrunner.RunShellFailed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "//pkgscripts-ng/include/python/parallel.py", line 15, in __call__
    result = self.__callable(*args, **kwargs)
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 191, in run_command
    env.execute(cmd, display=len(self.env_config.platforms)
  File "//pkgscripts-ng/include/python/exec_env.py", line 79, in execute
    raise EnvError(
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "//pkgscripts-ng/PkgCreate.py", line 184, in <module>
    main(sys.argv[1:])
  File "//pkgscripts-ng/PkgCreate.py", line 177, in main
    packer.pack_package()
  File "//pkgscripts-ng/include/python/pkguniform.py", line 437, in pack_package
    worker.execute()
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 86, in execute
    self._process_output(self._run(*argv))
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 212, in _run
    return doPlatformParallel(self.run_command, self.env_config.platforms)
  File "//pkgscripts-ng/include/python/parallel.py", line 60, in doPlatformParallel
    output[item] = results[item].get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 771, in get
    raise self._value
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
Build log
=========
/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied
ERROR: This script must be run as root
Install log
===========
cat: /build_env/ds.avoton-7.1/logs.install: No such file or directory
 
I tried do create the spk file by using blackvoidclub/synobuild71.
For this I used following code:
Code:
docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest

I tried this by two way's:
1st) I did this on SSH console as root
2nd) I tried it by the taskplaner, also as root.
In both cases I got a script error, that the script must be run as root.
I have a DS 1517+, The codename for the system is Avoton.
The volume i used exists,and is empty

Any idea, what I did wrong/ what can be done?
Thank you in advance.

following the log I got:

Code:
sh-4.4# docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest
WireGuard version:        1.0.20220627
WireGuard tools version:  1.0.20210914
libmnl version:           1.0.5

Cloning into 'pkgscripts-ng'...
[2022-11-01 17:25:16,566] INFO: Download... https://dataupdate7.synology.com/toolchain/v1/get_download_list?identify=toolkit&version=7.1&platform=base
[2022-11-01 17:25:55,977] INFO: Download... https://dataupdate7.synology.com/toolchain/v1/get_download_list?identify=toolkit&version=7.1&platform=avoton
[2022-11-01 17:26:26,752] INFO: tar -xhf /toolkit_tarballs/base_env-7.1.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:29:21,155] INFO: tar -xhf /toolkit_tarballs/ds.avoton-7.1.env.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:30:23,577] INFO: tar -xhf /toolkit_tarballs/ds.avoton-7.1.dev.txz -C /build_env/ds.avoton-7.1
[2022-11-01 17:31:35,083] INFO: All task finished.
--2022-11-01 17:31:35--  https://crt.sh/?d=8395
Resolving crt.sh (crt.sh)... 91.199.212.73, 2a0e:ac00:c7:d449::5bc7:d449
Connecting to crt.sh (crt.sh)|91.199.212.73|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1200 (1.2K) [application/pkix-cert]
Saving to: 'DSTRootCAX3_Extended.crt'

     0K .                                                     100%  368M=0s

2022-11-01 17:31:35 (368 MB/s) - 'DSTRootCAX3_Extended.crt' saved [1200/1200]

============================================================
                   Parse argument result                 
------------------------------------------------------------
platforms     : avoton
env_section   : default
env_version   : 7.1
dep_level     : 1
parallel_proj : 1
branch        : master
suffix        :
collect       : True
collecter     : True
link          : True
update_link   : False
build         : True
install       : True
only_install  : False
parallel      : 4
build_opt     : -J
install_opt   :
print_log     : True
tee           : True
sdk_ver       : 6.2
package       : WireGuard

Processing [7.1-42784]: avoton
============================================================
              Start to run "Traverse project"             
------------------------------------------------------------
Projects: WireGuard

============================================================
                Start to run "Link Project"               
------------------------------------------------------------
Link /pkgscripts-ng -> /build_env/ds.avoton-7.1/pkgscripts-ng
Link //source/WireGuard -> /build_env/ds.avoton-7.1/source/WireGuard


============================================================
                Start to run "Build Package"             
------------------------------------------------------------
[avoton] env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard
/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied
ERROR: This script must be run as root
Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/exec_env.py", line 76, in execute
    output = commandrunner.run(cmd, display=display, **kwargs)
  File "//pkgscripts-ng/include/python/commandrunner.py", line 39, in run
    raise RunShellFailed(p.returncode, cmd, output)
commandrunner.RunShellFailed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/parallel.py", line 15, in __call__
    result = self.__callable(*args, **kwargs)
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 191, in run_command
    env.execute(cmd, display=len(self.env_config.platforms)
  File "//pkgscripts-ng/include/python/exec_env.py", line 79, in execute
    raise EnvError(
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "//pkgscripts-ng/include/python/exec_env.py", line 76, in execute
    output = commandrunner.run(cmd, display=display, **kwargs)
  File "//pkgscripts-ng/include/python/commandrunner.py", line 39, in run
    raise RunShellFailed(p.returncode, cmd, output)
commandrunner.RunShellFailed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "//pkgscripts-ng/include/python/parallel.py", line 15, in __call__
    result = self.__callable(*args, **kwargs)
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 191, in run_command
    env.execute(cmd, display=len(self.env_config.platforms)
  File "//pkgscripts-ng/include/python/exec_env.py", line 79, in execute
    raise EnvError(
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "//pkgscripts-ng/PkgCreate.py", line 184, in <module>
    main(sys.argv[1:])
  File "//pkgscripts-ng/PkgCreate.py", line 177, in main
    packer.pack_package()
  File "//pkgscripts-ng/include/python/pkguniform.py", line 437, in pack_package
    worker.execute()
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 86, in execute
    self._process_output(self._run(*argv))
  File "//pkgscripts-ng/include/python/pkgcommon.py", line 212, in _run
    return doPlatformParallel(self.run_command, self.env_config.platforms)
  File "//pkgscripts-ng/include/python/parallel.py", line 60, in doPlatformParallel
    output[item] = results[item].get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 771, in get
    raise self._value
exec_env.EnvError: ('Execute chroot /build_env/ds.avoton-7.1 env PackageName=WireGuard /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 6.2 -J WireGuard failed', '/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied\nERROR: This script must be run as root')
Build log
=========
/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied
ERROR: This script must be run as root
Install log
===========
cat: /build_env/ds.avoton-7.1/logs.install: No such file or directory
This is the same, ongoing, problem that has an issue open on github as well. I will try and build the avoton image and post it on the site and reply back here.
 
Hi Rusty
Thank you very much for your help!
Now it worked fine. I could start and setup successful a connection from my mobilephone.
The connection seems working fine. on both side synology and mobilephone I could see, that there was a handshake/ data interchange in both directions.
--
But I con not access the DSM by the phone. But I will first go into analyze the reason for it
 
I tried do create the spk file by using blackvoidclub/synobuild71.
For this I used following code:
Code:
docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest

I tried this by two way's:
1st) I did this on SSH console as root
2nd) I tried it by the taskplaner, also as root.
In both cases I got a script error, that the script must be run as root.
I have a DS 1517+, The codename for the system is Avoton.
The volume i used exists,and is empty

Any idea, what I did wrong/ what can be done?
Thank you in advance.

following the log I got:

Code:
sh-4.4# docker run --rm --privileged --user=root --env PACKAGE_ARCH=avoton --env DSM_VER=7.1 -v /volume1/docker/synowirespk71:/result_spk blackvoidclub/synobuild71:latest

/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied
ERROR: This script must be run as root
For some reason compiling in docker on a synology NAS the python script does not have access to /dev devices. It errors out on /dev/null, not because you are not root. I edited the check script so it goes past that check. However then you run in the next error, that it can't open /dev/urandom Still trying to figure out why...
 
Tried your code and have build the image. However the 7.2 for Braswell is still reporting a failed build but not due to root access but certain problems listed below.

There are more issue later in the build but these are the 1st that come up in the log.

Code:
scripts/Makefile.build:308: 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:1229: recipe for target '_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src' failed
*** [_module_/source/WireGuard/wireguard-linux-compat-1.0.20220627/src] Error 2
Makefile:26: recipe for target 'module' failed
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Good idea! I made a backup of the file. I got into this problem after having to reinstall.:mad: One less...
Replies
6
Views
5,881
I didn’t watch all the setup video but the gist of what is happening is a Docker container is used to...
Replies
11
Views
5,988

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top