unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help with $SHELL in perl package for backuppc
@ 2019-08-21 21:22 Jack Hill
  2019-08-22 14:49 ` Jack Hill
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Hill @ 2019-08-21 21:22 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 10363 bytes --]

Hi Guix,

I'm working on packaging backuppc. So far, with the help of the cpan 
importer, I have the following package definition for BackupPC::XS which 
the part of BackupPC implemented in C and a Perl module that exposes that 
functionality:

```
(define-public perl-backuppc-xs
   (package
   (name "perl-backuppc-xs")
   (version "0.59")
   (source
     (origin
       (method url-fetch)
       (uri (string-append
              "mirror://cpan/authors/id/C/CB/CBARRATT/BackupPC-XS-"
              version
              ".tar.gz"))
       (sha256
         (base32
           "1rp57x3amv4g3sa1az83f5xyw25cj7hhvmj3jczrkmfbrpnxlkca"))))
   (build-system perl-build-system)
   (home-page
    "https://backuppc.github.io")
   (synopsis
     "Perl extension for BackupPC libraries")
   (description "to be written")
   (license gpl3+)))
```

However, that fails to build because it tries to invoke /bin/sh (see full 
build log at the end of this message).

Line 2465 in configure.sh is suspicious as it reads:

```
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
```

I tried modifying the package definition to add a phase that sets the 
SHELL variable, but that did not alter the build error. My package 
definition with that change looks like:

```
(define-public perl-backuppc-xs
   (package
   (name "perl-backuppc-xs")
   (version "0.59")
   (source
     (origin
       (method url-fetch)
       (uri (string-append
              "mirror://cpan/authors/id/C/CB/CBARRATT/BackupPC-XS-"
              version
              ".tar.gz"))
       (sha256
         (base32
           "1rp57x3amv4g3sa1az83f5xyw25cj7hhvmj3jczrkmfbrpnxlkca"))))
   (build-system perl-build-system)
   (arguments
    '(#:phases
      (modify-phases %standard-phases
        (add-before 'configure 'set-environment-variables
          (lambda _
            (setenv "SHELL" (which "sh"))
            #t)))))
   (home-page
    "https://backuppc.github.io")
   (synopsis
     "Perl extension for BackupPC libraries")
   (description "to be written")
   (license gpl3+)))
```

I'm not sure what I should try next? Ideas?

Best,
Jack

starting phase `set-SOURCE-DATE-EPOCH'
phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds
starting phase `set-paths'
environment variable `PATH' set to `/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin:/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin:/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin:/gnu/store/j74aabxwayjl9yfyrm6ni482gykxq48b-bzip2-1.0.6/bin:/gnu/store/9425b5dwpfc04bb4p58hsjypxghliyr3-xz-5.2.4/bin:/gnu/store/ypiyk8ngn79cz655jrl0hng37xv54yjr-file-5.33/bin:/gnu/store/4bzzz0lzjc9b7bfsnqbq2j22d4fvf433-diffutils-3.6/bin:/gnu/store/a4rxl40jr7gmq8bp3dryq4yq67cwkwiw-patch-2.7.6/bin:/gnu/store/fd621k6fmdnr1yiw0lbvw5spqaa169j3-findutils-4.6.0/bin:/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin:/gnu/store/lmfddplnplxd03bcqv3w9pynbnr1fp8k-sed-4.5/bin:/gnu/store/02k245xy33cvcnr8vm3lagm9zmb1s2wa-grep-3.1/bin:/gnu/store/5s2nib1lrd2101bbrivcl17kjx1mspw6-coreutils-8.3
 0/bin:/gnu/store/7j3941iannrngdvgbclyxid12vds5w9i-make-4.2.1/bin:/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin:/gnu/store/9ysmg2739n1ms84lx6hifncgc5l2hiy9-ld-wrapper-0/bin:/gnu/store/02iklp4swqs0ipxhg5x9b2shmj6b30h1-binutils-2.31.1/bin:/gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/bin:/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/bin:/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/sbin'
environment variable `PERL5LIB' set to `/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/lib/perl5/site_perl'
environment variable `BASH_LOADABLES_PATH' unset
environment variable `C_INCLUDE_PATH' set to `/gnu/store/j74aabxwayjl9yfyrm6ni482gykxq48b-bzip2-1.0.6/include:/gnu/store/9425b5dwpfc04bb4p58hsjypxghliyr3-xz-5.2.4/include:/gnu/store/ypiyk8ngn79cz655jrl0hng37xv54yjr-file-5.33/include:/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/include:/gnu/store/7j3941iannrngdvgbclyxid12vds5w9i-make-4.2.1/include:/gnu/store/02iklp4swqs0ipxhg5x9b2shmj6b30h1-binutils-2.31.1/include:/gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/include:/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include:/gnu/store/xha1mk4qji8fmg62nygfzdx0l94ikdhm-linux-libre-headers-4.14.67/include'
environment variable `CPLUS_INCLUDE_PATH' set to `/gnu/store/j74aabxwayjl9yfyrm6ni482gykxq48b-bzip2-1.0.6/include:/gnu/store/9425b5dwpfc04bb4p58hsjypxghliyr3-xz-5.2.4/include:/gnu/store/ypiyk8ngn79cz655jrl0hng37xv54yjr-file-5.33/include:/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/include:/gnu/store/7j3941iannrngdvgbclyxid12vds5w9i-make-4.2.1/include:/gnu/store/02iklp4swqs0ipxhg5x9b2shmj6b30h1-binutils-2.31.1/include:/gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/include:/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include:/gnu/store/xha1mk4qji8fmg62nygfzdx0l94ikdhm-linux-libre-headers-4.14.67/include'
environment variable `LIBRARY_PATH' set to `/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/lib:/gnu/store/j74aabxwayjl9yfyrm6ni482gykxq48b-bzip2-1.0.6/lib:/gnu/store/9425b5dwpfc04bb4p58hsjypxghliyr3-xz-5.2.4/lib:/gnu/store/ypiyk8ngn79cz655jrl0hng37xv54yjr-file-5.33/lib:/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/lib:/gnu/store/02iklp4swqs0ipxhg5x9b2shmj6b30h1-binutils-2.31.1/lib:/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib:/gnu/store/a3p8zc23w5asxck5h4mswz4s8yl9s6pa-glibc-2.28-static/lib:/gnu/store/mn3ymm3f2r4xjqf8m9fgmadh6b8p6fvr-glibc-utf8-locales-2.28/lib'
environment variable `GUIX_LOCPATH' set to `/gnu/store/mn3ymm3f2r4xjqf8m9fgmadh6b8p6fvr-glibc-utf8-locales-2.28/lib/locale'
phase `set-paths' succeeded after 0.0 seconds
starting phase `install-locale'
using 'en_US.utf8' locale for category "LC_ALL"
phase `install-locale' succeeded after 0.0 seconds
starting phase `unpack'
BackupPC-XS-0.59/
BackupPC-XS-0.59/bpc_attribCache.c
BackupPC-XS-0.59/lib/
BackupPC-XS-0.59/lib/BackupPC/
BackupPC-XS-0.59/lib/BackupPC/XS.pm
BackupPC-XS-0.59/bpc_fileZIO.c
BackupPC-XS-0.59/backuppc.h
BackupPC-XS-0.59/bpc_poolWrite.c
BackupPC-XS-0.59/t/
BackupPC-XS-0.59/t/BackupPC_XS.t
BackupPC-XS-0.59/install-sh
BackupPC-XS-0.59/bpc_lib.c
BackupPC-XS-0.59/config.sub
BackupPC-XS-0.59/config.h.in
BackupPC-XS-0.59/META.yml
BackupPC-XS-0.59/MANIFEST
BackupPC-XS-0.59/rsync.h
BackupPC-XS-0.59/README
BackupPC-XS-0.59/bpc_dirOps.c
BackupPC-XS-0.59/typemap
BackupPC-XS-0.59/bpc_hashtable.c
BackupPC-XS-0.59/byteorder.h
BackupPC-XS-0.59/BackupPC_XS.xs
BackupPC-XS-0.59/Changes
BackupPC-XS-0.59/Makefile.PL
BackupPC-XS-0.59/META.json
BackupPC-XS-0.59/ppport.h
BackupPC-XS-0.59/zlib/
BackupPC-XS-0.59/zlib/compress.c
BackupPC-XS-0.59/zlib/inffast.h
BackupPC-XS-0.59/zlib/trees.h
BackupPC-XS-0.59/zlib/crc32.c
BackupPC-XS-0.59/zlib/zutil.h
BackupPC-XS-0.59/zlib/zlib.h
BackupPC-XS-0.59/zlib/zutil.c
BackupPC-XS-0.59/zlib/deflate.h
BackupPC-XS-0.59/zlib/adler32.c
BackupPC-XS-0.59/zlib/inffast.c
BackupPC-XS-0.59/zlib/zconf.h
BackupPC-XS-0.59/zlib/trees.c
BackupPC-XS-0.59/zlib/inflate.c
BackupPC-XS-0.59/zlib/inftrees.c
BackupPC-XS-0.59/zlib/deflate.c
BackupPC-XS-0.59/zlib/inflate.h
BackupPC-XS-0.59/zlib/Makefile.PL
BackupPC-XS-0.59/zlib/inffixed.h
BackupPC-XS-0.59/zlib/crc32.h
BackupPC-XS-0.59/zlib/inftrees.h
BackupPC-XS-0.59/bpc_attrib.c
BackupPC-XS-0.59/md5/
BackupPC-XS-0.59/md5/mdigest.h
BackupPC-XS-0.59/md5/md5.c
BackupPC-XS-0.59/md5/Makefile.PL
BackupPC-XS-0.59/config.guess
BackupPC-XS-0.59/bpc_refCount.c
BackupPC-XS-0.59/configure.sh
phase `unpack' succeeded after 0.0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0.0 seconds
starting phase `patch-source-shebangs'
patch-shebang: ./config.guess: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./config.sub: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./configure.sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
patch-shebang: ./install-sh: changing `/bin/sh' to `/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh'
phase `patch-source-shebangs' succeeded after 0.0 seconds
starting phase `configure'
running `perl' with arguments ("Makefile.PL" "PREFIX=/gnu/store/bya5wbs4argpjnxz209xdxn4ma8wf48i-perl-backuppc-xs-0.59" "INSTALLDIRS=site" "NO_PERLLOCAL=1")
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Generating a Unix-style Makefile
Writing Makefile for BackupPC::XS
Writing MYMETA.yml and MYMETA.json
phase `configure' succeeded after 0.1 seconds
starting phase `patch-generated-file-shebangs'
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `build'
./configure.sh
"/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl" "/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/lib/perl5/5.28.0/ExtUtils/xsubpp"  -typemap '/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/lib/perl5/5.28.0/ExtUtils/typemap' -typemap '/tmp/guix-build-perl-backuppc-xs-0.59.drv-0/BackupPC-XS-0.59/typemap'  BackupPC_XS.xs > BackupPC_XS.xsc
Running Mkbootstrap for XS ()
chmod 644 "XS.bs"
"/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- XS.bs blib/arch/auto/BackupPC/XS/XS.bs 644
cp lib/BackupPC/XS.pm blib/lib/BackupPC/XS.pm
configure.sh: Configuring backuppc-xs 0.59
configure.sh: error: cannot run /bin/sh ./config.sub
make: *** [Makefile:1099: config.h] Error 127
make: *** Waiting for unfinished jobs....
mv BackupPC_XS.xsc BackupPC_XS.c
Backtrace:
            4 (primitive-load "/gnu/store/3aqn6dm3ljbvjrjjf91rkyym0mv…")
In ice-9/eval.scm:
    191:35  3 (_ _)
In srfi/srfi-1.scm:
    863:16  2 (every1 #<procedure 7080a0 at /gnu/store/wcwwp9997im4c…> …)
In /gnu/store/wcwwp9997im4cb0n48cr21jqbh0rfp0m-module-import/guix/build/gnu-build-system.scm:
    799:28  1 (_ _)
In /gnu/store/wcwwp9997im4cb0n48cr21jqbh0rfp0m-module-import/guix/build/utils.scm:
     616:6  0 (invoke _ . _)

/gnu/store/wcwwp9997im4cb0n48cr21jqbh0rfp0m-module-import/guix/build/utils.scm:616:6: In procedure invoke:
Throw to key `srfi-34' with args `(#<condition &invoke-error [program: "make" arguments: ("-j" "12") exit-status: 2 term-signal: #f stop-signal: #f] 56df80>)'.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help with $SHELL in perl package for backuppc
  2019-08-21 21:22 Help with $SHELL in perl package for backuppc Jack Hill
@ 2019-08-22 14:49 ` Jack Hill
  0 siblings, 0 replies; 2+ messages in thread
From: Jack Hill @ 2019-08-22 14:49 UTC (permalink / raw)
  To: guix-devel

On Wed, 21 Aug 2019, Jack Hill wrote:

> However, that fails to build because it tries to invoke /bin/sh (see full 
> build log at the end of this message).
>
> Line 2465 in configure.sh is suspicious as it reads:
>
> ```
> $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
> ```
>
> I tried modifying the package definition to add a phase that sets the SHELL 
> variable, but that did not alter the build error. My package definition with 
> that change looks like:

After a more careful reading of configure.sh, the variable to set is 
CONFIG_SHELL, so a `(setenv "CONFIG_SHELL" (which "sh"))` does the trick. 
That means I now have the following package definition that builds.

```
(define-public perl-backuppc-xs
   (package
   (name "perl-backuppc-xs")
   (version "0.59")
   (source
     (origin
       (method url-fetch)
       (uri (string-append
              "mirror://cpan/authors/id/C/CB/CBARRATT/BackupPC-XS-"
              version
              ".tar.gz"))
       (sha256
         (base32
           "1rp57x3amv4g3sa1az83f5xyw25cj7hhvmj3jczrkmfbrpnxlkca"))))
   (build-system perl-build-system)
   (arguments
    '(#:phases
      (modify-phases %standard-phases
        (add-before 'configure 'set-environment-variables
          (lambda _
            (setenv "CONFIG_SHELL" (which "sh"))
            #t)))))
   (home-page
    "https://backuppc.github.io")
   (synopsis
     "Perl extension for BackupPC libraries")
   (description "to be written")
   (license gpl3+)))
```

Now on to the other backuppc components.

Best,
Jack

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-22 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 21:22 Help with $SHELL in perl package for backuppc Jack Hill
2019-08-22 14:49 ` Jack Hill

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).