#12112 closed bug (invalid)
runtime_loader cannot find libstdc++
Reported by: | haiqu | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | System/runtime_loader | Version: | R1/Development |
Keywords: | Lazarus | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Recently built Lazarus from sources on a hybrid system with the GCC4 compiler. Qt runs fine, FPC runs fine, Lazarus compiles without error. When invoked, Lazarus causes the following system message:
runtime_loader cannot find libstdc++.so.6 - no such file or directory.
Bizarre.
Attachments (1)
Change History (11)
comment:1 by , 9 years ago
comment:3 by , 9 years ago
OK, I got to the bottom of this one. Using 'strace -l lazarus > strace.txt' and reading the result it's clear that the system is never searching /boot/system/lib/x86 for the required libraries. You can also see this by doing 'setarch x86' then dumping the environment to screen. The library path is always the gcc2 files.
comment:4 by , 9 years ago
And as proof, I did this:
export LIBRARY_PATH=/boot/system/lib/x86:$LIBRARY_PATH
and it started right up!
comment:6 by , 9 years ago
Can you paste the result of these commands:
objdump -s --section .comment /path/to/binary
objdump -x /path/to/binary | fgrep RPATH
comment:7 by , 9 years ago
Sure.
./lazarus: file format elf32-i386
Contents of section .comment:
0000 00474343 3a202847 4e552920 322e3935 .GCC: (GNU) 2.95 0010 2e332d68 61696b75 2d323031 345f3037 .3-haiku-2014_07 0020 5f323600 _26.
I'll attach the fgrep, it's pretty big.
comment:8 by , 9 years ago
Dunno where that .comment section got gcc2 from, although I did use a pre-packaged version of FPC and it may have been compiled with gcc2
Edit: Nope, an objdump of FPC shows it was built with GCC4
comment:9 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You must have linked with LD from GCC2 binutils, that will use the init_term_dyn and GCC2 crtbegin/crtend. Either way, this isn't a runtime_loader bug, for certain.
comment:10 by , 5 years ago
Milestone: | Unscheduled |
---|
Remove milestone for tickets with status = closed and resolution != fixed
This error is usually caused by linking together apps/libs using both the gcc2 and gcc4 runtime. In this case, you probably used a gcc4 Qt with a gcc2 fpc?