build 32bit .so with -fPIC lazarus / 1-Linux ---------------------------------------------------------------------- abk.964 · 2024-12-28 09:22 Hi. I try to build 32bit (i386) shared library with -fPIC option. Create new project "Library", set target Linux i386, add -fPIC and -Cg to custom options (think it's synonym), pass to linker option --warn- shared-textrel. Linker say: Code: [Select]/usr/bin/ld: //usr/lib/fpc/3.2.2/units/i386-linux/rtl/system.o: warning: relocation in read-only section `.text.n_system_$$_fpsigaction$longint$psigaction rec$psigactionrec$$longint' /usr/bin/ld: warning: creating a DT_TEXTREL in a shared object "readelf -d" say Code: [Select]0x00000016 (TEXTREL)                    0x0 0x0000001e (FLAGS)                      TEXTREL I use Lazarus 3.99 64bit, FPC 3.2.2, Debian 10 64bit. 32bit FPC runtime builded from sources with default options. I found Fpsigaction in ossysc.inc. Can`t understand, what a problem with it. How to build 32bit .so without TEXTREL ? ---------------------------------------------------------------------- abou.almontacir · 2025-02-02 17:03 I'm also working on enabling PIC for Debian and have similar issue. ---------------------------------------------------------------------- PascalDragon · 2025-02-02 19:31 Quote from: abk.964 on December 28, 2024, 10:22:48 am32bit FPC runtime builded from sources with default options. Try to rebuild your 32-bit FPC distribution with OPT=-Cg just to be sure that everything is alright there. ---------------------------------------------------------------------- abk.964 · 2025-02-03 07:16 Use parameter CREATESHARED rebuilding runtime. For example:Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i make all OS_TARGET=linux CPU_TARGET=i386 CREATESHARED=1 It turns on -Cg option. ---------------------------------------------------------------------- dbannon · 2025-02-03 08:27 Despite that warning, it still makes a PIE executable. My app is built in Debian that way for multiple platforms (except Power64el) for several years and does not trigger the dreaded lintian PIE warning. Davo