unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Marius Bakke <mbakke@fastmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add varnish.
Date: Thu, 01 Dec 2016 10:02:24 +0100	[thread overview]
Message-ID: <8737i8dntr.fsf@elephly.net> (raw)
In-Reply-To: <8737icvfg6.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>


Marius Bakke <mbakke@fastmail.com> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>>> +         (add-after 'install 'wrap-binary
>>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>>> +             (let* ((out (assoc-ref outputs "out"))
>>> +                    (varnishd (string-append out "/sbin/varnishd"))
>>> +                    (PATH (string-append (assoc-ref inputs "binutils") "/bin"))
>>> +                    (LIBRARY_PATH (string-append (assoc-ref inputs "glibc") "/lib")))
>>> +               ;; Add binutils to PATH so gcc finds the 'as' executable.
>>> +               (wrap-program varnishd
>>> +                 `("PATH" ":" prefix (,PATH)))
>>> +               ;; Without this, we get an error such as "ld: cannot find crti.o"
>>> +               ;; when compiling VCL.
>>> +               (wrap-program varnishd
>>> +                 `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH)))
>>> +               #t))))))
>>
>> What is VCL?  Is it always compiled from scratch at runtime?
>
> VCL is the Varnish Configuration Language. The configuration file is
> compiled at startup and when loading other configs at runtime. It is
> also possible to have inline C code in the VCL.
>
>>
>>> +    (inputs
>>> +     `(("binutils" ,binutils)
>>> +       ("gcc" ,gcc)
>>> +       ("glibc" ,glibc/linux)
>>
>> These three inputs are implicitly available as native inputs when using
>> the gnu-build-system.  Should varnish get a gcc-toolchain as a runtime
>> input instead of these three separate inputs?
>
> How would this work? Importing (gnu packages commencement) in web.scm
> causes a bunch of "unbound variable" errors, probably due to conflicting
> package names.
>
> The 'as' requirement is actually from gcc, which should preferably be
> compiled with '--with-as=<absolute-path-of-binutils-as>' (but does not
> currently have binutils as input). I was surprised it used 'ld', which
> probably works as a side effect after wrapping the binutils PATH.
>
> The "LIBRARY_PATH" hack should possibly be fixed in binutils as well.
>
> A custom toolchain sounds like a cleaner approach than these two
> workarounds since those quirks can be worked out there, but not sure how
> to go about making it.

Okay, thanks for explaining this.  About the problems with “as” and
“binutils” could you please also send a bug report to bug-guix@gnu.org?

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

      reply	other threads:[~2016-12-01  9:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27 10:34 [PATCH] gnu: Add varnish Marius Bakke
2016-11-27 15:11 ` Ricardo Wurmus
2016-11-27 20:24   ` Marius Bakke
2016-12-01  9:02     ` Ricardo Wurmus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737i8dntr.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).