tags 636802 +patch
thanks

Note: jonas's reply was only posted to fpc-devel, not to the debian bug report , a copy can be found at http://lists.freepascal.org/lists/fpc-devel/2011-August/025444.html

Jonas Maebe wrote:

Is there a standard for multiarch library path locations and names?
Multiarch seems to be a debian/ubuntu creation. Debian and ubuntu seem to be consistent at least on i386 and amd64. I'm not sure what the situation is with arm ports of ubuntu (note that multiarch triplets are supposed to represent an ABI so two arm ports with incompatible ABIs are supposed to have different multiarch triplets).
If not, that sounds like configuration option that should be added by distribution-specific patches.
I've attatched a patch to debian/rules to add the multiarch path to the configuration installed by the debian package.
--- fpc-2.4.4/debian/rules	2011-07-04 22:41:08.000000000 +0100
+++ fpc-2.4.4.new/debian/rules	2011-08-18 08:35:48.000000000 +0100
@@ -62,6 +62,7 @@
 DEB_UPSTREAM_VERSION:=$(shell echo $(DEB_VERSION) | cut -f 1 -d -)
 DEB_UPSTREAM_MAIN_VERSION:=$(shell echo ${DEB_UPSTREAM_VERSION} | sed -e 's/^\([0-9\.]*\).*/\1/')
 DEB_BUILD=$(lastword $(subst -, ,${DEB_VERSION}))
+DEB_BUILD_MULTIARCH:=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
 ifndef PACKAGESUFFIX
 export PACKAGESUFFIX=-${DEB_UPSTREAM_MAIN_VERSION}
 endif
@@ -205,6 +206,9 @@
 	# Install configuration files
 	/bin/bash fpcsrc/compiler/utils/samplecfg \
 		/usr/lib/fpc/${DEB_UPSTREAM_VERSION} ${INSTALL_DIR}/etc
+	# Add multiarch path to /etc/fpc.cfg so executables linked against libc can be corectly linked
+	echo # multiarch library search path >> ${INSTALL_DIR}/etc/fpc.cfg
+	echo -Fl/usr/lib/$(DEB_BUILD_MULTIARCH) >> ${INSTALL_DIR}/etc/fpc.cfg
 	${MV} ${INSTALL_DIR}/etc/fpc.cfg ${INSTALL_DIR}/etc/fpc-${DEB_UPSTREAM_MAIN_VERSION}.cfg
 	# Install RTL demos
 	$(MAKE) -C demo sourceinstall $(INSTALLOPTS) INSTALL_SOURCEDIR=$(DOC_DIR)/fp-compiler/${DEB_UPSTREAM_MAIN_VERSION}

Reply via email to