Re: [gtkmm] Compilation installation & programming



Am Fre, 2002-11-08 um 20.51 schrieb Jill Rhoads:
> Well, I've gone through the last few days email about installation
> problems and can definitely confirm that Daniels a solution works in order
> to get it to compile...
> 
> > a) Configure libsigc++-1.2 with the same prefix as pkg-config, i.e.
> >    ./configure --prefix=/usr.
> 
> It looks like sigc++ has a installer that creates everything within the
> catalog you're compiling in instead of installing in the rest of the
> system.

That's how it should be.

> Anyhow...  I managed to get it to compile..and with Daniel's b
> solution I managed to get the tutorial simple.cc to compile. (However, I
> would have rather NOT have to had set the env variable..I was hoping that
> the installer would put the .pc in the correct dir.)

No, that would be a policy violation.  make install should *never*
install files into a location that wasn't explicitely requested by the
user via ./configure arguments.

It did put the .pc file in the correct directory.  Consider that you can
install packages without having write access to /usr.  Also, you might
not want to overwrite any distribution packages (which would be wise). 
It's even possible to install multiple versions of libsigc++ into
different prefixes.  And so on.

Note that there's nothing wrong about setting PKG_CONFIG_PATH.  It's
just The Right Way (tm) to go.

> > b) Set the PKG_CONFIG_PATH environment variable.  For your system,
> >    export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
> >    seems appropriate.  Best to add this to .profile or .bashrc or
> >    whatever.
> 
> However...when running the program I get the following error...
> 
> >./simple: error while loading shared libraries: libgtkmm-2.0.so.1: cannot
> >open shared object file: No such file or directory
> 
> Any ideas?  I didn't get ANY errors while installing...

Yes because it installed correctly.  You should either set
LD_LIBRARY_PATH="/usr/local/lib", or put /usr/local/lib into
/etc/ld.so.conf.  I strongly suggest doing the latter whenever you've
write access to /etc.

Note that this stuff is by no means specific to libsigc++ or gtkmm. 
This is just the way it works for almost any source package nowadays
(except for PKG_CONFIG_PATH which is quite new, but it's actually way
cleaner than the mechanisms used prior to its introduction).

Don't worry, once you got the basic setup working it'll work out of the
box for your future installs from source code ;)

Cheers,
--Daniel





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