Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 426316 - dev-scheme/racket-5.2.1 USE=-cairo - ffi-lib: couldn't open "libcairo.so.2" (libcairo.so.2: cannot open shared object file: No such file or directory)
Summary: dev-scheme/racket-5.2.1 USE=-cairo - ffi-lib: couldn't open "libcairo.so.2" (...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-12 13:19 UTC by Permjacov E. A.
Modified: 2013-06-13 09:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,191.90 KB, text/plain)
2012-07-12 13:26 UTC, Permjacov E. A.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Permjacov E. A. 2012-07-12 13:19:23 UTC
attempt to install dev-scheme/racket-5.2.1 with USE="threads -X -backtrace -cairo -doc -futures -jit -places -plot" fails with
"raco setup: error: during making for drracket
raco setup:   ffi-lib: couldn't open "libcairo.so.2" (libcairo.so.2: cannot open shared object file: No such file or directory)"


Reproducible: Always

Steps to Reproduce:
1. emerge =dev-scheme/racket-5.2.1 
Actual Results:  
see above

Expected Results:  
installed racket
Comment 1 Permjacov E. A. 2012-07-12 13:26:31 UTC
Created attachment 317994 [details]
build log
Comment 2 Permjacov E. A. 2012-07-12 13:28:24 UTC
the problem occurs if no cairo installed
Comment 3 Marijn Schouten (RETIRED) gentoo-dev 2012-11-09 09:50:19 UTC
Hi, I've not been brave enough to uninstall cairo, but I've reported your issue upstream.
Comment 4 Marijn Schouten (RETIRED) gentoo-dev 2012-11-09 13:31:40 UTC
Quick answer from upstream:

  Libraries like `racket/draw` and `slideshow/pict` don't need X -- they
  can produce PDFs or PNGs or other formats, but they do rely on cairo.

So maybe my assumptions in the deps have been wrong.
Comment 5 Marijn Schouten (RETIRED) gentoo-dev 2012-11-13 08:53:43 UTC
More complete answer from upstream (Matthew Flatt):

Cairo is a real dependency for building the Racket documentation as
well as for certain libraries. A non-X variant of Cairo works fine for
both of those case, naturally.

Our "-textual" distribution doesn't need Cairo because the distribution
omits both the documentation and various libraries that use Cairo at
compile time.

There's currently no configuration option for Racket that will build
only the non-GUI and/or non-drawing parts. At the same time, building
Racket doesn't require that X or Gtk is installed; it's only when you
run a program that uses `racket/gui/base' that Racket even looks for
GUI libraries. We refrain from using `racket/gui/base' at compile time
(i.e., in macros) or to render documentation.

Similarly, Cairo isn't needed until you actually run a program that
uses `racket/draw'. Unlike `racket/gui/base', though, we sometimes use
`racket/draw' in compile-time code or when rendering documentation.
Comment 6 Marijn Schouten (RETIRED) gentoo-dev 2012-11-13 08:59:46 UTC
So from that I conclude that it should indeed be possible to build without cairo if X, doc and possibly other use flags are disabled.

Unfortunately that is in contradiction with Permjacov's reported behavior in Comment 1, where only the threads use flag is on, but somehow drracket is getting built.
Comment 7 Permjacov E. A. 2012-11-13 10:18:32 UTC
> Hi, I've not been brave enough to uninstall cairo, but I've reported your
> issue upstream.

Hi. Everything requiring testing installation works perfectly in chrooted environment, and it is surprisingly easy to setups lxc/virtualbox in gentoo. So, I cannot see problem here.

I currently dropped my installation of gentoo for some reasons, So I cannot return to this bug for a while, but I'm still interested in its solution, as when I'll install gentoo for my dev/learn needs it will be headless install anyway.
Comment 8 Permjacov E. A. 2012-11-23 15:01:32 UTC
Okay, I'm here again and ready to test your solution.
Comment 9 Marijn Schouten (RETIRED) gentoo-dev 2013-06-13 08:34:23 UTC
After reviewing the response from upstream again I think I must conclude that upstream feels free to rely on racket/draw when building (definitely for documentation rendering, but evidently also for some unknown other things). Thus the only way to remove the build failure for now is to unconditionally require cairo as a build-time dep.

If this is unacceptable to you then you could try to work out another solution with upstream or separately package their textual distribution and see if that works. I think I have previously been told though that disabling X when building would result in the same thing as using the textual distribution upstream provides. That may or may not be true, intentionally or not.
Comment 10 Marijn Schouten (RETIRED) gentoo-dev 2013-06-13 09:05:25 UTC
I've committed thse new deps in racket-5.3.4:

RDEPEND="dev-db/sqlite:3 x11-libs/cairo[X?] virtual/libffi"
DEPEND="${RDEPEND} x11-libs/cairo !dev-tex/slatex"