Re: [package-building] configure: error: can not run /tmp/guix-build-.*

2021-12-06 Thread Hartmut Goebel

Am 04.12.21 um 17:37 schrieb indieterminacy@libre.brussels:

configure: error: can not run 
/tmp/guix-build-preccx-2.60.drv-0/precc-2.60/src/config.sub


AFAIK confgure writes a more detailed logfile, which should provide you 
with a more detailed error message on *why* it is failing. Please have a 
look there. Without knowing the cause, any solution would be fishing in 
murky waters.


--
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




[package-building] configure: error: can not run /tmp/guix-build-.*

2021-12-04 Thread indieterminacy
Hello,

Im unsuccessful at packaging the (dusty) compiler/parser Preccx.

The logfile reveals this at the build stage:
```
starting phase `build'
mkdir -p build/`src/config.guess`
mkdir -p build/`src/config.guess`/include
sh -c 'cwd=`pwd`; cd build/`src/config.guess` ; \
$cwd/src/configure --srcdir=$cwd/src'
creating cache ./config.cache
checking package version... preccx 2.60
configure: error: can not run 
/tmp/guix-build-preccx-2.60.drv-0/precc-2.60/src/config.sub
make: *** [Makefile:50: build/`src/config.guess`/configure] Error 1
command "make" "-j" "4" failed with status 2
```

Running Make traditonally from the repo's parent-folder appears to work (though 
I
havent installed it yet). It's logfile does manage to evaluate
`src/config.guess` into x86_64-unknown-linux-gnu, in order to create an
acceptable bind/x86_64-unknown-linux-gnu/ directory-pathway.

This is commensurate within the INSTALL files expectations:
```
i) in this directory run  make config; make; make test; make install, or

ii) change to a different build directory. I suggest ./build/
 mkdir -p build/; cd build/
   Then the Makefile needs to be created in that directory by running
 ../src/configure --srcdir=
   After that and still in the build directory, you run
 make;  make install
```

FYI, I did have to tweak two lines when attempting something similar in
a Debian compilation to resolve x2 bad substitution errors but Guix did
not appear to trip over in the same situation. (I dont have my tweaks at hand).

The full log of the traditional make installation (see appendix) does mention 
Debian
install files but I do not know whether they are impactful to the Guix
install or not.

There is no file in my directory /tmp containing the prefix guix-build-
.

Here is my WIP guix package-definition:
```
(define-module (preccx)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (gnu packages build-tools)  
  #:use-module (gnu packages groff))

(define-public preccx
  (package
   (name "preccx")
   (version "2.60")
   (source
(origin
 (method url-fetch)
 (uri (string-append "https://sourceforge.net/projects/; name 
"/files/preccx/" version "/precc-" version ".tgz/download"))
 (sha256
  (base32 "0lml2h0c5pk1fb1cc7iwbdildrk0cbcl4cfmixh4bpl0swf82dx7"
   (build-system gnu-build-system)
   (arguments
`(#:phases (modify-phases %standard-phases
  (add-before 'build 'set-CC
  (lambda _
(setenv "CC" "gcc")
#t))
  (delete 'configure)) ; rq no configure script
  ;;#:make-flags (list (string-append "CC=" ,(cc-for-target))
  ;; (string-append "prefix=" %output))
  #:tests? #f)) ;; rq   tests-exist deactivated for the moment
   (native-inputs
`(("groff" ,groff)))
   (synopsis "higher order compiler compiler")
   (description
"PRECCX is an infinite-lookahead higher-order compiler-compiler for 
context-dependent grammars. The generated code is ANSI C and ANSI C++; the code 
will compile and run under either C or C++. PRECCX grammars admit EBNF + 
inherited and synthetic attributes")
   (home-page "https://sourceforge.net/projects/preccx/;)
   (license license:gpl2)))

preccx
```

Groff is used as my approximation for Nroff, in order to compile
manpages.

Preccx is a 1990s script, with the last version released in 2007, it has
a patchwork and tests to permit a wide range of OSes from that time
period. Its entirely possible that a fresh makefile would help but the
number of config files and makefiles makes it feel like a can of worms.

Does anybody have any clue regarding how the build script should be
altered?

Kind regards,


Jonathan

indieterminacy@libre.brussels

# Appendix A: Log re Guix package build
```
WARNING: (guile-user): imported module (guix build utils) overrides core 
binding `delete'
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