<div dir="ltr"><div><div><div>I have to pack it in for about 8 hours (I'm "down under") but I can provide more feedback then.<br><br></div>By way of background, I have cross-compilation set up and working well for Linux i386 and Windows i385 and x86_64 targets from this x86_64 development system.<br>
<br>I debootstrapped a raspbian system using qemu to add the ARM/RPi as a new target when I ran into this problem.<br><br>The setup I've used for this target is very similar to the Linux i386 cross setup which works just fine. I've compared the linker arguments and link.res between the i386 and ARM cross builds and cannot see a difference which looks material to the problem.<br>
<br></div>Any suggestions as to what else I can try or where else I can look for a solution are welcome!<br><br></div>Thanks for all your advice so far, it's most appreciated. -b<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Thu, May 23, 2013 at 11:34 PM, Bruce Tulloch <span dir="ltr"><<a href="mailto:pascal@causal.com" target="_blank">pascal@causal.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Okay, I understand the reason for the two file locations, thanks.<br><br></div>The problem occurs ONLY when cross-compiling to ARM. Native (and cross to i386) is fine.<br><br>The files I referred to are on the crossroot not the host despite appearances; the crossroot is at /usr/local/opt/chroot/raspbian/rootfs but I reported these files in my previous email from within a qemu enabled chroot (so they looked like they were native). The machine name "beria" is the chroot and "fermi" is the host.<br>
<br>My apologies for the confusion.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">-b</font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, May 23, 2013 at 11:19 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On 23 May 2013, at 15:03, Bruce Tulloch wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
On Thu, May 23, 2013 at 10:50 PM, Jonas Maebe <<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>><u></u>wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
On 23 May 2013, at 14:32, Bruce Tulloch wrote:<br>
<br>
On Thu, May 23, 2013 at 10:28 PM, Jonas Maebe <<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
**wrote:<div><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 23 May 2013, at 14:25, Bruce Tulloch wrote:<br>
<br>
Do you have a libdl.so in your library search path? And what kind of<br>
reference to libdl does link.res contain?<br>
<br>
Yes, it's in the search path as:<br>
</blockquote>
<br>
root@beria:/lib/arm-linux-<u></u>gnueabihf# ls -l libdl*<br>
-rw-r--r-- 1 root root 9812 Feb 23 00:37 <a href="http://libdl-2.13.so" target="_blank">libdl-2.13.so</a><br>
lrwxrwxrwx 1 root root 13 Feb 23 00:37 libdl.so.2 -> <a href="http://libdl-2.13.so" target="_blank">libdl-2.13.so</a><br>
<br>
</div></blockquote><div>
<br>
You don't have libdl.so, only libdl.so.2. The latter is for use at run<br>
time, the former for use at link/compile time. Install the libc-dev or<br>
similar package in your crossroot to get it along with other missing<br>
symlinks. Do not start creating those manually, it will only lead to errors<br>
and confusion down the line.<br>
<br>
</div></blockquote><div>
Okay, but it is installed:<br>
<br>
root@beria:~# apt-file search libdl.so<br>
libc6: /lib/arm-linux-gnueabihf/<u></u>libdl.so.2<br>
libc6-dev: /usr/lib/arm-linux-gnueabihf/<u></u>libdl.so<br>
</div></blockquote>
<br>
The topic of this thread is about cross-compiling, but those are the files on the native system. Are you getting this error while cross-compiling or while compiling natively? If you are compiling natively, try compiling something with "gcc -### x.c -ldl" to see what parameters gcc passes to linker (create an empty x.c file first).<div>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
root@beria:~# apt-show-versions libc6-dev<br>
libc6-dev/wheezy uptodate 2.13-38+rpi2<br>
<br>
but I noticed that:<br>
<br>
root@beria:/usr/lib/arm-linux-<u></u>gnueabihf# ls -l libdl*<br>
-rw-r--r-- 1 root root 9042 Feb 23 00:38 libdl.a<br>
lrwxrwxrwx 1 root root 35 Feb 23 00:38 libdl.so -><br>
/lib/arm-linux-gnueabihf/<u></u>libdl.so.2<br>
<br>
which means they're the same file.<br>
</blockquote>
<br></div>
Yes, they are the same file. Why that is the case and why nevertheless need both is what I tried to explain in my previous message.<div><div><br>
<br>
<br>
Jonas<br>
______________________________<u></u>_________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>