Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc

Bruno Haible bruno at clisp.org
Wed May 2 00:49:33 UTC 2012


Steven Chamberlain wrote:
> > It seems that there's an issue with install-reloc:
> 
> Yes there is, but what is its purpose anyway?

install-reloc is used when --enable-relocatable is used. The purpose of
this option is to give the installer the ability to install binaries at
any location in the file system, and move them around when needed. Or
to give a distributor of a package (e.g. videolan.org) the ability to
distribute binaries that users can unpack and run, without having root
permissions.

I think Debian answers this use-case for 'sudoable' users through the
concept of third-party package repositories. But for users with no
extra permissions and who want to download binaries from trusted sources,
--enable-relocatable is the only choice AFAIK.

> For Linux builds it is
> not used so maybe it shouldn't be used either on kFreeBSD or Hurd?

Linux is not the same as kFreeBSD or Hurd.

> With the attached patch it builds just fine on kfreebsd-i386 and I think
> the change would also help fix this on hurd-*.

The $ORIGIN support depends on a file 'dl-origin.c' in the glibc source
tree. But such a file exists only for Linux and kFreeBSD:

$ cd glibc
$ find . -name dl-origin.c
./elf/dl-origin.c
./sysdeps/unix/sysv/linux/dl-origin.c

For kFreeBSD you find it in
<http://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff?revision=5197&view=markup>
and it should normally work, says
<http://lists.debian.org/debian-bsd/2011/08/msg00161.html>.

For the Hurd, a patch has been proposed:
  <http://lists.gnu.org/archive/html/bug-hurd/2011-08/msg00052.html>
but it has apparently not been integrated into glibc so far.

I'm applying this patch. Please let me know if this fixes the Freedink
builds on GNU/kFreeBSD or not.


2012-05-01  Bruno Haible  <bruno at clisp.org>

	relocatable-prog: Enable ELF ORIGIN trick also on GNU/kFreeBSD.
	* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat kFreeBSD like Linux.
	* build-aux/reloc-ldflags: Likewise.
	Suggested by Steven Chamberlain <steven at pyro.eu.org>.

--- build-aux/reloc-ldflags.orig	Wed May  2 02:43:45 2012
+++ build-aux/reloc-ldflags	Wed May  2 02:41:45 2012
@@ -54,7 +54,7 @@
 esac
 
 case "$host_os" in
-  linux*) # Supported since Linux 2.1 and glibc 2.1.
+  linux* | kfreebsd*)
     rpath=
     save_IFS="$IFS"; IFS=":"
     for dir in $library_path_value; do
--- m4/relocatable.m4.orig	Wed May  2 02:43:45 2012
+++ m4/relocatable.m4	Wed May  2 02:42:57 2012
@@ -1,4 +1,4 @@
-# relocatable.m4 serial 17
+# relocatable.m4 serial 18
 dnl Copyright (C) 2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -41,7 +41,7 @@
     AC_CHECK_FUNCS([_NSGetExecutablePath])
     case "$host_os" in
       mingw*) is_noop=yes ;;
-      linux*) use_elf_origin_trick=yes ;;
+      linux* | kfreebsd*) use_elf_origin_trick=yes ;;
     esac
     if test $is_noop = yes; then
       RELOCATABLE_LDFLAGS=:






More information about the Pkg-games-devel mailing list