Attempting to develop applications for the AXC F 2152 using a Debian WSL (Windows Subsystem for Linux). It seems to work so far and I have seen that it works for other people. However, I have not been able to install the SDK in the linux environment. Running the command: plcncli install sdk -d /opt/SDK_AXC_F_2152_2021-6 -p /opt/pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh Returns the error: The format of the file '/opt/pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh' is not supported. Please proceed manually. -> An error occured while executing the script. xargs: file: No such file or directory sed: no input files find: ‘standard output’: Broken pipe find: write error
Is it possible to execute the script itself on the command line? e.g. $ ./pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh PLCnext Linux SDK installer version 2021.6 ========================================== Enter target directory for SDK (default: /opt/pxc/2021.6): ^C $ Do you have execute permission for the script? 219M -rwxrwxrwx 1 user group 219M Jun 26 06:01 pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh
Initially, running plcncli install sdk returned a „Permission denied“ error. So I ran chmod a+x. As pictured: [attachment]Screenshot 2021-09-20 165810.png[/attachment] After your suggestion I tried to execute the shell script, leading to a different error. root@ORION14:/opt# ./pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh PLCnext Linux SDK installer version 2021.6 ========================================== Enter target directory for SDK (default: /opt/pxc/2021.6): /opt/SDK_AXCF2152_2021.6 You are about to install the SDK to "/opt/SDK_AXCF2152_2021.6". Proceed [Y/n]? y Extracting SDK...................................................................done Setting it up...xargs: file: No such file or directory sed: no input files Failed to replace perl. Relocate script failed. Abort! Permissions of the file are as follows. -rwxr-xr-x 1 root root 228895103 Jul 13 22:45 pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh

OK, so it looks like the problem was the file permissions. I am not sure what is causing that latest error, but if you want to use the plcncli as part of your development process then you should install the SDK using the plcncli command, rather then executing the script directly. Can you try installing the SDK using the plcncli command? EDIT: Oh, I now see that you have tried that. What happens when you try installing the SDK using the plcncli command, but as a standard user, not as root?
Still resulting in the same ‚broken pipe‘ error, as before.
Ran as you suggested, in both /opt and in /home. Returned this error. catherton@ORION14:/home$ plcncli install sdk -d SDK_AXCF2152_2021.6 -p pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf- neon-axcf2152-toolchain-2021.6.sh Failure processing application bundle. Failed to create directory [/var/tmp/.net/plcncli/] for extracting bundled files A fatal error was encountered. Could not extract contents of the bundle When running with sudo, the same „broken pipe“ error occurs: catherton@ORION14:/opt$ sudo plcncli install sdk -d SDK_AXCF2152_2021.6 -p pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh 100.00% Install SDK. 00:00:23 The format of the file '/opt/pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh' is not supported. Please proceed manually. -> An error occured while executing the script. xargs: file: No such file or directory sed: no input files find: ‘standard output’: Broken pipe find: write error
Hmm, that’s strange … Can you create that same directory (/var/tmp/.net/plcncli/) from the command line, using the mkdir command?
mkdir: cannot create directory ‘/var/tmp/.net/plcncli/’: File exists I deleted the directory at ‚/var/tmp/.net/plcncli/‘ and tried again. - With sudo; a ‚broken pipe‘ error occurs. The directory is generated again. - Without sudo; No directory generated. ‚Failed to create directory‘ error occurs.
That looks like some sort of problem with the Linux file system, rather than with the SDK installation script or the plcncli. It should be possible for any user to create files and directories in /var/tmp Can you check the permissions on /var/tmp ? For me (Debian 11) it’s: 12K drwxrwxrwt 11 root root 12K Sep 20 10:08 tmp
$ ls -ld /var/tmp/ drwxrwxrwt 3 root root 4096 Sep 20 16:55 /var/tmp/ $ ls -ld /var/tmp/.net drwx------ 2 root root 4096 Sep 21 11:02 /var/tmp/.net/ I ran „sudo chmod a+rwx /var/tmp/.net“, so now „drwxrwxrwx 2 root root 4096 Sep 21 11:38 /var/tmp/.net/“ Now, plcncli install sdk returns; $ plcncli install sdk -d SDK_AXCF2152_2021.6 -p pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh Error while accessing log file catalog: System.UnauthorizedAccessException: Access to the path '/plcncli/logs/cli/catalog.json' is denied. \---> System.IO.IOException: Permission denied \--- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share) at PlcNext.Common.Tools.UI.LogCatalog.CreateNewLog(String logCatalogPath, String executedCommand) The settings are read-only. Please execute the command with administrator rights. And, with sudo it returns the same broken pipe error; $ sudo plcncli install sdk -d SDK_AXCF2152_2021.6 -p pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t 2hf-neon-axcf2152-toolchain-2021.6.sh 100.00% Install SDK. 00:00:35 The format of the file '/opt/pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh' is not supported. Please proceed manually. -> An error occured while executing the script. xargs: file: No such file or directory sed: no input files find: ‘standard output’: Broken pipe find: write error EDIT: Went through and continued adding full rwx permissions to everything it seemed to get hung up on. Running „plcncli install sdk“ without sudo always results in: The settings are read-only. Please execute the command with administrator rights.
I’d like to get a copy of the SDK .sh file that you’re using, just in case it’s different to the one I have. Is it ok if I send an email to the address you used to register on this forum, with instructions on how to send it to us?
Yes that is ok. Thanks Martin
Email sent, please check your inbox and/or spam folder.
Putting a copy of Martin’s email to me which solved the problem. The offending command in the SDK installation script uses the Linux file command, which it (obviously) assumes is installed. For some reason, this utility is not installed by default on Debian/WSL2. So simply installing the file package using apt (e.g. sudo apt install file) solves the problem for me. Here is the complete list of commands that I used to install the SDK - some of these may not be necessary, but I haven’t gone back to check which may be redundant: On a fresh Debian installation under WSL: # Install dependencies: sudo apt update sudo apt upgrade sudo apt install python3 sudo apt install xz-utils sudo apt install perl sudo apt install file sudo apt install make # Install the SDK: ./pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-axcf2152-toolchain-2021.6.sh (I installed the SDK to /opt/pxc/sdk/AXCF2152/2021.6) # Add the SDK target to the PLCnext CLI: sudo plcncli set setting SdkPaths /opt/pxc/sdk/AXCF2152/2021.6 --add # Check that the target has been added: plcncli get targets #Result: { „targets“: [ { „name“: „AXCF2152“, „version“: „21.6.0.46“, „longVersion“: „2021.6.0 (21.6.0.46)“, „shortVersion“: „21.6.0“, „available“: null } ] }
I have also opened an issue with our developers on this topic, so hopefully future versions of the SDK installation script will include better diagnostics messages to help identify missing dependencies. (ref: #220446)