Re: [Rhythmbox-devel] building rhythmbox for win32 with MinGW/MSYS



On Sat, Jun 6, 2009 at 11:30 PM, Jonathan Matthew<jonathan d14n org> wrote:
> On Sat, Jun 06, 2009 at 09:08:56PM +1000, Nguyen Thai Ngoc Duy wrote:
>> On Sat, Jun 6, 2009 at 9:04 PM, Jonathan Matthew<jonathan d14n org> wrote:
>> > On Sat, Jun 06, 2009 at 08:28:02PM +1000, Nguyen Thai Ngoc Duy wrote:
>> >> On Sun, Mar 8, 2009 at 8:04 PM, Brecht Sanders<brecht sanders org> wrote:
>> >> > Anyway, after addressing all this points (admittedly sometimes in a dirty
>> >> > way by commenting out some things) I was able compile everything. However
>> >> > linking failed with the output below. Basically there are a lot of undefined
>> >> > references. Any idea why this happens?
>> >>
>> >> I think I have spotted the problem.  Building corelib with
>> >> -no-undefined, I got the below errors. Now a question to Rhythmbox
>> >> developers: why does librhythmbox-core need something from rb-shell*?
>> >
>> > Because this isn't a cleanly separated code base.  Everything calls
>> > everything, which then calls back into everything.  The way the code is
>> > currently split between the rhythmbox binary and librhythmbox-core was
>> > more about getting it to link on common systems without having to move
>> > too many things around than about getting it right.
>>
>> So what if I make librhythmbox-core a noinst library and link it
>> internally to rhythmbox binary? I'm wondering if plugins still work..
>> That way I could avoid creating an incomlete dll (which libtool
>> refuses to do)
>
> I don't think that would help.  What we should do is first build
> librhythmbox-core, containing everything except main.c, then the
> rhythmbox binary, then the plugins.  The main thing we'd need to do is
> to move the plugin management code to a different directory (or use an
> external library for instead) and rearrange some makefiles.

Yeah.. after a few tries I can finally make a 4 MB
librhythmbox-core.dll and 80k rhythmbox.exe. And of course it's broken
;-) Some plugins build too, with -no-undefined. Let's see if I can
make rhythmbox GUI show up in the next few days. DBus looks scary. And
it'd be great if someone can come up with a patch to eliminate
gnome-media-profiles (I think it is used to build gstreamer pipelines,
a fixed pipeline is fine to me, for testing purposes).

Anyway the patch to make it build:

diff --git a/configure.ac b/configure.ac
index ceef9cc..7f7223f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -600,7 +600,7 @@ dnl
================================================================
 dnl Plugins
 dnl ================================================================

-PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+PLUGIN_LIBTOOL_FLAGS="-module -avoid-version -no-undefined"
 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)

 PLUGINDIR='${libdir}/rhythmbox/plugins'
diff --git a/corelib/Makefile.am b/corelib/Makefile.am
index 856f357..b3b0424 100644
--- a/corelib/Makefile.am
+++ b/corelib/Makefile.am
@@ -6,12 +6,16 @@ lib_LTLIBRARIES = librhythmbox-core.la
 librhythmbox_core_la_SOURCES =

 librhythmbox_core_la_LIBADD = 				\
+	$(top_builddir)/sources/libsourcesimpl.la	\
+	$(top_builddir)/shell/librbshell.la		\
 	$(top_builddir)/sources/libsources.la	        \
 	$(top_builddir)/metadata/librbmetadata.la	\
 	$(top_builddir)/widgets/librbwidgets.la         \
 	$(top_builddir)/rhythmdb/librhythmdb.la		\
 	$(top_builddir)/backends/librbbackends.la	\
-	$(top_builddir)/lib/librb.la
+	$(top_builddir)/podcast/librbpodcast.la	        \
+	$(top_builddir)/plugins/librbplugins.la		\
+	$(TOTEM_PLPARSER_LIBS)

 librhythmbox_core_la_LDFLAGS = -export-dynamic -no-undefined

diff --git a/podcast/Makefile.am b/podcast/Makefile.am
index 2e15edd..7fa6e28 100644
--- a/podcast/Makefile.am
+++ b/podcast/Makefile.am
@@ -14,8 +14,6 @@ librbpodcast_la_SOURCES =				\
 	rb-feed-podcast-properties-dialog.h		\
 	rb-podcast-properties-dialog.c			\
 	rb-podcast-properties-dialog.h			\
-	rb-podcast-parse.c				\
-	rb-podcast-parse.h				\
 	rb-podcast-manager.c				\
 	rb-podcast-manager.h
 librbpodcast_la_LIBADD =				\
diff --git a/shell/Makefile.am b/shell/Makefile.am
index cc5504b..4332a1b 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -92,11 +92,7 @@ librbshell_la_SOURCES =              			\
 	rb-missing-plugins.h

 rhythmbox_LDADD =					\
-	librbshell.la					\
 	$(top_builddir)/corelib/librhythmbox-core.la	\
-	$(top_builddir)/sources/libsourcesimpl.la	\
-	$(top_builddir)/podcast/librbpodcast.la	        \
-	$(top_builddir)/plugins/librbplugins.la		\
 	-lgstpbutils-0.10

 if USE_NOTIFY

-- 
Duy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]