all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* libffi cannot be installed in user profile in core-updates
@ 2014-03-24  6:07 Mark H Weaver
  2014-03-24  9:52 ` Sree Harsha Totakura
  2014-03-24 14:15 ` bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-03-24  6:07 UTC (permalink / raw)
  To: guix-devel

On the Loongson 3A machine, I finished building all the packages from
core-updates that I use in my profile, and then tried installing them.
I got this:

--8<---------------cut here---------------start------------->8---
In /gnu/store/9sqx55rgygyrcyg350cfqwy8wqb4fr69-module-import/guix/build/union.scm:
 226: 1 [loop # #]
In unknown file:
   ?: 0 [mkdir "/gnu/store/c30bsax58scw5qwcnbma16k6z88s1lh3-profile/./include" ...]

ERROR: In procedure mkdir:
ERROR: In procedure mkdir: File exists
builder for `/gnu/store/17w6kggffh79drmmrdnxy1yhgr6p2in5-profile.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---

The problem turns out to be that 'libffi' makes 'include' a symlink to
'lib/libffi-3.0.13/include', and union.scm cannot cope with conflicts
between a directory and a symlink.  Therefore, 'libffi' cannot be
installed in any user profile in core-updates (assuming that there's
some other installed package where 'include' is a directory).

This problem was introduced in d43547f12d4eae19845f3bf13a53a050af965063
"gnu: libffi: Leave a copy of headers where libffi.pc expects them."

     Mark

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

* Re: libffi cannot be installed in user profile in core-updates
  2014-03-24  6:07 libffi cannot be installed in user profile in core-updates Mark H Weaver
@ 2014-03-24  9:52 ` Sree Harsha Totakura
  2014-03-24 13:15   ` Mark H Weaver
  2014-03-24 14:15 ` bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree Ludovic Courtès
  1 sibling, 1 reply; 5+ messages in thread
From: Sree Harsha Totakura @ 2014-03-24  9:52 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On 03/24/2014 07:07 AM, Mark H Weaver wrote:
> This problem was introduced in d43547f12d4eae19845f3bf13a53a050af965063
> "gnu: libffi: Leave a copy of headers where libffi.pc expects them."

What we need to do here is to symlink the header files instead of the include
directory.  This was suggested earlier here:
http://lists.gnu.org/archive/html/guix-devel/2014-01/msg00213.html

Ludo, please revert d43547f12d4eae19845f3bf13a53a050af965063.

Sree

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

* Re: libffi cannot be installed in user profile in core-updates
  2014-03-24  9:52 ` Sree Harsha Totakura
@ 2014-03-24 13:15   ` Mark H Weaver
  0 siblings, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-03-24 13:15 UTC (permalink / raw)
  To: sreeharsha; +Cc: guix-devel

Sree Harsha Totakura <sreeharsha@totakura.in> writes:

> On 03/24/2014 07:07 AM, Mark H Weaver wrote:
>> This problem was introduced in d43547f12d4eae19845f3bf13a53a050af965063
>> "gnu: libffi: Leave a copy of headers where libffi.pc expects them."
>
> What we need to do here is to symlink the header files instead of the include
> directory.  This was suggested earlier here:
> http://lists.gnu.org/archive/html/guix-devel/2014-01/msg00213.html
>
> Ludo, please revert d43547f12d4eae19845f3bf13a53a050af965063.

Another option is to improve union.scm so that symlinks to directories
within the store are treated the same as directories.  IMO this is a
better approach.  I intend to rewrite union.scm quite soon anyway, along
the lines described in the "Optimizing union.scm" thread, unless there
are objections or better ideas.

      Mark

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

* bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree
  2014-03-24  6:07 libffi cannot be installed in user profile in core-updates Mark H Weaver
  2014-03-24  9:52 ` Sree Harsha Totakura
@ 2014-03-24 14:15 ` Ludovic Courtès
  2014-04-02 21:43   ` Ludovic Courtès
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2014-03-24 14:15 UTC (permalink / raw)
  To: mhw, 17083; +Cc: guix-devel

(Adding bug-guix.)

Mark H Weaver <mhw@netris.org> skribis:

> On the Loongson 3A machine, I finished building all the packages from
> core-updates that I use in my profile, and then tried installing them.
> I got this:
>
> In /gnu/store/9sqx55rgygyrcyg350cfqwy8wqb4fr69-module-import/guix/build/union.scm:
>  226: 1 [loop # #]
> In unknown file:
>    ?: 0 [mkdir "/gnu/store/c30bsax58scw5qwcnbma16k6z88s1lh3-profile/./include" ...]
>
> ERROR: In procedure mkdir:
> ERROR: In procedure mkdir: File exists
> builder for `/gnu/store/17w6kggffh79drmmrdnxy1yhgr6p2in5-profile.drv' failed with exit code 1
>
> The problem turns out to be that 'libffi' makes 'include' a symlink to
> 'lib/libffi-3.0.13/include', and union.scm cannot cope with conflicts
> between a directory and a symlink.

Ouch, good catch.

I’ve come up with a test that reproduces it:

--8<---------------cut here---------------start------------->8---
(test-assert "union-build with symlink to directory"
  (let* ((builder '(begin
                     (use-modules (guix build union) (guix build utils)
                                  (srfi srfi-26))
                     (mkdir-p "one/foo")
                     (call-with-output-file "one/foo/one"
                       (cut display "one" <>))
                     (mkdir-p "two/bar")
                     (symlink "bar" "two/foo")
                     (call-with-output-file "two/foo/two"
                       (cut display "two" <>))

                     (union-build (assoc-ref %outputs "out") '("one" "two"))))
         (drv
          (build-expression->derivation %store "union-collision-symlink"
                                        builder
                                        #:modules '((guix build union)
                                                    (guix build utils)))))
    (and (build-derivations %store (list drv))
         (with-directory-excursion (derivation->output-path drv)
           (and (file-exists? "one/foo/one")
                (file-exists? "two/foo/two")
                (file-exists? "two/bar/two"))))))
--8<---------------cut here---------------end--------------->8---

Actually union.scm cannot handle collisions between a leaf and a
directory in general, which should be fixed.

I can think of these cases:

  1. If the leaf is a regular file, error out.

  2. If the leaf is a symlink:

     a. If it points to a directory, union the directories.

     b. Otherwise, error out.

Does that make sense?

Do you think you could come up with a patch?  Alternately we could apply
Sree’s proposed workaround as a stopgap measure.

Thanks,
Ludo’.

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

* bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree
  2014-03-24 14:15 ` bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree Ludovic Courtès
@ 2014-04-02 21:43   ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-02 21:43 UTC (permalink / raw)
  To: mhw; +Cc: 17083-done, guix-devel

ludo@gnu.org (Ludovic Courtès) skribis:

> Mark H Weaver <mhw@netris.org> skribis:
>
>> On the Loongson 3A machine, I finished building all the packages from
>> core-updates that I use in my profile, and then tried installing them.
>> I got this:
>>
>> In /gnu/store/9sqx55rgygyrcyg350cfqwy8wqb4fr69-module-import/guix/build/union.scm:
>>  226: 1 [loop # #]
>> In unknown file:
>>    ?: 0 [mkdir "/gnu/store/c30bsax58scw5qwcnbma16k6z88s1lh3-profile/./include" ...]
>>
>> ERROR: In procedure mkdir:
>> ERROR: In procedure mkdir: File exists
>> builder for `/gnu/store/17w6kggffh79drmmrdnxy1yhgr6p2in5-profile.drv' failed with exit code 1
>>
>> The problem turns out to be that 'libffi' makes 'include' a symlink to
>> 'lib/libffi-3.0.13/include', and union.scm cannot cope with conflicts
>> between a directory and a symlink.
>
> Ouch, good catch.

This is fixed with the new union.scm (commit 1212999.)

> I’ve come up with a test that reproduces it:

This test was actually bogus, so I committed a correct one (commit
a53a9ae.)

Thanks!

Ludo’.

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

end of thread, other threads:[~2014-04-02 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24  6:07 libffi cannot be installed in user profile in core-updates Mark H Weaver
2014-03-24  9:52 ` Sree Harsha Totakura
2014-03-24 13:15   ` Mark H Weaver
2014-03-24 14:15 ` bug#17083: ‘union-build’ does not handle collisions between a leaf and a sub-tree Ludovic Courtès
2014-04-02 21:43   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.