Bug 8796 - XBUILD resolves depencies wrong
Summary: XBUILD resolves depencies wrong
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-06 06:15 UTC by Marcel Hellwig
Modified: 2014-02-08 02:32 UTC (History)
4 users (show)

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


Attachments
make output (360.43 KB, text/plain)
2012-12-06 06:15 UTC, Marcel Hellwig
Details


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 for Bug 8796 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Marcel Hellwig 2012-12-06 06:15:43 UTC
Created attachment 3064 [details]
make output

I'm trying to build monodevelop from git master and then this happens

	: error CS0006: Metadata file `/usr/local/lib/mono/gtk-sharp-2.0/glib-sharp.dll' could not be found
	: error CS0006: Metadata file `/usr/local/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not be found
	: error CS0006: Metadata file `/usr/local/lib/mono/gtk-sharp-2.0/atk-sharp.dll' could not be found
	: error CS0006: Metadata file `/usr/local/lib/mono/gtk-sharp-2.0/gdk-sharp.dll' could not be found
	: error CS0006: Metadata file `/usr/local/lib/mono/gtk-sharp-2.0/gtk-sharp.dll' could not be found

In fact, that's true, cause those "dll"s are not in /usr/local, but in /usr. So I tried to find out why this is wrong. Pkg-config gives me the right path:

$ pkg-config --libs gtk-sharp-2.0
-r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib64/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll

As you can see, there is nothing with local. Okay. Then I opened the Makefile and changed this line:
PKG_CONFIG_PATH and removed every /usr/local/... entry. After that I typed in make again and it works. Fine!

BUT: where is the problem now? I checked the paths to find out how xbuild could think that there are my gtk-sharp libs.
As far as I know, pkg-config use .pc files in the folders and check their content. So I did and there is nothing with gtk-sharp inside those files.
Next step was to check the path resolving of xbuild with verbosity diagnostic. And yup, here is a hint (I will attach the whole file to this bug)

Somewhere below line 1482:

Reference found at search path {TargetFrameworkDirectory}
				Primary Reference glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f
					Reference glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f resolved to /usr/local/lib/mono/gtk-sharp-2.0/glib-sharp.dll. CopyLocal = False

Whats wrong with xbuild?! There is not file, nor a directory /usr/local/lib/mono .

I hope you guys can find out whats wrong. As I mentioned before, when I delete the local paths in the Makefile, everything works fine, but this could not be the solution!

Regards,
Marcel Hellwig
Comment 1 Antonius Riha 2014-02-08 02:32:50 UTC
You may be experiencing this issue [1], which is about a corrupted cache of package-config files. If you have installed gtk-sharp to the prefix /usr/local in the past, the cache would still have entries for those dlls, even if they have been removed. However, this should be fixed in current master.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=11133