After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 508988 - pygobject flags missing when linking python-loader
pygobject flags missing when linking python-loader
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
1.8.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-01-12 17:42 UTC by Daniel Macks
Modified: 2008-01-14 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2008-01-12 17:42:18 UTC
Compiling gnumeric-1.8.0 on OS X, with all support libs supplied by fink, in plugins/python-loader:

/bin/sh ../../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -Wmissing-prototypes  -Wsign-compare -Wpointer-arith -Wnested-externs -Wchar-subscripts -Wwrite-strings -Wdeclaration-after-statement -Wnested-externs -Wmissing-noreturn -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-pointer-sign -module -avoid-version  -L /sw/lib -lpython2.5 -L/sw/lib/python2.5/config   -L/sw/lib -o python_loader.la -rpath /sw/lib/gnumeric/1.8.0/plugins/python-loader python-loader.lo gnm-python.lo gnm-py-interpreter.lo py-gnumeric.lo py-interpreter-selector.lo py-command-line.lo py-console.lo boot.lo  
gcc ${wl}-undefined ${wl}dynamic_lookup -o .libs/python_loader.so -bundle  .libs/python-loader.o .libs/gnm-python.o .libs/gnm-py-interpreter.o .libs/py-gnumeric.o .libs/py-interpreter-selector.o .libs/py-command-line.o .libs/py-console.o .libs/boot.o  -L/sw/src/fink.build/gnumeric-1.8.0-2/gnumeric-1.8.0/plugins/python-loader -lpython2.5 -L/sw/lib/python2.5/config -L/sw/lib
creating python_loader.la

There are no -l flags for gobject or any other glib/gtk stuff, even though many symbols are used from those libs. The problem is in configure.in, starting at line 944 (as of 1.8.0; SVN trunk is same):

    PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= pygobject_required_version,,
      [python_msg="Missing pygobject"])
[...]
    GNM_PY_CFLAGS="-I $PY_INCLUDE_DIR $PYGOBJECT_CFLAGS"
    GNM_PY_LDFLAGS="-L $PY_LIB_DIR -lpython$PY_VERSION $PYGOBJECT_LDFLAGS"

It *looks* reasonable, but PKG_CHECK_MODULES(FOO) sets FOO_CFLAGS and FOO_LIBS, not FOO_LDFLAGS. So instead, that last line above should be:

    GNM_PY_LDFLAGS="-L $PY_LIB_DIR -lpython$PY_VERSION $PYGOBJECT_LIBS"
Comment 1 Daniel Macks 2008-01-12 17:56:11 UTC
In that same GNM_PY_LDFLAGS line is another error: there should not be a space between "-L" and "$PY_LIB_DIR". Notice how I get a weird -L/sw/src.... flag in the gcc command that has no obvious antecedent in the libtool command. Apparently it's treating it as "-L.", which is clearly not what was intended here. So:

   GNM_PY_LDFLAGS="-L$PY_LIB_DIR -lpython$PY_VERSION $PYGOBJECT_LIBS"

Comment 2 Morten Welinder 2008-01-14 19:12:15 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.