[gnomemm] libgnomeuimm: undefined reference to `linc_source_create_watch'



I have succeeded in compiling libgnomeuimm-1.3.15 on my RedHat 8.0
system, but I had to overcome this linking error that came soon
after starting make:

    /opt/local/gnome2/lib/libORBit-2.so: undefined reference to
    `linc_source_create_watch'

I have installed some required libraries, including linc 1.1.0,
under /opt/local/gnome2.  Note that I also have linc 0.5.2,
installed by a RedHat 8.0 RPM under /usr.  I define PKG_CONFIG_PATH
to /opt/local/gnome2/lib/pkgconfig and LD_LIBRARY_PATH to
opt/local/gnome2/lib, so that linc 1.1.0 is supposed to hide 0.5.2.
My goal was to compile gnomemm et al. under /opt/local/gnome2 so
as to avoid modifying my GNOME 2.0 system as installed by RH8.0.

The missing symbol seems to be defined in this library:

    $ nm /opt/local/gnome2/lib/liblinc.so | grep linc_source_create_watch
    000051a8 T linc_source_create_watch

The libtool command is the following:

    /bin/sh ../../libtool --mode=link g++  -g -O2   -o
    generate_extra_defs  generate_defs_libgnomeui.o  -pthread
    -Wl,--export-dynamic -L/opt/local/gnome2/lib -L/usr/X11R6/lib
    -lgnomeui-2 -lSM -lICE -lgnomemm-1.3 -lgnomecanvasmm-2.0
    -lgconfmm-2.0 -lbonobouimm_widgets-1.3 -lbonobouimm_servers-1.3
    -lbonobomm_generated_stubs-1.3 -lbonobomm_generated_skels-1.3
    -lbonobomm_servers-1.3 -lbonoboui-2 -lORBit-2-cpp -lgnomecanvas-2
    -lgnome-2 -lart_lgpl_2 -lpangoft2-1.0 -lbonobo-2 -lgconf-2
    -lgnomevfs-2 -lbonobo-activation -lORBit-2 -llinc -lgthread-2.0
    -lglademm-2.0 -lgtkmm-2.0 -lglade-2.0 -lgdkmm-2.0 -latkmm-1.0
    -lpangomm-1.0 -lglibmm-2.0 -lsigc-1.2 -lgtk-x11-2.0 -lxml2 -lz
    -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   -lgtkmm_generate_extra_defs-2.0

Here is the g++ linking command generated by this:

    g++ -g -O2 -o generate_extra_defs generate_defs_libgnomeui.o
    -pthread -Wl,--export-dynamic  -L/opt/local/gnome2/lib
    -L/usr/X11R6/lib -lgnomeui-2 -lSM -lICE
    /opt/local/gnome2/lib/libgnomemm-1.3.so
    /opt/local/gnome2/lib/libgnomecanvasmm-2.0.so
    /opt/local/gnome2/lib/libgconfmm-2.0.so /usr/lib/liblinc.so
    /opt/local/gnome2/lib/libbonobouimm_widgets-1.3.so
    /opt/local/gnome2/lib/libbonobouimm_servers-1.3.so
    /opt/local/gnome2/lib/libbonobomm_generated_stubs-1.3.so
    /opt/local/gnome2/lib/libbonobomm_generated_skels-1.3.so
    /opt/local/gnome2/lib/libbonobomm_servers-1.3.so
    -lbonoboui-2 /opt/local/gnome2/lib/libORBit-2-cpp.so
    -lgnomecanvas-2 -lgnome-2 -lart_lgpl_2 -lpangoft2-1.0
    -lbonobo-2 -lgconf-2 -lgnomevfs-2 -lbonobo-activation
    /opt/local/gnome2/lib/libORBit-2.so /usr/lib/libpopt.so
    /opt/local/gnome2/lib/liblinc.so /usr/lib/libgthread-2.0.so
    -lpthread /opt/local/gnome2/lib/libglademm-2.0.so
    /opt/local/gnome2/lib/libgtkmm-2.0.so /usr/lib/libglade-2.0.so
    /opt/local/gnome2/lib/libgdkmm-2.0.so
    /opt/local/gnome2/lib/libatkmm-1.0.so
    /opt/local/gnome2/lib/libpangomm-1.0.so
    /opt/local/gnome2/lib/libglibmm-2.0.so /usr/lib/libxml2.so -lz
    /opt/local/gnome2/lib/libgtkmm_generate_extra_defs-2.0.so
    /opt/local/gnome2/lib/libsigc-1.2.so
    /opt/local/gnome2/lib/libgtk-x11-2.0.so
    /opt/local/gnome2/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so
    /opt/local/gnome2/lib/libgdk_pixbuf-2.0.so -lm -lpangoxft-1.0
    -lpangox-1.0 -lpango-1.0 /usr/lib/libgobject-2.0.so
    /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so
    -Wl,--rpath -Wl,/opt/local/gnome2/lib -Wl,--rpath
    -Wl,/opt/local/gnome2/lib

I notice that there is one mention of linc (-llinc) on
the libtool command line, but the g++ command mentions two
different paths for the .so file: /usr/lib/liblinc.so and then
/opt/local/gnome2/lib/liblinc.so.

Interestingly:

$ nm /usr/lib/liblinc.so | grep linc_source_create_watch
000056a0 t linc_source_create_watch

The code is 't' instead of 'T' as in the other case.  This means that
the symbol is "local" according to the nm manual page.

If I edit the g++ linking command to remove /usr/lib/liblinc.so, the
linking succeeds.  Then the rest of libgnomeuimm compiles successfully.

I am not sure how to fix this the right way, however.

Here are the versions of the libraries that are installed under
/opt/local/gnome2:

atkmm-1.0.pc                            2.2.0
gconfmm-2.0.pc                          2.0.1
gdk-2.0.pc                              2.2.1
gdkmm-2.0.pc                            2.2.0
gdk-pixbuf-2.0.pc                       2.2.1
gdk-pixbuf-xlib-2.0.pc                  2.2.1
gdk-x11-2.0.pc                          2.2.1
glibmm-2.0.pc                           2.2.0
gtk+-2.0.pc                             2.2.1
gtkmm-2.0.pc                            2.2.0
gtk+-x11-2.0.pc                         2.2.1
libbonobomm-2.0.pc                      1.3.3
libbonobomm-2.0-uninstalled.pc          1.3.3
libbonobouimm-2.0.pc                    1.3.4
libbonobouimm-2.0-uninstalled.pc        1.3.4
libglademm-2.0.pc                       2.0.1
libgnomecanvasmm-2.0.pc                 2.0.0
libgnomemm-2.0.pc                       1.3.10
libgnomeuimm-2.0.pc                     1.3.15
linc.pc                                 1.1.0
ORBit-2.0-cpp.pc                        1.3.4
ORBit-2.0.pc                            2.7.0
ORBit-CosNaming-2.0.pc                  2.7.0
ORBit-idl-2.0.pc                        2.7.0
ORBit-imodule-2.0.pc                    2.7.0
pangomm-1.0.pc                          2.2.0
sigc++-1.2.pc                           1.2.3

-- 
Pierre Sarrazin <sarrazip at sympatico dot ca>



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