Lazarus
Programming => Operating Systems => Linux => Topic started by: stephanweber on March 19, 2019, 08:37:24 am
-
Hi, I am able to work under RH60, Ubuntu 16.04, and Windows, but now having a VMWare with RH73 I cannot link, only compilation works.
I checked the link settings, tried different ones, like smart on/off, but nothing helps. I expected a permission problem too, but I can write to the proj dir, and also running lazarus as su does not enable the linking. I also tried running lazarus compiled programs from RH6 under this RH73 env, but there are no problems.
Has anyone an idea on what could cause such linking problems?
Bye Stephan
-
Maybe some apparmor thingy that requires a certain signature ?
-
Hi, I am able to work under RH60, Ubuntu 16.04, and Windows, but now having a VMWare with RH73 I cannot link, only compilation works.
I checked the link settings, tried different ones, like smart on/off, but nothing helps. I expected a permission problem too, but I can write to the proj dir, and also running lazarus as su does not enable the linking. I also tried running lazarus compiled programs from RH6 under this RH73 env, but there are no problems.
Has anyone an idea on what could cause such linking problems?
Bye Stephan
Add -va -k--verbose compiler options to your project and attach compiler output to this thread so we can see what error linker gives (and the compiler if there is any, too).
Which version of Lazarus and FPC you are using?
-
I have two installations of CetnOS 7.3 and CetnOS 7.6 (clone of RHEL) with Lazarus 1.6.4 and Lazarus 2.0.0 and I don't have any problem with compilation. SELinux is active.
I think, it is caused by missing library in your RH7.3 installation.
-
Hi, I am using RH73 and Lazarus 1.8.4 (and 2.0).
Under RH60 I work with Lazarus 1.0, and under Ubuntu 16.04 with Lazarus 1.6. - All is perfect! But not RH73 :(.
The log from RH73+1.8.4 is this:
Compile Project, Target: project1
Compile Reason: Last compile was incomplete.
State file=/home2/stephan/test_simple/lib/x86_64-linux/project1.compiled
Executable:
/usr/bin/fpc
CurrentDirectory:
/home2/stephan/test_simple/
Parameters:
-MObjFPC
-Scghi
-Cg
-O1
-l
-vewnhibq
-Fi/home2/stephan/test_simple/lib/x86_64-linux
-Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/gtk2
-Fu/usr/lib64/lazarus/lcl/units/x86_64-linux
-Fu/usr/lib64/lazarus/components/lazutils/lib/x86_64-linux
-Fu/usr/lib64/lazarus/packager/units/x86_64-linux
-Fu/home2/stephan/test_simple/
-FU/home2/stephan/test_simple/lib/x86_64-linux/
-dLCL
-dLCLgtk2
project1.lpr
Command Line:
/usr/bin/fpc -MObjFPC -Scghi -Cg -O1 -l -vewnhibq -Fi/home2/stephan/test_simple/lib/x86_64-linux -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/gtk2 -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux -Fu/usr/lib64/lazarus/components/lazutils/lib/x86_64-linux -Fu/usr/lib64/lazarus/packager/units/x86_64-linux -Fu/home2/stephan/test_simple/ -FU/home2/stephan/test_simple/lib/x86_64-linux/ -dLCL -dLCLgtk2 project1.lpr
ProcessID:
3918
ExitStatus:
256
Error: Exit code 256
Any idea what goes wrong? Now I switched to Lazarus 2.0, but it does not change anything regarding linking.
-
RH 7.3 ? :))))))
Ok, there might be problem with gtk2 version on RH7.3 since some new symbols (lclgtk2) are introduced in between lazarus 1.0 and 1.8 so you should post linker errors so we can see what symbols are missing in distro libgtk2
-
RH 7.3 ? :))))))
...8 so you should post linker errors so we can see what symbols are missing in distro libgtk2
Great finding O:-), but where can I find the linker errors? And how to fix the libgtk2 problems?
-
RH 7.3 ? :))))))
...8 so you should post linker errors so we can see what symbols are missing in distro libgtk2
Great finding O:-), but where can I find the linker errors? And how to fix the libgtk2 problems?
As Cyrax said above:
Add -va -k--verbose compiler options to your project and attach compiler output to this thread so we can see what error linker gives (and the compiler if there is any, too).
-
Hi,
I enabled these additional compiler options, but I still cannot really see more information, which could help me in fixing the linker problems. Please check out the attach png file from my Lazarus "Message" window.
I also inspected the unix directories of my project, but see nothing helpful still.
Thanks a lot for your help so far 8-), Stephan
-
There should be .sh script in project directory leaved by linking stage (if linking fails). Position to that dir via terminal and execute that script so you'll see detailed ld output (cannot remember exact name of script...maybe it's pp.sh or similar).
-
There should be .sh script in project directory leaved by linking stage (if linking fails). ...
Unfortunately there is no sh file in proj dir, only a linker resource file (but this does not contain any error messages).
However, If running another program I also got lib errors!!! So indeed my RH73 has a problem on libs, e.g. gives me:
(gedit:3412): GLib-GIO-CRITICAL **: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed
How can I repair this?
Bye Stephan
-
Hi,
I still need help: I have executed the command mentioned in the log from shell directly and got a more detailed error message:
/usr/bin/ld -b elf64-x86-64 -m elf_x86_64 --verbose --dynamic-linker=/lib64/ld-linux-x86-64.so.2 -s -L. -o /home2/stephan/test_simple/project1 /home2/stephan/test_simple/link.res
gives:
......
libgraphite2.so.3 needed by /usr/lib64/libharfbuzz.so.0
found libgraphite2.so.3 at /usr/lib64/libgraphite2.so.3
libpcre.so.1 needed by /usr/lib64/libselinux.so.1
found libpcre.so.1 at /usr/lib64/libpcre.so.1
libgcc_s.so.1 needed by /usr/lib64/libgraphite2.so.3
found libgcc_s.so.1 at /usr/lib64/libgcc_s.so.1
/usr/bin/ld: /usr/lib64/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
How can I get rid of this error?
Bye Stephan
-
Throwing the error in google yields:
https://stackoverflow.com/questions/46058050/unable-to-compile-unrecognized-relocation
Search for "binutils-config"