Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2020-11

link.res search dirs when cross compiling

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Benito van der Zander

Hi,

where do the SEARCH_DIRs in link.res come from?

My build has started failing, after trying it on a new computer with "/home/benito/bin/arm-linux-androideabi-ld.bfd:android/libs/armeabi/link42815.res:17: ignoring invalid character `'' in expression"

link.res starts with:

SEARCH_DIR(/home/benito/opt/android/sdk/ndk-bundle/platforms/android-21/arch-arm/usr/lib/) SEARCH_DIR(/usr/lib/thunderbird-addons/)
SEARCH_DIR(/usr/lib/modules/)
SEARCH_DIR(/usr/lib/aspell/)
SEARCH_DIR(/usr/lib/gnome-shell/)
SEARCH_DIR(/usr/lib/binfmt-support/)
SEARCH_DIR(/usr/lib/udev/)
SEARCH_DIR(/usr/lib/gcc/)
SEARCH_DIR(/usr/lib/cups/)
SEARCH_DIR(/usr/lib/tmpfiles.d/)
SEARCH_DIR(/usr/lib/firewalld/)
SEARCH_DIR(/usr/lib/X11/)
SEARCH_DIR(/usr/lib/cmake/)
SEARCH_DIR(/usr/lib/realmd/)
SEARCH_DIR(/usr/lib/klibc/)
SEARCH_DIR(/usr/lib/sasl2/)
SEARCH_DIR('/usr/lib/${DEB_HOST_MULTIARCH}/')

...

I guess '/usr/lib/${DEB_HOST_MULTIARCH}/ is the problem.  Why would it even add such a dir

Benito

Reply by email

Jonas Maebe
to Benito van der Zander
Benito van der Zander wrote 5 lines
where do the SEARCH_DIRs in link.res come from? My build has started failing, after trying it on a new computer with "/home/benito/bin/arm-linux-androideabi-ld.bfd:android/libs/armeabi/link42815.res:17: ignoring invalid character `'' in expression"

How are you specifying your cross-compilation sysroot? Make sure you use the -XR parameter for that, and not -Fl or so. -Fl just instructs the compiler/linker to add a directory to the list of standard directories to search, rather than to completely ignore your host system and only look for libraries in the hierarchy below the sysroot.

Jonas

Reply by email

Benito van der Zander
to Marco van de Voort: Op 2020-11-18 om 19:21 schreef Benito van der Zander via fpc-pascal: Some are hardcoded,…
Some are hardcoded, and fpc.cfg might contain -Fl lines with paths too from parsing ld.so.conf on install

Well, I did not put them in ~/.fpc.cfg
In /etc/fpc.cfg there is

-Fl/usr/lib/gcc/x86_64-linux-gnu/10
-Fl/usr/lib/x86_64-linux-gnu/fpc/$fpcversion/lib/$FPCTARGET -Fl/usr/lib/$fpctarget-*

The last one explains it. I actually have a directory /usr/lib/'${DEB_HOST_MULTIARCH}'.  Why would Ubuntu even ship such a directory.

$ dpkg -S DEB_HOST_MULTIARCH
libnss3:i386, libnss3:amd64:
/usr/lib/${DEB_HOST_MULTIARCH}/libfreeblpriv3.chk
libnss3:i386, libnss3:amd64:
/usr/lib/${DEB_HOST_MULTIARCH}/libfreeblpriv3.so
libnss3:i386, libnss3:amd64: /usr/lib/${DEB_HOST_MULTIARCH}/libfreebl3.chk libnss3:i386, libnss3:amd64: /usr/lib/${DEB_HOST_MULTIARCH}/libfreebl3.so libnss3:i386, libnss3:amd64: /usr/lib/${DEB_HOST_MULTIARCH}

Benito

Marco van de Voort wrote 12 lines
Op 2020-11-18 om 19:21 schreef Benito van der Zander via fpc-pascal: > > where do the SEARCH_DIRs in link.res come from? Some are hardcoded, and fpc.cfg might contain -Fl lines with paths too from parsing ld.so.conf on install _______________________________________________ fpc-pascal maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email