how to use 4.0.6 & 4.2.0 simultaneously
Randy Chung
aoshi at OCF.Berkeley.EDU
Wed Oct 6 08:17:24 CEST 2004
Brian J. Tarricone wrote:
>>>i suppose it _is_ possible to install them both,
>>>but that probably involves hacking a good number of the makefiles
>>>and possibly the .pc files to make sure that the library search path
>>>is specified in a certain way on the gcc link lines.
>>
>>apparently that's not necessary, as the above shows.
>
>
> it's necessary in some cases - anecdotal evidence shows that sometimes it
> works, and sometimes it doesn't. i'm not willing to support it with this
> kind of track record. i believe randy did some work on the build system,
> but i don't know what came of that.
I'm still semi-working on it, though to be honest my experience with
Makefiles is limited so I've been reading up on them along the way.
There's a bit of peculiar behavior where the -L portion of LD_FLAGS is
being read in correctly, but the -R part is ignored...I'm not quite sure
why this is happening, and I'm still investigating it.
One thing I've noticed is that in the autogenerated Makefiles, you get a
line that looks like this (sorry for the weird wrapping):
xfcalendar_LDADD = \
-Wl,--export-dynamic -L/usr/X11R6/lib -L/usr/local/lib
-lxfcegui4 -lgtk-x11-2.0 -lxfce4util -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
\
-Wl,-R/usr/lib -ldbh -lm
\
-L/usr/X11R6/lib -L/usr/local/lib -lxfce4mcs-client -lxfce4util
-lglib-2.0
...which ends up creating a binary which links against the
currently-installed libraries in /usr/lib (see the -R/usr/lib line
there). The curious thing is, if I remove the "-Wl" flag before the
-R/usr/lib part, everything links together correctly, like so:
xfcalendar_LDADD = \
-Wl,--export-dynamic -L/usr/X11R6/lib -L/usr/local/lib
-lxfcegui4 -lgtk-x11-2.0 -lxfce4util -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
\
-R/usr/lib -ldbh -lm
\
-L/usr/X11R6/lib -L/usr/local/lib -lxfce4mcs-client -lxfce4util
-lglib-2.0
...note how the -R/usr/lib line is no longer passed to the linker
directly. I'm not sure why this happens; maybe somebody with more
experience with the linker will pipe up. What would be the
repurcussions of simply removing the -Wl part entirely? It seems there
might be some peculiarities with the way my LDFLAG variable is getting
read as well, since when I put a -Wl,$(LDFLAGS) before the /usr/lib part
only the -L part of my LDFLAGS is read (where LDFLAGS="-L/usr/local/lib
-R/usr/local/lib").
Alternatively, we can bypass this issue entirely by simply having
distros install to separate directories and setting the necessary
environment variables to make life happy :P
Benny also has a solution of sorts, where you can move the Xfce
libraries out of /usr/lib while installing, and then move them back
afterwards (assuming 4.2 is going to a different directory). I'm not
sure how comfortable I am about moving libraries around, but that's
another way about it.
> -brian
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev
--
Randy
More information about the Xfce4-dev
mailing list