install-reloc is invoked with too many arguments

View: New views
11 Messages — Rating Filter:   Alert me  

Parent Message unknown install-reloc is invoked with too many arguments

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

I received the bug report below when compiling GNU FreeDink on
Debian/kFreeBSD and Debian/Hurd.

It seems that there's an issue with install-reloc:
https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=kfreebsd-amd64&ver=1.08.20120427-1&stamp=1335561117
https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=hurd-i386&ver=1.08.20120427-1&stamp=1335555752

  RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games'
  Usage: ../autotools/install-reloc library_path_var library_path_value prefix destdir compile_command srcdir builddir config_h_dir exeext strip_command install_command... destprog

AFAICS 'install-reloc', when run with environment variables, expects
exactly:
- 1 executable
- 1 destprog dir

In this case, the relocatable-prog macros invokes install-reloc with:
- 2 executables (freedink, freedinkedit)
- 1 destprog dir

So I believe 'install-reloc' does not take environment variables into
account, and fails.

Is this a bug in gnulib, or did I do something wrong?

Cheers!
Sylvain

On Tue, May 01, 2012 at 03:57:41PM +0200, Christoph Egger wrote:

> Package: src:freedink
> Version: 1.08.20120427-1
> Severity: serious
> Tags: sid wheezy
> User: debian-bsd@...
> Usertags: kfreebsd
> X-Debbugs-Cc: debian-bsd@...
> Justification: fails to build from source (but built successfully in the past)
>
> Hi!
>
> Your package failed to build on the kfreebsd-* buildds:
>
> Making install in src
> make[3]: Entering directory `/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/src'
> make[4]: Entering directory `/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/src'
> test -z "/usr/games" || /bin/mkdir -p "/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games"
> test -z "/usr/share/man/man6" || /bin/mkdir -p "/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/share/man/man6"
>  RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games'
> Usage: ../autotools/install-reloc library_path_var library_path_value prefix destdir compile_command srcdir builddir config_h_dir exeext strip_command install_command... destprog
> make[4]: *** [install-binPROGRAMS] Error 1
> make[4]: *** Waiting for unfinished jobs....
>
> Full build log at
> https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=kfreebsd-amd64&ver=1.08.20120427-1&stamp=1335561117
>
> Regards
>
>     Christoph
>
> If you have further questions please mail debian-bsd@...
>
> --
> 9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
> Debian Developer | Lisp Hacker | CaCert Assurer


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

by Steven Chamberlain :: Rate this Message:

| View Threaded | Show Only this Message

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
steven@...

[nonlinux-use-elf-origin-trick.patch]

Description: use_elf_origin_trick on non-Linux arches
 Avoids (wrongly?) using install-reloc on GNU/kFreeBSD and GNU/Hurd.
Author: Steven Chamberlain <steven@...>
Bug-Debian: http://bugs.debian.org/671044

--- freedink-1.08.20120427.orig/gnulib/m4/relocatable.m4 2012-04-27 12:48:56.000000000 +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 off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
         filesz 0x00000100 memsz 0x00000100 flags r-x
  INTERP off    0x00000134 vaddr 0x08048134 paddr 0x08048134 align 2**0
         filesz 0x0000000d memsz 0x0000000d flags r--
    LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x00041a68 memsz 0x00041a68 flags r-x
    LOAD off    0x00042000 vaddr 0x0808a000 paddr 0x0808a000 align 2**12
         filesz 0x0000073c memsz 0x00391004 flags rw-
 DYNAMIC off    0x0004200c vaddr 0x0808a00c paddr 0x0808a00c align 2**2
         filesz 0x00000128 memsz 0x00000128 flags rw-
    NOTE off    0x00000144 vaddr 0x08048144 paddr 0x08048144 align 2**2
         filesz 0x00000044 memsz 0x00000044 flags r--
EH_FRAME off    0x00039eec vaddr 0x08081eec paddr 0x08081eec align 2**2
         filesz 0x00001444 memsz 0x00001444 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 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         0x00000004
  FINI_ARRAY           0x0808a004
  FINI_ARRAYSZ         0x00000004
  HASH                 0x08048188
  GNU_HASH             0x08048808
  STRTAB               0x080495f8
  SYMTAB               0x08048868
  STRSZ                0x00000b2f
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x0808a13c
  PLTRELSZ             0x00000658
  PLTREL               0x00000011
  JMPREL               0x0804a344
  REL                  0x0804a31c
  RELSZ                0x00000028
  RELENT               0x00000008
  VERNEED              0x0804a2dc
  VERNEEDNUM           0x00000002
  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 off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
         filesz 0x00000100 memsz 0x00000100 flags r-x
  INTERP off    0x00000134 vaddr 0x08048134 paddr 0x08048134 align 2**0
         filesz 0x0000000d memsz 0x0000000d flags r--
    LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x000411bc memsz 0x000411bc flags r-x
    LOAD off    0x000411bc vaddr 0x0808a1bc paddr 0x0808a1bc align 2**12
         filesz 0x00000768 memsz 0x00393754 flags rw-
 DYNAMIC off    0x000411c8 vaddr 0x0808a1c8 paddr 0x0808a1c8 align 2**2
         filesz 0x00000128 memsz 0x00000128 flags rw-
    NOTE off    0x00000144 vaddr 0x08048144 paddr 0x08048144 align 2**2
         filesz 0x00000044 memsz 0x00000044 flags r--
EH_FRAME off    0x00039d8c vaddr 0x08081d8c paddr 0x08081d8c align 2**2
         filesz 0x00001354 memsz 0x00001354 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 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                 0x0804a9ac
  FINI                 0x0807a7fc
  INIT_ARRAY           0x0808a1bc
  INIT_ARRAYSZ         0x00000004
  FINI_ARRAY           0x0808a1c0
  FINI_ARRAYSZ         0x00000004
  HASH                 0x08048188
  GNU_HASH             0x08048808
  STRTAB               0x080495f4
  SYMTAB               0x08048864
  STRSZ                0x00000b3d
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x0808a2f8
  PLTRELSZ             0x00000660
  PLTREL               0x00000011
  JMPREL               0x0804a34c
  REL                  0x0804a324
  RELSZ                0x00000028
  RELENT               0x00000008
  VERNEED              0x0804a2e4
  VERNEEDNUM           0x00000002
  VERSYM               0x0804a132

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


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

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

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
> steven@...

> Description: use_elf_origin_trick on non-Linux arches
>  Avoids (wrongly?) using install-reloc on GNU/kFreeBSD and GNU/Hurd.
> Author: Steven Chamberlain <steven@...>
> Bug-Debian: http://bugs.debian.org/671044
>
> --- freedink-1.08.20120427.orig/gnulib/m4/relocatable.m4 2012-04-27 12:48:56.000000000 +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 off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
>          filesz 0x00000100 memsz 0x00000100 flags r-x
>   INTERP off    0x00000134 vaddr 0x08048134 paddr 0x08048134 align 2**0
>          filesz 0x0000000d memsz 0x0000000d flags r--
>     LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
>          filesz 0x00041a68 memsz 0x00041a68 flags r-x
>     LOAD off    0x00042000 vaddr 0x0808a000 paddr 0x0808a000 align 2**12
>          filesz 0x0000073c memsz 0x00391004 flags rw-
>  DYNAMIC off    0x0004200c vaddr 0x0808a00c paddr 0x0808a00c align 2**2
>          filesz 0x00000128 memsz 0x00000128 flags rw-
>     NOTE off    0x00000144 vaddr 0x08048144 paddr 0x08048144 align 2**2
>          filesz 0x00000044 memsz 0x00000044 flags r--
> EH_FRAME off    0x00039eec vaddr 0x08081eec paddr 0x08081eec align 2**2
>          filesz 0x00001444 memsz 0x00001444 flags r--
>    STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
>          filesz 0x00000000 memsz 0x00000000 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         0x00000004
>   FINI_ARRAY           0x0808a004
>   FINI_ARRAYSZ         0x00000004
>   HASH                 0x08048188
>   GNU_HASH             0x08048808
>   STRTAB               0x080495f8
>   SYMTAB               0x08048868
>   STRSZ                0x00000b2f
>   SYMENT               0x00000010
>   DEBUG                0x00000000
>   PLTGOT               0x0808a13c
>   PLTRELSZ             0x00000658
>   PLTREL               0x00000011
>   JMPREL               0x0804a344
>   REL                  0x0804a31c
>   RELSZ                0x00000028
>   RELENT               0x00000008
>   VERNEED              0x0804a2dc
>   VERNEEDNUM           0x00000002
>   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 off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
>          filesz 0x00000100 memsz 0x00000100 flags r-x
>   INTERP off    0x00000134 vaddr 0x08048134 paddr 0x08048134 align 2**0
>          filesz 0x0000000d memsz 0x0000000d flags r--
>     LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
>          filesz 0x000411bc memsz 0x000411bc flags r-x
>     LOAD off    0x000411bc vaddr 0x0808a1bc paddr 0x0808a1bc align 2**12
>          filesz 0x00000768 memsz 0x00393754 flags rw-
>  DYNAMIC off    0x000411c8 vaddr 0x0808a1c8 paddr 0x0808a1c8 align 2**2
>          filesz 0x00000128 memsz 0x00000128 flags rw-
>     NOTE off    0x00000144 vaddr 0x08048144 paddr 0x08048144 align 2**2
>          filesz 0x00000044 memsz 0x00000044 flags r--
> EH_FRAME off    0x00039d8c vaddr 0x08081d8c paddr 0x08081d8c align 2**2
>          filesz 0x00001354 memsz 0x00001354 flags r--
>    STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
>          filesz 0x00000000 memsz 0x00000000 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                 0x0804a9ac
>   FINI                 0x0807a7fc
>   INIT_ARRAY           0x0808a1bc
>   INIT_ARRAYSZ         0x00000004
>   FINI_ARRAY           0x0808a1c0
>   FINI_ARRAYSZ         0x00000004
>   HASH                 0x08048188
>   GNU_HASH             0x08048808
>   STRTAB               0x080495f4
>   SYMTAB               0x08048864
>   STRSZ                0x00000b3d
>   SYMENT               0x00000010
>   DEBUG                0x00000000
>   PLTGOT               0x0808a2f8
>   PLTRELSZ             0x00000660
>   PLTREL               0x00000011
>   JMPREL               0x0804a34c
>   REL                  0x0804a324
>   RELSZ                0x00000028
>   RELENT               0x00000008
>   VERNEED              0x0804a2e4
>   VERNEEDNUM           0x00000002
>   VERSYM               0x0804a132
>
> 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
>



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

by Steven Chamberlain :: Rate this Message:

| View Threaded | Show Only this Message

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
steven@...


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

by Bruno Haible :: Rate this Message:

| View Threaded | Show Only this Message

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@...>

        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@...>.

--- 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=:



Re: install-reloc is invoked with too many arguments

by Bruno Haible :: Rate this Message:

| View Threaded | Show Only this Message

Hi Sylvain,

> I received the bug report below when compiling GNU FreeDink on
> Debian/kFreeBSD and Debian/Hurd.
>
> It seems that there's an issue with install-reloc:
> https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=kfreebsd-amd64&ver=1.08.20120427-1&stamp=1335561117
> https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=hurd-i386&ver=1.08.20120427-1&stamp=1335555752
>
>   RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games'
>   Usage: ../autotools/install-reloc library_path_var library_path_value prefix destdir compile_command srcdir builddir config_h_dir exeext strip_command install_command... destprog
>
> AFAICS 'install-reloc', when run with environment variables, expects
> exactly:
> - 1 executable
> - 1 destprog dir
>
> In this case, the relocatable-prog macros invokes install-reloc with:
> - 2 executables (freedink, freedinkedit)
> - 1 destprog dir
Indeed, when invoked with RELOC_* environment variables, 'install-reloc'
was meant to install one program only. This was how it was meant to be
invoked from Automake. But this changed in Automake on 2008-09-07, see
http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4295fe33eb23fb9440ee6a7404ec064067266372

Can you please try this modified 'install-reloc' program instead?
Save it and do a "chmod +x install-reloc" before you can use it.
Does it help on hurd-i386 (or on kFreeBSD as well, without the other patch)?

Bruno



install-reloc (8K) Download Attachment

Re: install-reloc is invoked with too many arguments

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi Bruno,

On Wed, May 02, 2012 at 03:43:00AM +0200, Bruno Haible wrote:

> Hi Sylvain,
>
> > I received the bug report below when compiling GNU FreeDink on
> > Debian/kFreeBSD and Debian/Hurd.
> >
> > It seems that there's an issue with install-reloc:
> > https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=kfreebsd-amd64&ver=1.08.20120427-1&stamp=1335561117
> > https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=hurd-i386&ver=1.08.20120427-1&stamp=1335555752
> >
> >   RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games'
> >   Usage: ../autotools/install-reloc library_path_var library_path_value prefix destdir compile_command srcdir builddir config_h_dir exeext strip_command install_command... destprog
> >
> > AFAICS 'install-reloc', when run with environment variables, expects
> > exactly:
> > - 1 executable
> > - 1 destprog dir
> >
> > In this case, the relocatable-prog macros invokes install-reloc with:
> > - 2 executables (freedink, freedinkedit)
> > - 1 destprog dir
>
> Indeed, when invoked with RELOC_* environment variables, 'install-reloc'
> was meant to install one program only. This was how it was meant to be
> invoked from Automake. But this changed in Automake on 2008-09-07, see
> http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4295fe33eb23fb9440ee6a7404ec064067266372
>
> Can you please try this modified 'install-reloc' program instead?
> Save it and do a "chmod +x install-reloc" before you can use it.
> Does it help on hurd-i386 (or on kFreeBSD as well, without the other patch)?

Thanks for the prompt fix :)

The new install-reloc works correctly on GNU/kFreeBSD :

  test -z "/usr/games" || /bin/mkdir -p "/usr/src/freedink-1.08.20120427/debian/freedink-engine/usr/games"
   RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/usr/src/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/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

Note, though, that FreeDink does not have its own libraries, to
install-reloc is just invoking 'install'.  This didn't test the path
where install-reloc installs the wrapper.

I'll try on Debian/Hurd when I have the environment ready.

Cheers!
Sylvain


Re: install-reloc is invoked with too many arguments

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, May 02, 2012 at 12:43:48PM +0200, Sylvain wrote:

> Hi Bruno,
>
> On Wed, May 02, 2012 at 03:43:00AM +0200, Bruno Haible wrote:
> > Hi Sylvain,
> >
> > > I received the bug report below when compiling GNU FreeDink on
> > > Debian/kFreeBSD and Debian/Hurd.
> > >
> > > It seems that there's an issue with install-reloc:
> > > https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=kfreebsd-amd64&ver=1.08.20120427-1&stamp=1335561117
> > > https://buildd.debian.org/status/fetch.php?pkg=freedink&arch=hurd-i386&ver=1.08.20120427-1&stamp=1335555752
> > >
> > >   RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/build/buildd-freedink_1.08.20120427-1-kfreebsd-amd64-I0HlF8/freedink-1.08.20120427/debian/freedink-engine/usr/games'
> > >   Usage: ../autotools/install-reloc library_path_var library_path_value prefix destdir compile_command srcdir builddir config_h_dir exeext strip_command install_command... destprog
> > >
> > > AFAICS 'install-reloc', when run with environment variables, expects
> > > exactly:
> > > - 1 executable
> > > - 1 destprog dir
> > >
> > > In this case, the relocatable-prog macros invokes install-reloc with:
> > > - 2 executables (freedink, freedinkedit)
> > > - 1 destprog dir
> >
> > Indeed, when invoked with RELOC_* environment variables, 'install-reloc'
> > was meant to install one program only. This was how it was meant to be
> > invoked from Automake. But this changed in Automake on 2008-09-07, see
> > http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4295fe33eb23fb9440ee6a7404ec064067266372
> >
> > Can you please try this modified 'install-reloc' program instead?
> > Save it and do a "chmod +x install-reloc" before you can use it.
> > Does it help on hurd-i386 (or on kFreeBSD as well, without the other patch)?
>
> Thanks for the prompt fix :)
>
> The new install-reloc works correctly on GNU/kFreeBSD :
>
>   test -z "/usr/games" || /bin/mkdir -p "/usr/src/freedink-1.08.20120427/debian/freedink-engine/usr/games"
>    RELOC_LIBRARY_PATH_VAR=LD_LIBRARY_PATH RELOC_LIBRARY_PATH_VALUE= RELOC_PREFIX=/usr RELOC_DESTDIR=/usr/src/freedink-1.08.20120427/debian/freedink-engine RELOC_COMPILE_COMMAND=gcc -g -O2 -Wall -std=c99 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  RELOC_SRCDIR=../gnulib/lib RELOC_BUILDDIR=../gnulib/lib RELOC_CONFIG_H_DIR=.. RELOC_EXEEXT= RELOC_STRIP_PROG=: RELOC_INSTALL_PROG=/usr/bin/install -c ../autotools/install-reloc freedink freedinkedit '/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
>
> Note, though, that FreeDink does not have its own libraries, to
> install-reloc is just invoking 'install'.  This didn't test the path
> where install-reloc installs the wrapper.
>
> I'll try on Debian/Hurd when I have the environment ready.

I tested the fix under Debian/Hurd.  AFAICS it works :)

I'll upload a new Debian version of FreeDink with the updated
install-reloc so we'll see if the autobuilders agree.

--
Sylvain


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

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

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  <bruno@...>
>
> 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@...>.
>
> --- 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=:

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


Re: install-reloc is invoked with too many arguments

by Sylvain Beucler-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

On Wed, May 02, 2012 at 01:47:06PM +0200, Sylvain wrote:
> On Wed, May 02, 2012 at 12:43:48PM +0200, Sylvain wrote:
> I tested the fix under Debian/Hurd.  AFAICS it works :)
>
> I'll upload a new Debian version of FreeDink with the updated
> install-reloc so we'll see if the autobuilders agree.

FreeDink now compiles on all Debian architectures with the new
install-reloc.

You can commit it :)

--
Sylvain


Re: install-reloc is invoked with too many arguments

by Sylvain Beucler :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

On Fri, May 04, 2012 at 08:20:51AM +0200, Sylvain wrote:

> On Wed, May 02, 2012 at 01:47:06PM +0200, Sylvain wrote:
> > On Wed, May 02, 2012 at 12:43:48PM +0200, Sylvain wrote:
> > I tested the fix under Debian/Hurd.  AFAICS it works :)
> >
> > I'll upload a new Debian version of FreeDink with the updated
> > install-reloc so we'll see if the autobuilders agree.
>
> FreeDink now compiles on all Debian architectures with the new
> install-reloc.
>
> You can commit it :)

Are you waiting for an action on my part before committing it?

Cheers!
Sylvain