arfbtwn / banshee

http://banshee.fm/
MIT License
6 stars 4 forks source link

build: Compilation Error when both GTK 2 and 3 are installed #51

Open arfbtwn opened 7 years ago

arfbtwn commented 7 years ago

from @nicman23's comment on #50:

can you please fix some compiling errors when compiling with gtk2 and gtk3 libs in system ie:

MCS   ../../../bin/Banshee.Dap.AppleDevice.dll
error CS1703: An assembly `atk-sharp' with the same identity has already been imported. Consider removing one of the references
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll (Location of the symbol related to previous error)
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-3.0/atk-sharp.dll (Location of the symbol related to previous error)
error CS1703: An assembly `gdk-sharp' with the same identity has already been imported. Consider removing one of the references
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll (Location of the symbol related to previous error)
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-3.0/gdk-sharp.dll (Location of the symbol related to previous error)
error CS1703: An assembly `glib-sharp' with the same identity has already been imported. Consider removing one of the references
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll (Location of the symbol related to previous error)
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-3.0/glib-sharp.dll (Location of the symbol related to previous error)
error CS1703: An assembly `gtk-sharp' with the same identity has already been imported. Consider removing one of the references
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll (Location of the symbol related to previous error)
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-3.0/gtk-sharp.dll (Location of the symbol related to previous error)
error CS1703: An assembly `pango-sharp' with the same identity has already been imported. Consider removing one of the references
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll (Location of the symbol related to previous error)
/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-3.0/pango-sharp.dll (Location of the symbol related to previous error)
arfbtwn commented 7 years ago

Does this happen when compiling other assemblies? I'm wondering whether libgpod-sharp is pulling in the older GTK# - could you execute pkg-config --libs libgpod-sharp and let me know the output on your system?

nicman23 commented 7 years ago

i used to remove gtk sharp 3 and compile banshee (with gtk2) so i do not know if this will help you:

pkg-config --libs libgpod-sharp

-r:/usr/lib/libgpod/libgpod-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll

arfbtwn commented 7 years ago

Nah that's exactly what I was expecting - I guess your libgpod is compiled with gtk support?

I think you'll have to set some environment variables to get around it, from ./configure --help:

  LIBGPODSHARP_CFLAGS
              C compiler flags for LIBGPODSHARP, overriding pkg-config
  LIBGPODSHARP_LIBS
              linker flags for LIBGPODSHARP, overriding pkg-config

Second one is the one you want - I'm not sure how you'll fare at runtime, let me know.