Re: Compiling

On May 30, 2007, at 7:43 PM, Turd Turtle wrote:

Note the: -L/net/bmachine/x/rich/usr/local/lib ; I installed the glib-2.12.12 libraries into /net/bmachine/x/rich/usr/local/lib

When I take out the -L/net/bmachine/x/rich/usr/local/lib flag, it does not link (cannot find libraries glib, gobject, gthread), so I know that it is not linking to /usr/lib (the machine's /usr/ lib has installed).

So I am not sure why I still get this error (since everything compiles perfectly AND I do link correctly):

INPUT> /usr/bin/perl -I blib/lib -I blib/arch -MGlib::GenPod -MGlib \
        -e 'add_types ("doctypes");  $Glib::GenPod::COPYRIGHT=
"Copyright (C) 2003-2007 by the gtk2-perl team.\n\nThis software is licensed under the LGPL. See L<Glib> for a full notice.\n"; $Glib::GenPod::MAIN_MOD="Glib"; xsdoc2pod("build/", "blib/ lib", "build/podindex");'

OUTPUT>/usr/bin/perl: symbol lookup error: blib/arch/auto/Glib/ undefined symbol: g_bookmark_file_error_quark
make: *** [build/podindex] Error 127

What do you get from this command?

    ldd blib/arch/auto/Glib/ | grep libgtk

Does this print the /net/bmachine/x/rich/usr/local/lib path, or does it print /usr/lib?

When linking, the Makefiles supply the correct -L$path line and the linker can find the correct libraries. HOWEVER, if that directory is not in your system's normal runtime linker search path, the system will not look there at runtime for the library!

If the command above prints out /usr/lib instead of /net/bmachine/x/ rich/usr/local/lib, then this is what's happening. Try doing this:

export LD_LIBRARY_PATH=/net/bmachine/x/rich/usr/local/lib: $LD_LIBRARY_PATH

and then run the build command again. If that fixes the problem, you have a few options:

1. Add /net/bmachine/x/rich/usr/local/lib to /etc/ (not recommended, as you must be root) 2. Add /net/bmachine/x/rich/usr/local/lib to LD_LIBRARY_PATH in your shell's login setup 3. For scripts that use Gtk2, use a little wrapper script that sets up the environment appropriately.

After a few years of messing up my systems, i heartily recommend option 3. You'll probably need this anyway for setting PERL5LIB to point perl to a nonstandard install location for Gtk2.


- The header include paths come from "pkg-config --cflags gobject-2.0"
- The link paths come from "pkg-config --libs gobject-2.0"
- When you attempt to *run*, you get what is in LD_LIBRARY_PATH.  If
the directory listed in the output of pkg-config --libs is not in
LD_LIBRARY_PATH (or /etc/, then you will have to
manipulate your environment by hand.
- If you're not doing anything special or abnormal, then your system
is misconfigured.

The stereo, playing the Beastie Boys' "Rhymin' and Stealin'": "I'll steal your girlie like I stole your bike!"

Elysse:  "You mean, take off the chain and ride away?"

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