Re: Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc
Hi, On Wed, May 02, 2012 at 02:49:33AM +0200, Bruno Haible wrote: 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 br...@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 ste...@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.origWed 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=: The fix seems to have the expected result (install-reloc not invoked) under kFreeBSD: make[4]: entrant dans le répertoire « /usr/src/freedink-1.08.20120427/src » test -z /usr/games || /bin/mkdir -p /usr/src/freedink-1.08.20120427/debian/freedink-engine/usr/games /usr/bin/install -c freedink freedinkedit '/usr/src/freedink-1.08.20120427/debian/freedink-engine/usr/games' Though, I'm wondering if it would be better to always invoke install-reloc somehow. We'd probably have spotted this issue earlier if install-reloc were invoked under GNU/Linux as well. WDYT? -- Sylvain -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120502115035.gc11...@perso.beuc.net
Re: Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc
retitle 671044 freedink: FTBFS[!linux]: too many args to install-reloc tags 671044 + patch thanks Hi Sylvain, On 01/05/12 15:56, Sylvain wrote: It seems that there's an issue with install-reloc: Yes there is, but what is its purpose anyway? For Linux builds it is not used so maybe it shouldn't be used either on 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-*. Also attached is the output of 'objdump -p' for the two binaries; I don't see an RPATH or anything that would make them not be relocatable AFAIK. Regards, -- Steven Chamberlain ste...@pyro.eu.org Description: use_elf_origin_trick on non-Linux arches Avoids (wrongly?) using install-reloc on GNU/kFreeBSD and GNU/Hurd. Author: Steven Chamberlain ste...@pyro.eu.org Bug-Debian: http://bugs.debian.org/671044 --- freedink-1.08.20120427.orig/gnulib/m4/relocatable.m4 2012-04-27 12:48:56.0 +0100 +++ freedink-1.08.20120427/gnulib/m4/relocatable.m4 2012-05-01 20:41:06.411344551 +0100 @@ -41,7 +41,7 @@ AC_CHECK_FUNCS([_NSGetExecutablePath]) case $host_os in mingw*) is_noop=yes ;; - linux*) use_elf_origin_trick=yes ;; + linux*|gnu*|k*bsd*-gnu) use_elf_origin_trick=yes ;; esac if test $is_noop = yes; then RELOCATABLE_LDFLAGS=: freedink: file format elf32-i386-freebsd Program Header: PHDR off0x0034 vaddr 0x08048034 paddr 0x08048034 align 2**2 filesz 0x0100 memsz 0x0100 flags r-x INTERP off0x0134 vaddr 0x08048134 paddr 0x08048134 align 2**0 filesz 0x000d memsz 0x000d flags r-- LOAD off0x vaddr 0x08048000 paddr 0x08048000 align 2**12 filesz 0x00041a68 memsz 0x00041a68 flags r-x LOAD off0x00042000 vaddr 0x0808a000 paddr 0x0808a000 align 2**12 filesz 0x073c memsz 0x00391004 flags rw- DYNAMIC off0x0004200c vaddr 0x0808a00c paddr 0x0808a00c align 2**2 filesz 0x0128 memsz 0x0128 flags rw- NOTE off0x0144 vaddr 0x08048144 paddr 0x08048144 align 2**2 filesz 0x0044 memsz 0x0044 flags r-- EH_FRAME off0x00039eec vaddr 0x08081eec paddr 0x08081eec align 2**2 filesz 0x1444 memsz 0x1444 flags r-- STACK off0x vaddr 0x paddr 0x align 2**2 filesz 0x memsz 0x flags rw- Dynamic Section: NEEDED libSDL_mixer-1.2.so.0 NEEDED libSDL_image-1.2.so.0 NEEDED libSDL_ttf-2.0.so.0 NEEDED libSDL_gfx.so.13 NEEDED libSDL-1.2.so.0 NEEDED libfontconfig.so.1 NEEDED libm.so.1 NEEDED libc.so.0.1 INIT 0x0804a99c FINI 0x0807bb9c INIT_ARRAY 0x0808a000 INIT_ARRAYSZ 0x0004 FINI_ARRAY 0x0808a004 FINI_ARRAYSZ 0x0004 HASH 0x08048188 GNU_HASH 0x08048808 STRTAB 0x080495f8 SYMTAB 0x08048868 STRSZ0x0b2f SYMENT 0x0010 DEBUG0x PLTGOT 0x0808a13c PLTRELSZ 0x0658 PLTREL 0x0011 JMPREL 0x0804a344 REL 0x0804a31c RELSZ0x0028 RELENT 0x0008 VERNEED 0x0804a2dc VERNEEDNUM 0x0002 VERSYM 0x0804a128 Version References: required from libm.so.1: 0x0d696913 0x00 03 GLIBC_2.3 required from libc.so.0.1: 0x0d696913 0x00 02 GLIBC_2.3 freedinkedit: file format elf32-i386-freebsd Program Header: PHDR off0x0034 vaddr 0x08048034 paddr 0x08048034 align 2**2 filesz 0x0100 memsz 0x0100 flags r-x INTERP off0x0134 vaddr 0x08048134 paddr 0x08048134 align 2**0 filesz 0x000d memsz 0x000d flags r-- LOAD off0x vaddr 0x08048000 paddr 0x08048000 align 2**12 filesz 0x000411bc memsz 0x000411bc flags r-x LOAD off0x000411bc vaddr 0x0808a1bc paddr 0x0808a1bc align 2**12 filesz 0x0768 memsz 0x00393754 flags rw- DYNAMIC off0x000411c8 vaddr 0x0808a1c8 paddr 0x0808a1c8 align 2**2 filesz 0x0128 memsz 0x0128 flags rw- NOTE off0x0144 vaddr 0x08048144 paddr 0x08048144 align 2**2 filesz 0x0044 memsz 0x0044 flags r-- EH_FRAME off0x00039d8c vaddr 0x08081d8c paddr 0x08081d8c align 2**2 filesz 0x1354 memsz 0x1354 flags r-- STACK off0x vaddr 0x paddr 0x align 2**2 filesz 0x memsz 0x flags rw- Dynamic Section: NEEDED libSDL_mixer-1.2.so.0 NEEDED libSDL_image-1.2.so.0 NEEDED libSDL_ttf-2.0.so.0 NEEDED libSDL_gfx.so.13 NEEDED libSDL-1.2.so.0 NEEDED
Re: Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc
Hi Steven, 'install-reloc' indeed does nothing special in the case of FreeDink+Linux, but it is run as part of the gnulib infrastructure. (I see you understand the relocatable-prog module quite well, but I post this link for other people to understand how it works:) http://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html#Supporting-Relocation In the general case I guess that all systems using ELF and supporting rpath can skip the wrapper as well, but let's hear from the gnulib developers first :) I suppose the patch requires a re-bootstrap? Cheers! Sylvain On Tue, May 01, 2012 at 08:52:25PM +0100, Steven Chamberlain wrote: retitle 671044 freedink: FTBFS[!linux]: too many args to install-reloc tags 671044 + patch thanks Hi Sylvain, On 01/05/12 15:56, Sylvain wrote: It seems that there's an issue with install-reloc: Yes there is, but what is its purpose anyway? For Linux builds it is not used so maybe it shouldn't be used either on 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-*. Also attached is the output of 'objdump -p' for the two binaries; I don't see an RPATH or anything that would make them not be relocatable AFAIK. Regards, -- Steven Chamberlain ste...@pyro.eu.org Description: use_elf_origin_trick on non-Linux arches Avoids (wrongly?) using install-reloc on GNU/kFreeBSD and GNU/Hurd. Author: Steven Chamberlain ste...@pyro.eu.org Bug-Debian: http://bugs.debian.org/671044 --- freedink-1.08.20120427.orig/gnulib/m4/relocatable.m4 2012-04-27 12:48:56.0 +0100 +++ freedink-1.08.20120427/gnulib/m4/relocatable.m4 2012-05-01 20:41:06.411344551 +0100 @@ -41,7 +41,7 @@ AC_CHECK_FUNCS([_NSGetExecutablePath]) case $host_os in mingw*) is_noop=yes ;; - linux*) use_elf_origin_trick=yes ;; + linux*|gnu*|k*bsd*-gnu) use_elf_origin_trick=yes ;; esac if test $is_noop = yes; then RELOCATABLE_LDFLAGS=: freedink: file format elf32-i386-freebsd Program Header: PHDR off0x0034 vaddr 0x08048034 paddr 0x08048034 align 2**2 filesz 0x0100 memsz 0x0100 flags r-x INTERP off0x0134 vaddr 0x08048134 paddr 0x08048134 align 2**0 filesz 0x000d memsz 0x000d flags r-- LOAD off0x vaddr 0x08048000 paddr 0x08048000 align 2**12 filesz 0x00041a68 memsz 0x00041a68 flags r-x LOAD off0x00042000 vaddr 0x0808a000 paddr 0x0808a000 align 2**12 filesz 0x073c memsz 0x00391004 flags rw- DYNAMIC off0x0004200c vaddr 0x0808a00c paddr 0x0808a00c align 2**2 filesz 0x0128 memsz 0x0128 flags rw- NOTE off0x0144 vaddr 0x08048144 paddr 0x08048144 align 2**2 filesz 0x0044 memsz 0x0044 flags r-- EH_FRAME off0x00039eec vaddr 0x08081eec paddr 0x08081eec align 2**2 filesz 0x1444 memsz 0x1444 flags r-- STACK off0x vaddr 0x paddr 0x align 2**2 filesz 0x memsz 0x flags rw- Dynamic Section: NEEDED libSDL_mixer-1.2.so.0 NEEDED libSDL_image-1.2.so.0 NEEDED libSDL_ttf-2.0.so.0 NEEDED libSDL_gfx.so.13 NEEDED libSDL-1.2.so.0 NEEDED libfontconfig.so.1 NEEDED libm.so.1 NEEDED libc.so.0.1 INIT 0x0804a99c FINI 0x0807bb9c INIT_ARRAY 0x0808a000 INIT_ARRAYSZ 0x0004 FINI_ARRAY 0x0808a004 FINI_ARRAYSZ 0x0004 HASH 0x08048188 GNU_HASH 0x08048808 STRTAB 0x080495f8 SYMTAB 0x08048868 STRSZ0x0b2f SYMENT 0x0010 DEBUG0x PLTGOT 0x0808a13c PLTRELSZ 0x0658 PLTREL 0x0011 JMPREL 0x0804a344 REL 0x0804a31c RELSZ0x0028 RELENT 0x0008 VERNEED 0x0804a2dc VERNEEDNUM 0x0002 VERSYM 0x0804a128 Version References: required from libm.so.1: 0x0d696913 0x00 03 GLIBC_2.3 required from libc.so.0.1: 0x0d696913 0x00 02 GLIBC_2.3 freedinkedit: file format elf32-i386-freebsd Program Header: PHDR off0x0034 vaddr 0x08048034 paddr 0x08048034 align 2**2 filesz 0x0100 memsz 0x0100 flags r-x INTERP off0x0134 vaddr 0x08048134 paddr 0x08048134 align 2**0 filesz 0x000d memsz 0x000d flags r-- LOAD off0x vaddr 0x08048000 paddr 0x08048000 align 2**12 filesz 0x000411bc memsz 0x000411bc flags r-x LOAD off0x000411bc vaddr 0x0808a1bc paddr 0x0808a1bc align 2**12 filesz
Re: Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc
Hi, On 01/05/12 21:13, Sylvain wrote: (I see you understand the relocatable-prog module quite well, but I post this link for other people to understand how it works:) http://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html#Supporting-Relocation Ummm, not really, not before today :) So thanks for the link! In the general case I guess that all systems using ELF and supporting rpath can skip the wrapper as well, but let's hear from the gnulib developers first :) Someone more knowledgeable should really answer that... But I thought my patch disabled the use of rpath on these platforms, like Debian recommends in: http://wiki.debian.org/RpathIssue And so this makes install-reloc unnecessary, and the (working) install-sh is used instead. I suppose the patch requires a re-bootstrap? Yes I believe autoconf should be run so that ./configure is rebuilt using the patched m4 script (for me this happened anyway during dpkg-buildpackage, but I expect you will do this before uploading). Thanks, Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4fa04936.8060...@pyro.eu.org
Re: Bug#671044: freedink: FTBFS[!linux]: too many args to install-reloc
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=5197view=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 br...@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 ste...@pyro.eu.org. --- build-aux/reloc-ldflags.origWed 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=: -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2392477.FOimkpmWT8@linuix