Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. Robin_Detobel
  2. PLCnext Technology & PLCnext Controls
  3. Thursday, 10 June 2021
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.
Screenshot_6.png

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
Attachments (1)
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Robin_Detobel Accepted Answer Pending Moderation
0
Votes
Undo
I have installed Cmake on the host and now get this error:
Screenshot_7.png

i have also noticed that nothing is pressent in the SDK install folder after installing it. is this normal?
Attachments (1)
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.

i have also noticed that nothing is pressent in the SDK install folder after installing it. is this normal?
No, this is not normal.
How did you install the SDK?
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Robin_Detobel Accepted Answer Pending Moderation
0
Votes
Undo
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
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Robin_Detobel Accepted Answer Pending Moderation
0
Votes
Undo
i have commented --configure but now get new error codes:
Screenshot_8.png

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
Attachments (1)
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
It's saying that it can't find the build program "Ninja".

From the Readme:

2021-06-10_15-25-48.jpg
You will need to install Ninja, or use an alternative build program.

.
Attachments (1)
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Robin_Detobel Accepted Answer Pending Moderation
0
Votes
Undo
That fixed it ,thanks a lot for your help Martin.
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
Robin_Detobel Accepted Answer Pending Moderation
0
Votes
Undo
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.
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo
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.
Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.