Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 329651 - media-libs/libcaca-0.99_beta17 fails to build w/ USE=mono when dev-scheme/chicken is installed
Summary: media-libs/libcaca-0.99_beta17 fails to build w/ USE=mono when dev-scheme/chi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 465934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-23 23:13 UTC by Conway S. Smith
Modified: 2013-08-13 15:23 UTC (History)
2 users (show)

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


Attachments
Build log for failed libcaca-0.99_beta17[mono] emerge w/ dev-scheme/chicken installed (libcaca-0.99_beta17_-_20100723-215102_-_chicken_installed.log,145.49 KB, text/plain)
2010-07-23 23:15 UTC, Conway S. Smith
Details
Build log for successful libcaca-0.99_beta17[mono] emerge w/ dev-scheme/chicken not installed (libcaca-0.99_beta17_-_20100723-213752_-_chicken_not_installed.log,273.80 KB, text/plain)
2010-07-23 23:16 UTC, Conway S. Smith
Details
Build log for successful libcaca-0.99_beta17[mono] emerge using my edited ebuild w/ dev-scheme/chicken installed (libcaca-0.99_beta17_-_20100723-221415_-_CSC_gmcs.log,273.78 KB, text/plain)
2010-07-23 23:17 UTC, Conway S. Smith
Details
My edited libcaca-0.99_beta17.ebuild (libcaca-0.99_beta17.ebuild,2.39 KB, text/plain)
2010-07-23 23:20 UTC, Conway S. Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Conway S. Smith 2010-07-23 23:13:09 UTC
During econf, media-libs/libcaca-0.99_beta17 checks for csc, meaning the C Sharp Compiler from MS .NET, and finds /usr/bin/csc, the Chicken Scheme Compiler from dev-scheme/chicken. Later during emake it fails as follows:
Making all in caca-sharp
make[2]: Entering directory `/var/tmp/portage/media-libs/libcaca-0.99_beta17/work/libcaca-0.99.beta17/caca-sharp'
/usr/bin/csc -debug -unsafe ./AssemblyInfo.cs ./Caca.cs ./Attr.cs ./Canvas.cs ./Display.cs ./Dither.cs ./Event.cs ./Font.cs -out:caca-sharp.dll -target:library \
          -keyfile:./caca-sharp.snk -r:System.Drawing.dll
csc: invalid option `-out:caca-sharp.dll'
make[2]: *** [caca-sharp.dll] Error 64
make[2]: Leaving directory `/var/tmp/portage/media-libs/libcaca-0.99_beta17/work/libcaca-0.99.beta17/caca-sharp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libcaca-0.99_beta17/work/libcaca-0.99.beta17'
make: *** [all] Error 2
 * ERROR: media-libs/libcaca-0.99_beta17 failed:
 *   emake failed

If dev-scheme/chicken is not installed, then libcaca's econf does not find csc & falls back on gmcs from mono.  Prior to 0.99_beta17, libcaca only looked for gmcs.  I was able to get media-libs/libcaca-0.99_beta17[mono] to install when dev-scheme/chicken is installed by editing libcaca-0.99_beta17.ebuild to add "use mono && export CSC=/usr/bin/gmcs" before econf in src_configure(), but I'm not sure that's the "right" way to fix this.
Comment 1 Conway S. Smith 2010-07-23 23:15:24 UTC
Created attachment 239961 [details]
Build log for failed libcaca-0.99_beta17[mono] emerge w/ dev-scheme/chicken installed
Comment 2 Conway S. Smith 2010-07-23 23:16:12 UTC
Created attachment 239963 [details]
Build log for successful libcaca-0.99_beta17[mono] emerge w/ dev-scheme/chicken not installed
Comment 3 Conway S. Smith 2010-07-23 23:17:47 UTC
Created attachment 239965 [details]
Build log for successful libcaca-0.99_beta17[mono] emerge using my edited ebuild w/ dev-scheme/chicken installed
Comment 4 Conway S. Smith 2010-07-23 23:20:55 UTC
Created attachment 239967 [details]
My edited libcaca-0.99_beta17.ebuild
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-07-24 08:14:47 UTC
+  24 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
+  libcaca-0.99_beta17.ebuild:
+  Make sure "gmcs" is preferred over "csc" wrt #329651 by Conway S. Smith.

I added:

use mono && export CSC=gmcs #329651

to the ebuild, didn't like the hardcoded /usr/bin path in your ebuild.

Thanks for reporting, and please reopen if my fix doesn't work for some reason...
Comment 6 Isaac Richter 2010-11-25 22:48:20 UTC
I had to change the ebuild to have "use mono && CSC=$(which gmcs)", since it otherwise still attempted to use /usr/bin/csc. (libcaca-0.99_beta17.ebuild,v 1.18 2010/10/29)

Perhaps, the fix should really be applied to mono (rather than libcaca) to install an appropriate environment variable?

(In reply to comment #5)
> +  24 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
> +  libcaca-0.99_beta17.ebuild:
> +  Make sure "gmcs" is preferred over "csc" wrt #329651 by Conway S. Smith.
> 
> I added:
> 
> use mono && export CSC=gmcs #329651
> 
> to the ebuild, didn't like the hardcoded /usr/bin path in your ebuild.
> 
> Thanks for reporting, and please reopen if my fix doesn't work for some
> reason...
> 

Comment 7 Conway S. Smith 2011-06-09 03:53:28 UTC
Sorry I didn't respond to this earlier, I had my ebuild in my local overlay still & didn't notice that use mono && export CSC=gmcs doesn't resolve the issue; it does need to include the path to correctly pick up gmcs.  As Isaac Richter noted, the path can come from $(which gmcs) if you still don't want /usr/bin/gmcs hardcoded.

Thanks!
Comment 8 Conway S. Smith 2012-06-01 17:48:42 UTC
I just hit this bug again w/ media-libs/libcaca-0.99_beta18[mono].  "use mono && export CSC=gmcs" doesn't fix this - it does need the path, or $(which gmcs).
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-06-01 22:52:52 UTC
(In reply to comment #8)
> I just hit this bug again w/ media-libs/libcaca-0.99_beta18[mono].  "use
> mono && export CSC=gmcs" doesn't fix this - it does need the path, or
> $(which gmcs).

`which` is external tool and not guaranteed to be installed
but bash has internal $(type -P gmcs) for example
anyway, fixed in portage now, thanks for noticing this
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2013-04-16 19:13:25 UTC
*** Bug 465934 has been marked as a duplicate of this bug. ***
Comment 11 Alexis Ballier gentoo-dev 2013-08-13 15:23:37 UTC
closing again now that its unmasked