Bug 10484 - Mono 3.0.4 + gtk-sharp 2.12 generate mixed 2.0+4.0 assemblies
Summary: Mono 3.0.4 + gtk-sharp 2.12 generate mixed 2.0+4.0 assemblies
Alias: None
Product: Class Libraries
Classification: Mono
Component: Mono.Cairo ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-02-20 19:51 UTC by Andres G. Aragoneses
Modified: 2013-02-22 08:48 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andres G. Aragoneses 2013-02-20 19:51:26 UTC
In a Linux OS (particularly testing now in Ubuntu 12.10), if you:

1) Uninstall stock mono packages (apt-get purge mono-runtime cli-common)
2) clone mono 3.0.4 and ./autogen.sh --prefix=/usr && make && sudo make install
3) clone gtk-sharp , checkout 2-12 branch, ./autogen.sh --prefix=/usr && make && sudo make install

Current results:
gtk-sharp.dll generated by step 3 is a 4.0 profile assembly, however it links to Mono.Cairo 2.0 dll.

Expected results:
Being a 4.0 assembly it should link to the Mono.Cairo 4.0 dll.

Currently there are in my system 2 assemblies:
andres1210@andres-ubuntu:/usr/lib/pkgconfig$ find /usr | grep -i cairo | grep dll

The problem is that gtk-sharp has extracted the path to the dll from the PC file, which hardcodes to 2.0.

The solution is, I think, to fix the .pc file to not hardcode the 2.0 path.

There are other .pc files that don't specify it (just by using "-r:Foo") and it is mcs the one which chooses the assembly, based on the -sdk parameter passed to it.

Pull request coming...
Comment 1 Andres G. Aragoneses 2013-02-20 19:55:37 UTC
Comment 2 Andres G. Aragoneses 2013-02-22 08:48:36 UTC