CVS compilation tool

Randy Chung aoshi at OCF.Berkeley.EDU
Tue Aug 3 07:11:33 CEST 2004


Howdy Marc,

The short answer is, sort of :)

Let me illustrate the problem with an example.  Let's say I things I 
install in /usr/local (<-- xfce 4.0.6 is here), and I want to install 
xfce CVS side-by-side so I can have a stable system to run and also be 
able to develop the CVS branch.

To make sure I have pc's in /usr/local examined before /usr (since 
they'd probably be newer), I would set my PKG_CONFIG_PATH to 
/usr/local/lib/pkgconfig:/usr/lib/pkgconfig.

If I were to use your script now, what would happen is that my 
PKG_CONFIG_PATH would become:

/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:(all your cvs_dir 
stuff):/usr/local/lib/pkgconfig

An attempt to run configure would step through PKG_CONFIG_PATH, find the 
first instance in /usr/local/lib/pkgconfig (xfce 4.0.6), and die.  What 
I had in mind was something more like:

PKG_CONFIG_PATH=${cvs_dir}/xfce4-panel/panel:$PKG_CONFIG_PATH

Specifically, $PKG_CONFIG_PATH comes after the paths you want to add; 
this way you can be sure all the cvs dirs are checked first.

I also just noticed that you're exporting PKG_CONFIG_PATH, which might 
not be a good idea.  That will end up affecting the user's environment, 
and they might start having strange things happen.  Seeing that only cvs 
things and /usr/local is put ahead of the default PKG_CONFIG_PATH, I 
don't think it'll cause problems on a well-behaved system, but things 
might go nuts on a slightly misconfigured system.

Instead of exporting it, simply change the configure line to:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH (+ the original configure line)

and that should use the PKG_CONFIG_PATH you define earlier in your 
script, without exporting it to the user's environment.

If that's still a bit confusing, let me know and I'll try to clarify :)

--

Randy

Marc Schwartz wrote:
> Randy,
> 
> Thanks for your comments. Just for confirmation on your second point,
> you are suggesting that I use:
> 
> # SET REQUIRED PKG_CONFIG DIRECTORIES
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/xfce4-panel/panel
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/libxfcegui4/libxfcegui4
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/libxfce4util/libxfce4util
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/libxfce4mcs/libxfce4mcs
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/xfce-mcs-manager/xfce-mcs-manager
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/xffm/src
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${cvs_dir}/xfce4-session/xfce4-session
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
> export PKG_CONFIG_PATH
> 
> where the /usr/local/lib/pkgconfig line is the last, rather than the
> first?
> 
> In my case, I do not have 4.0.6 installed. I removed all xfce related
> RPMS before installing the cvs version. The first time around, I built
> xfce4 cvs under GNOME.
> 
> That being said, the above sequence makes sense, presuming that there
> may be a change in the cvs pc files, which seems a reasonable
> possibility.
> 
> Thanks.
> 
> Marc
> 
> 
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev




More information about the Xfce4-dev mailing list