[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30801] [PATCH 0/1] Add opencv
[bug#30801] [PATCH 0/1] Add opencv
Sun, 01 Apr 2018 14:21:38 +0200
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
Björn Höfling <address@hidden> skribis:
> On Thu, 15 Mar 2018 22:04:54 +0100
> address@hidden (Ludovic Courtès) wrote:
>> Hi Björn,
>> Björn Höfling <address@hidden> skribis:
>> > The test suite consists of an extra package, weighting 465MB
>> > compressed. It runs very well. I think the size is worth it. It
>> > consists of proprietary things (i.e. lena.jpg). As far as I
>> > understand, that is OK, if it doesn't get in the final src/bin
>> > store output. Right?
>> As a rule of thumb, there should not be non-free stuff in the
>> derivation graph.
>> If there’s non-free software, that’s not OK, even if it doesn’t show
>> up in the output.
>> If it’s “just” data (pictures) that are non-free, that’s OK per the
>> If we could replace it with a free variant, I think we should clearly
>> encourage it, but lena.jpg is hardly replaceable in this context (I’d
>> hope it weren’t around for what it tells about CS, but that’s another
> What is being downloaded is in the store of cause, but it is only
> images and videos, no code. And it is not linked against.
> The suite is 400 MB in size and replacing Lena with Linus or even
> better pictures and videos of trees would need a fundamental idea of
> the algorithms behind OpenCV, with I don't have. So for now I just leave
> it as is, though I agree with your fundamental ideas :-)
OK, sounds good.
> Most are 50MB, one is 265MB, I suppose that was the latest with all
> dependencies and all (free) OpenCV modules. So the 1.1GB was
> definitively the convex hull including all dependencies.
> The whole thing is more or less only "lib".
> I forgot to mention that I ignored the "doc" package: It built one when
> I added doxygen as a dependency, but it did not install it. Now that I
> know how to manually copy/install files, I could give that another try.
> But that would add (to a :doc output, of cause), not substract.
> The "bin" part is only 7 MB, so not worth mentioning. There are some
> examples which I did not include, because they are not very interesting
> in the compiled version, but more for understanding the programming
> part from the source code.
> OK, I looked into some other packages and tried to split it into pieces
> (one piece for now). What I do is just add a phase after install and
> copy things manually (copied from the git package definition):
> + (add-after 'install 'split
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((outputs-out (assoc-ref outputs "out"))
> + (outputs-feature2d (assoc-ref outputs "feature2d"))
> + (outputs-face (assoc-ref outputs "face"))
> + (outputs-core (assoc-ref outputs "core"))
> + (libface (string-append outputs-out
> + (libface* (string-append outputs-face
> + (libface3.4 (string-append outputs-out
> + (libface3.4* (string-append outputs-face
> + (libface3.4.1 (string-append outputs-out
> + (libface3.4.1* (string-append outputs-face
> + (mkdir-p (string-append outputs-face "/lib"))
> + (for-each (lambda (old new)
> + (copy-file old new)
> + (delete-file old)
> + (chmod new #o555))
> + (list libface libface3.4 libface3.4.1)
> + (list libface* libface3.4* libface3.4.1*))
> + )
> + #t ; TODO: Implement it.
> + ))
> + )))
> The problem here is that this doesn't correct the RPATHS and I will get
> problems with dependent library parts (The python modules in that case):
> phase `strip' succeeded after 0.5 seconds
> starting phase `validate-runpath'
> validating RUNPATH of 46 binaries in
> error: depends on 'libopencv_face.so.3.4', which cannot be found in RUNPATH
Right, you cannot just move .so files after the fact because
cv2.cpython-36m-x86_64-linux-gnu.so, for instance, has …/lib in its
RUNPATH, not …-lib/lib. If you wanted to do that, the right way to do
it would be by modifying the makefiles/cmakelists so that they
explicitly install libopencv_face to …-lib/lib.
That said, it may be safer/easier to keep all libraries in the same
BTW, are .a files installed? It would probably help save space to not
Thanks for the update & have a nice week-end!
|[Prev in Thread]
||[Next in Thread]|
- [bug#30801] [PATCH 0/1] Add opencv,
Ludovic Courtès <=