[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trivial-build-system: ld can't find existing store files
From: |
Felix Lechner |
Subject: |
Re: trivial-build-system: ld can't find existing store files |
Date: |
Sun, 14 Jan 2024 13:28:38 -0800 |
Hi Christina,
On Sun, Jan 14 2024, Christina O'Donnell wrote:
> /gnu/store/cv571kkg5hyk98yw48857h1d0zi9azni-binutils-2.38/bin/ld: cannot find
> crt1.o: No such file or directory
> /gnu/store/cv571kkg5hyk98yw48857h1d0zi9azni-binutils-2.38/bin/ld: cannot find
> crti.o: No such file or directory
The code below worked for me (with 'guix build -f evhz.scm') although
I'm a novice myself.
Thanks for using Guix!
Kind regards
Felix
* * *
(define-module (gnu packages evhz)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages commencement)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages linux)
#:use-module (gnu packages xorg))
(define-public evhz
(let ((commit "35b7526e0655522bbdf92f6384f4e9dff74f38a0")
(revision "1"))
(package
(name "evhz")
(version (git-version "0.0.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://git.sr.ht/~iank/evhz")
(commit commit)))
(sha256
(base32
"1m2m60sh12jzc8f38g7g67b3avx2vg8ff0lai891jmjqvxw04bcl"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source"))
(glibc (assoc-ref %build-inputs "glibc"))
(gcc (assoc-ref %build-inputs "gcc"))
(binutils (assoc-ref %build-inputs "binutils"))
(linux-libre-headers (assoc-ref %build-inputs
"linux-libre-headers"))
(output (assoc-ref %outputs "out")))
(setenv "PATH" (string-join
(list (string-append gcc "/bin")
(string-append binutils "/bin")
(getenv "PATH"))
":"))
(setenv "LIBRARY_PATH" (string-join
(list (string-append glibc
"/lib"))
":"))
(mkdir-p (string-append output "/bin"))
(invoke (string-append gcc "/bin/gcc")
"-o" (string-append output "/bin/evhz")
"-I" (string-append linux-libre-headers
"/include")
(string-append source "/evhz.c"))
#t))))
(native-inputs
(list binutils
gcc
gcc-toolchain
glibc
linux-libre-headers))
(home-page "https://git.sr.ht/~iank/evhz")
(synopsis "Show mouse refresh rate under linux + evdev.")
(description
"A simple diagnostic utility to show mouse refresh rate under linux +
evdev.")
(license license:apsl2))))
evhz