unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Packaging the GNU Modula 2 compiler
@ 2021-01-03 15:11 Holger Peters
  2021-01-03 15:50 ` Efraim Flashner
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Peters @ 2021-01-03 15:11 UTC (permalink / raw)
  To: help-guix


[-- Attachment #1.1: Type: text/plain, Size: 7035 bytes --]

I have trouble building the GNU Modula 2 compiler
[[https://www.nongnu.org/gm2/][GNU Modula 2 compiler]]. And I think I
could use some help with that.

tl;dr: After packaging the GNU Modula 2 compiler  with guix I get an
error about: '/usr/bin/ld: cannot find crt1.o: No such file or
directory'


The information on building it is a bit sparse. Here is what I could
gather.

 * I managed to get a successful build of `gm2', that would compile
   modula files to *.o files. However, I wasn't able to link to an
   executable due to multilib issues (see below).
 * It seems there are no (recent) source releases for GNU Modula 2,
   the expecation is to get the releases from the git repository.
 * GNU Modula 2 is a gcc-based compiler.
 * The latest stable release of gm2 is based on gcc-10.
   [[https://www.nongnu.org/gm2/building.html][Source]]
 * Build guidelines are available under   
   [[https://www.nongnu.org/gm2/building_on_gcc_10.html][Building GNU
Modula-2 grafted on the
   gcc-10 branch]].

As per the docs, these are the recommended configuration steps. You'll
see that my guix package definition below differs in detail.

#+BEGIN_SRC sh
  git clone http://floppsie.comp.glam.ac.uk/gm2 gm2-floppsie
  cd gm2-floppsie
  git checkout gm2-10
  ./contrib/download_prerequisites
  cd ../..

  sudo apt-get install gcc-multilib libmpfr-dev libgmp-dev libmpc-dev
flex

  mkdir build-gcc-10
  cd build-gcc-10
  CXXFLAGS=-g BOOT_CFLAGS=-g CFLAGS=-g \
    ../gm2-floppsie/configure \
    --prefix=$HOME/opt \
    --libexecdir=$HOME/opt/lib \
    --enable-threads=posix \
    --enable-clocale=gnu --enable-languages=c,c++,m2 \
    --disable-multilib --disable-bootstrap --enable-checking
#+END_SRC


* Questions

** Linking Issue / Multilib

There is a /multilib/ configuration flag (disable/enable) and for the
apt-based distros it seems GM2 devs recommend the installation of
gcc-multilib. Since I don't find a multilib package in guix, I think
the approach might be a little different for guix. What needs to be
done here?

I did leave /--disable-multilib/ in the configure flags in my build
recipe below. Then when compiling a source file like this
[[https://www.nongnu.org/gm2/example_usage.html][Source]]

#+BEGIN_SRC modula-2
  MODULE hello;

  FROM StrIO IMPORT WriteString, WriteLn ;

  BEGIN
     WriteString('hello world') ; WriteLn
  END hello.
#+END_SRC


I get the following error (`gm2 -v -g hello.mod'):

#+BEGIN_SRC text
  /usr/bin/ld: cannot find crt1.o: No such file or directory
  /usr/bin/ld: cannot find crti.o: No such file or directory
  collect2: error: ld returned 1 exit status
#+END_SRC

(Full verbose log in attached file `out.log').

** /usr/bin/ld

Shouldn't I expect - in the error message - to see a reference to ld as
provided by guix?

** Outputs

This is a bit of a follow-up question. I had more success building GM2
with the GCC bootstrapping enabled. I think the build outputs should
be restricted when going down that path. How do I make sure that the
`gcc' executables aren't propagated into the PATH when installing gm2.

* Build recipe

This is what I camee up with so far. I realize this isn't a /polished/
patch yet, my focus is to get it to build.

#+BEGIN_SRC scheme
  (define-module (yas packages gm2)
    #:use-module (gnu packages gcc)
    #:use-module (gnu packages flex)
    #:use-module (gnu packages bison)
    #:use-module (gnu packages python)
    #:use-module (guix search-paths)
    #:use-module (guix git-download)
    #:use-module (guix utils)
    #:use-module (guix packages)
    #:use-module (guix build-system gnu)
    #:use-module (srfi srfi-1)
    #:use-module (srfi srfi-26)
    #:use-module (ice-9 regex))


  (define %generic-search-paths
    ;; This is the language-neutral search path for GCC.  Entries in
$CPATH are
    ;; not considered "system headers", which means GCC can raise
warnings for
    ;; issues in those headers.  'CPATH' is the only one that works for
    ;; front-ends not in the C family.
    (list (search-path-specification
           (variable "CPATH")
           (files '("include")))
          (search-path-specification
           (variable "LIBRARY_PATH")
           (files '("lib" "lib64")))))


  (define-public gm2
    (let ((revision "3")
          (commit "5f55e3e8a7bd2142eff043479c4059242e81e2ea")
          (git-url "http://floppsie.comp.glam.ac.uk/gm2")
          (name "gm2")
          (version "gm2-10"))
      (package (inherit gcc-10)
               (name name)
               (version version)
               (source (origin
                         (method git-fetch)
                         (uri (git-reference
                               (url git-url)
                               (commit commit)))
                         (file-name (git-file-name name version))
                         (sha256 (base32
"0cc46bkv198j7hn1ihczf6p4fpby3cnp57rml679rna2cmhzhp4x"))))
               (native-search-paths %generic-search-paths)
               (properties (alist-delete 'hidden? (package-properties
gcc)))
               (native-inputs
                (append `(("bison" ,bison)
                          ("flex" ,flex)
                          ("python3" ,python)
                          )
                        (package-native-inputs gcc-10)))
               (arguments
                (substitute-keyword-arguments (package-arguments gcc)
                  ((#:modules modules %gnu-build-system-modules)
                   `(,@modules
                     (srfi srfi-1)
                     (srfi srfi-26)
                     (ice-9 regex)))
                  ((#:configure-flags flags)
                   (let* ((gm2-flags '(list
                                       "--enable-languages=m2"
                                       ;; "--enable-languages=c,c++,m2"
                                       ;; "--disable-bootstrap"
                                       ;; "--disable-multilib"
                                       "--enable-checking"
                                       "--enable-threads=posix"))
                          (tail `(remove (cut string-match "--enable-
languages.*" <>)
                                         ,flags)))
                     `(append ,gm2-flags ,tail)))
                  ((#:phases phases)
                   `(modify-phases ,phases
                      (add-after 'install 'remove-broken-or-
conflicting-files
                        (lambda* (#:key outputs #:allow-other-keys)
                          (for-each delete-file
                                    (find-files (string-append (assoc-
ref outputs "out") "/bin")
                                               
".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)"))
                          #true))))))
               (synopsis "modula2 compiler")
               (description "modula2 compiler"))))
#+END_SRC

[-- Attachment #1.2: out.log --]
[-- Type: text/x-log, Size: 14002 bytes --]

Using built-in specs.
COLLECT_GCC=gm2
COLLECT_LTO_WRAPPER=/gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: 
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20201231 (GCC) 
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/gm2l -v -I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -o /tmp/ccHfdqPz.l hello.mod
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/gm2lorder /tmp/ccHfdqPz.l -o /tmp/ccZ3mP5z.lst
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/gm2lgen -fcpp /tmp/ccZ3mP5z.lst -o hello_m2.cpp
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/cc1plus -v -mtune=generic -march=x86-64 -g -I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -quiet hello_m2.cpp -o hello_m2.s
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory "/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim
 /gnu/store/lcf84ypxacw7614n5d141nxaxqnd7sil-profile/include
 /gnu/store/c3pbsr5gyp8f9bvn45p5p6n0dgbil4dp-profile/include
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/include/c++
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/include/c++/x86_64-unknown-linux-gnu
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/include/c++/backward
 /gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/include
 /gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/include-fixed
 /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include
End of search list.
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 as --64 hello_m2.s -o /tmp/cc2pSVfystart.o
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 rm -f /tmp/ccjsXt8A.a
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/gm2lcc -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar -ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib -fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -v --exec --startup /tmp/cc2pSVfystart.o --ar -o /tmp/ccjsXt8A.a --mainobject hello.o /tmp/ccZ3mP5z.lst
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 rm -f /tmp/cc2pSVfystart
COMPILER_PATH=/gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/:/gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/:/gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/:/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/:/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/:/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib
COLLECT_GCC_OPTIONS='-I/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-ftarget-ar=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ar' '-ftarget-ranlib=/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/bin/ranlib' '-fobject-path=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-x' 'modula-2' '-fplugin=m2rte' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim' '-shared-libgcc' '-v' '-g' '-fonlylink' '-mtune=generic' '-march=x86-64'
 /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/collect2 -plugin /gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/liblto_plugin.so -plugin-opt=/gnu/store/3v0c18p7zzfbi6hzzgaqp73v3g1kafi2-gm2-gm2-10/libexec/gcc/x86_64-unknown-linux-gnu/10.2.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZUGO7x.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -m elf_x86_64 -dynamic-linker /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib/ld-linux-x86-64.so.2 crt1.o crti.o /gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/crtbegin.o -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/m2/m2pim -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1 -L/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/../../.. -L/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib /tmp/ccjsXt8A.a -lm2pim -lpthread -lstdc++ -lgcc_eh -lgcc_s -lgcc -L/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib -rpath=/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib -rpath=/gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib -lgcc_s -lc -lgcc_s -lgcc /gnu/store/50v4qv942jvfpn5xsqrbb97grym140jl-gm2-gm2-10-lib/lib/gcc/x86_64-unknown-linux-gnu/10.2.1/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 695 bytes --]

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

* Re: Packaging the GNU Modula 2 compiler
  2021-01-03 15:11 Packaging the GNU Modula 2 compiler Holger Peters
@ 2021-01-03 15:50 ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2021-01-03 15:50 UTC (permalink / raw)
  To: Holger Peters; +Cc: help-guix

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

Try wrapping everything in a toolchain, as defined in (gnu packages
commencement). Then you'll have the ld-wrapper you need and everything

(define-public gm2-toolchain
  (make-gcc-toolchain gm2))

or even

(define-public gm2-toolchain
  (package
    (inherit (make-gcc-toolchain gm2))
    (synopsis (package-synopsis gm2))
    (description (package-description gm2))))

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-01-03 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 15:11 Packaging the GNU Modula 2 compiler Holger Peters
2021-01-03 15:50 ` Efraim Flashner

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git