GDS Acces

hello all, I am currently working on accesing the GDS in the PLC and am following along with this tutorial: https://github.com/PLCnext/SampleRuntime. But when i get to step 9 in the „Hello PLC“ chapter i get this error. [attachment]Screenshot_6.png[/attachment] I have installed the sdk twice now but none seem to work. Can anyone tell me what i’m doing wrong? Thanks in advance. Robin Detobel

CommandLine.JPG

Hi Robin, It looks like cmake is not in your PATH env var. The example assumes that either cmake is installed separately on the host, or else the PATH has been updated with the path of the cmake installation in the SDK. The example should probably include this information, or perhaps the build script should automatically use the cmake installation in the specified SDK. In any case, if you can confirm that one of these solves the problem, it would be good if you can open an issue on the Github project and we will fix this in a future update. ~ Martin.

I have installed Cmake on the host and now get this error: [attachment]Screenshot_7.png[/attachment] i have also noticed that nothing is pressent in the SDK install folder after installing it. is this normal?

Screenshot_7.png

What version of cmake did you install? The version that comes with the latest SDKs is 3.16.5. sysroots/x86_64-pokysdk-linux/usr/bin/cmake --version cmake version 3.16.5 The --configure option might not have been supported before a certain version. [quote]i have also noticed that nothing is pressent in the SDK install folder after installing it. is this normal?[/quote]No, this is not normal. How did you install the SDK?

I am using version 3.20.3 of CMake. as for how i installed the sdk, i used this tutorial: http://www.plcnext-runtime.com/ch01-04-installing-a-software-development-kit.html

Hmm, interesting. Both cmake v15 and v16 seem to „support“ the --configure option, or at least ignore it, while v20 doesn’t like it at all. The quick fix is to delete the –configure option from the build script (this works for me). I will log an issue in Github and this will be fixed in future. As for installing the SDK - the official way to do this is described in the Info Center, here: https://www.plcnext.help/te/Programming/Cpp/Cpp_programming/Required_Installations.htm If this procedure does not install files in your specified SDK directory, please let us know.

i have commented –configure but now get new error codes: [attachment]Screenshot_8.png[/attachment] i have also used the tutorial to install it but the folder is still empty after installing. i am using Ubuntu version 20.04.02.0 running virtual box version 6.1.22

Screenshot_8.png

It’s saying that it can’t find the build program „Ninja“. From the Readme: [attachment]2021-06-10_15-25-48.jpg[/attachment] You will need to install Ninja, or use an alternative build program. .

2021-06-10_15-25-48.jpg

That fixed it ,thanks a lot for your help Martin.

No problem. Out of interest, there are several outstanding Github issues that, when addressed, will make this build process much easier. When that happens, we will update the Sample Runtime tutorial so that future users - including Windows users - should have an easier time with this example.

Hi Martin, i seem to have ran into another issue. When i try to do part 7 of the github tutorial, more specifically this command: „sudo setcap cap_net_bind_service,cap_net_admin,cap_net_raw,cap_sys_boot,cap_sys_nice,cap_sys_time+ep projects/runtime/runtime“ i get the message: „Sorry, user admin is not allowed to execute ‚/usr/sbin/setcap cap_net_bind_service,cap_net_admin,cap_net_raw,cap_sys_boot,cap_sys_nice,cap_sys_time+ep projects/runtime/runtime‘ as root on axcf2152.“ I have an ssh connection to the PLC and am logged in as admin.

That’s probably my mistake - I probably gave the admin used full sudo privileges before that point. Please open an issue on that GitHub project for this problem, and it will be fixed. You can either give the admin user full sudo privileges by editing the /etc/sudoers file (as root), or else grant the admin user the additional sudo privilege for only that command.