airvigilante194
I am running Ubuntu GNU/Linux 22.04 and trying to run the ./ install.sh linux script. I get the error

/usr/bin/ld: stage4/generate_c/libstage4_c.a(stage4.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE

when I try running the script. I have tried editing the Makefile in the stage4/generate_c/ folder to include -no-pie, -fPIC, and -fPIE, but the Makefile appears to be regenerated with the g++ command without these flags whenever I run the ./ install.sh linux command.

May anyone assist?
Reply 0 0
nikucolor
What device are you running ubuntu on? I installed Open plc runtime on raspberry pi 5 and it works perfectly
Reply 0 0
airvigilante194
Does this help? I may provide more detailed info upon request.
 
[203128%2F9539801%2Fmceclip0]
Reply 0 0
thiagoralves
I can’t reproduce this on my Ubuntu 22.04 VM. The runtime compiles fine. Are you trying to do anything different with it? Are you building the original code or have you made changes to it? Are you running the install script according to the instructions?
Reply 0 0
airvigilante194
This is the tail end of the feedback when I try to compile with "./ install.sh linux" :

[203128%2F9540881%2Fmceclip0]

Thanks so much for any assistance you may provide.
Reply 0 0
thiagoralves
It seems that something specific to your environment is breaking the compilation of MatIEC. Try compiling on a different machine and then transfer the compiled iec2c binary over to your machine and see if it works.
Reply 0 0
airvigilante194
I don't really have another GNU/Linux machine; does anyone else have any other advice?
Reply 0 0
thiagoralves
Install VirtualBox (or any other VM tool of your choice) and then install a clean Ubuntu 22.04 inside it. Then install the runtime inside this VM and if everything works correctly, copy the binaries over to your machine
Reply 0 0
airvigilante194
To what directory should I copy the binaries on my machine?
Reply 0 0
thiagoralves
You can follow the directions from the installer script to set up everything manually: https://github.com/Autonomy-Logic/OpenPLC_v3/blob/master/background_installer.sh
 
Or alternatively you can copy the iec2c binary to the /webserver folder, comment the installation of MatIEC from the installer (line 120 onward) and then run the installer again.
Reply 0 0
airvigilante194
This appears to have worked https://gemini.google.com/share/427452faac8c

I gave the commands
export CFLAGS="-fno-PIE"
export CXXFLAGS="-fno-PIE"
export LDFLAGS="-fno-PIE"
per the AI's suggestion, and the installer ran properly.

I really do appreciate your trying. Maybe this AI thing isn't a bubble after all 😃
Reply 1 0
GarryLind
I am running Ubuntu GNU/Linux 22.04 and trying to run the ./ install.sh linux script. I get the error

/usr/bin/ld: stage4/generate_c/libstage4_c.a(stage4.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE

when I try running the script. I have tried editing the Makefile in the stage4/generate_c/ folder to include -no-pie, -fPIC, and -fPIE, but the Makefile appears to be regenerated with the g++ command without these flags whenever I run the ./ install.sh linux command.

May anyone assist?
i use Google
Reply 0 0
Write a reply...
Reply