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 346456 - gnome-2.14 branch fails to build with -z defs (missing symbols check)
gnome-2.14 branch fails to build with -z defs (missing symbols check)
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: build
1.7.x
Other Linux
: Normal normal
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2006-07-03 12:30 UTC by Loïc Minier
Modified: 2006-08-23 10:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix linking of libspi (531 bytes, patch)
2006-07-03 12:35 UTC, Loïc Minier
none Details | Review
Fix linking of login-helper and drops useless LDADD (1017 bytes, patch)
2006-07-03 15:05 UTC, Loïc Minier
none Details | Review
Fix linking of atk-bridge (475 bytes, patch)
2006-07-03 15:33 UTC, Loïc Minier
none Details | Review

Description Loïc Minier 2006-07-03 12:30:31 UTC
Hi,

The gnome-2-14 branch of at-spi in CVS faiks to build under Debian unstable if you try to build with the "-z defs" link flag:

LDFLAGS="-Wl,-z,defs" ./configure
make

...
creating libspi.la
(cd .libs && rm -f libspi.la && ln -s ../libspi.la libspi.la)
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -
I.. -I..  -DORBIT2=1 -pthread -I/usr/include/libbonobo-2.0 -I/usr/include/glib-2
.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/bonobo-ac
tivation-2.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/in
clude -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/u
sr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -I/usr/include/freetype2
      -g -O2 -MT Accessibility-imodule.lo -MD -MP -MF ".deps/Accessibility-imodu
le.Tpo" -c -o Accessibility-imodule.lo Accessibility-imodule.c; \
        then mv -f ".deps/Accessibility-imodule.Tpo" ".deps/Accessibility-imodul
e.Plo"; else rm -f ".deps/Accessibility-imodule.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -DORBIT2=1 -pthread -I/usr/include/l
ibbonobo-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/
orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/atk-1.0 -I/usr/inc
lude/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pang
o-1.0 -I/usr/include/gail-1.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/l
ibart-2.0 -I/usr/include/freetype2 -g -O2 -MT Accessibility-imodule.lo -MD -MP -
MF .deps/Accessibility-imodule.Tpo -c Accessibility-imodule.c  -fPIC -DPIC -o .l
ibs/Accessibility-imodule.o
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2  -Wl,-z,defs -o Accessibilit
y_module.la -rpath /home/lool/cvs/cvs.gnome.org/at-spi-2-14/prefix/lib/orbit-2.0
 -export-dynamic -module -avoid-version Accessibility-imodule.lo  -lSM -lICE -lX
11 gcc -shared  .libs/Accessibility-imodule.o  -lSM -lICE -lX11  -Wl,-z -Wl,defs -W
l,-soname -Wl,Accessibility_module.so -o .libs/Accessibility_module.so
.libs/Accessibility-imodule.o:(.data.rel.ro+0x0): undefined reference to `ORBit_
TypeCode_epv'
.libs/Accessibility-imodule.o:(.data.rel.ro+0x40): undefined reference to `ORBit
_TypeCode_epv'
.libs/Accessibility-imodule.o:(.data.rel.ro+0x80): undefined reference to `ORBit
_TypeCode_epv'
.libs/Accessibility-imodule.o:(.data.rel.ro+0xc0): undefined reference to `ORBit
_TypeCode_epv'
.libs/Accessibility-imodule.o:(.data.rel.ro+0x100): undefined reference to `ORBi
t_TypeCode_epv'
.libs/Accessibility-imodule.o:(.data.rel.ro+0x140): more undefined references to
 `ORBit_TypeCode_epv' follow
.libs/Accessibility-imodule.o:(.data.rel.ro+0x1540): undefined reference to `TC_
CORBA_sequence_CORBA_string_struct'
...
.libs/Accessibility-imodule.o:(.data.rel+0x4e04): undefined reference to `TC_COR
BA_boolean_struct'
collect2: ld returned 1 exit status
make[3]: *** [Accessibility_module.la] Error 1
make[3]: leaving directory « /home/lool/cvs/cvs.gnome.org/at-spi-2-14/libsp
i »
make[2]: *** [all] Error 2

I'm not exactly sure why at-spi used to build in the past in Debian, my best guess is because we are in the process of removing the *.la files of development libraries.  Perhaps these *.la files used to pull more libs when creating Accessibility_module.la and hence all symbols were resolved?

I'll attach a patch to fix this particular error.

Bye,
Comment 1 Loïc Minier 2006-07-03 12:35:07 UTC
Created attachment 68294 [details] [review]
Fix linking of libspi

Please note that it will still fail on a similar mistake alter in the build:
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2  -Wl,-z,defs -o libloginhelper.la -rpath /home/lool/cvs/cvs.gnome.org/at-spi-2-14/prefix/lib  Accessibility_LoginHelper-stubs.lo Accessibility_LoginHelper-skels.lo Accessibility_LoginHelper-common.lo login-helper.lo  -lSM -lICE -lX11 
gcc -shared  .libs/Accessibility_LoginHelper-stubs.o .libs/Accessibility_LoginHelper-skels.o .libs/Accessibility_LoginHelper-common.o .libs/login-helper.o  -lSM -lICE -lX11  -Wl,-z -Wl,defs -Wl,-soname -Wl,libloginhelper.so.0 -o .libs/libloginhelper.so.0.0.0
.libs/Accessibility_LoginHelper-stubs.o: In function `Accessibility_LoginHelper_unImplemented4':
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper/Accessibility_LoginHelper-stubs.c:48: undefined reference to `ORBit_c_stub_invoke'
.libs/Accessibility_LoginHelper-stubs.o: In function `Accessibility_LoginHelper_unImplemented3':
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper/Accessibility_LoginHelper-stubs.c:43: undefined reference to `ORBit_c_stub_invoke'
.libs/Accessibility_LoginHelper-stubs.o: In function `Accessibility_LoginHelper_unImplemented2':
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper/Accessibility_LoginHelper-stubs.c:38: undefined reference to `ORBit_c_stub_invoke'
...
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper/login-helper.c:182: undefined reference to `g_free'
.libs/login-helper.o: In function `login_helper_finalize':
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper/login-helper.c:37: undefined reference to `g_type_check_class_cast'
collect2: ld returned 1 exit status
make[3]: *** [libloginhelper.la] Error 1
make[3]: leaving directory « /home/lool/cvs/cvs.gnome.org/at-spi-2-14/login-helper »
make[2]: *** [all] Error 2
Comment 2 Loïc Minier 2006-07-03 15:05:11 UTC
Created attachment 68309 [details] [review]
Fix linking of login-helper and drops useless LDADD

The second patch fixes the next build failure and drops an useless "LDADD = $(X_LIBS) $(LOGIN_HELPER_LIBS)" (X_LIBS and LOGIN_HELPER_LIBS are never defined).

The next failure is:
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2  -Wl,-z,defs -o libatk-bridge.la -rpath /home/lool/cvs/cvs.gnome.org/at-spi-2-14/prefix/lib/gtk-2.0/modules -rpath /home/lool/cvs/cvs.gnome.org/at-spi-2-14/prefix/lib/gtk-2.0/modules -module -avoid-version -Wl,-z,defs ../libspi/libspi.la bridge.lo  -lSM -lICE -lX11 
gcc -shared  .libs/bridge.o  -Wl,--rpath -Wl,/home/lool/cvs/cvs.gnome.org/at-spi-2-14/libspi/.libs -Wl,--rpath -Wl,/home/lool/cvs/cvs.gnome.org/at-spi-2-14/prefix/lib ../libspi/.libs/libspi.so -lSM -lICE -lX11  -Wl,-z -Wl,defs -Wl,-z -Wl,defs -Wl,-soname -Wl,libatk-bridge.so -o .libs/libatk-bridge.so
.libs/bridge.o: In function `spi_atk_bridge_register_application':
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/atk-bridge/bridge.c:287: undefined reference to `bonobo_object_get_type'
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/atk-bridge/bridge.c:287: undefined reference to `g_type_check_instance_cast'
...
/home/lool/cvs/cvs.gnome.org/at-spi-2-14/atk-bridge/bridge.c:551: undefined reference to `g_print'
collect2: ld returned 1 exit status
make[2]: *** [libatk-bridge.la] Error 1
make[2]: leaving directory « /home/lool/cvs/cvs.gnome.org/at-spi-2-14/atk-bridge »
Comment 3 Loïc Minier 2006-07-03 15:33:23 UTC
Created attachment 68311 [details] [review]
Fix linking of atk-bridge

With this third patch (basically the same approach, I suggest you rename LIBSPI_LIBS to COMMON_LIBS :), at-spi builds again here.
Comment 4 Loïc Minier 2006-07-18 19:02:05 UTC
Would be nice if you comment on the patches or include them.
Comment 5 bill.haneman 2006-07-19 16:27:00 UTC
Hi Loïc,

Just getting to the patches today.  They look good to me, if all is well after applying locally I will commit them.  Thanks very much for the fix!
Comment 6 bill.haneman 2006-07-19 16:34:50 UTC
Comment on attachment 68311 [details] [review]
Fix linking of atk-bridge

This patch seems to be obsolete; is it still necessary?  Makefile.am in atk-bridge was changed recently and now defines libatk_bridge_la_LIBADD, which it didn't do before.
Comment 7 bill.haneman 2006-07-19 16:38:08 UTC
Actually, looking closer, these patches don't seem to be correct anymore.

In response to other bugs we have added similar LIBADD definitions to these Makefiles; do they solve your problem?
Comment 8 Loïc Minier 2006-07-19 17:52:31 UTC
My report starts with "The gnome-2-14 branch of at-spi in CVS".  The bug was present in at-spi 1.7.7, the latest upstream release, when I reported the bug.

The bug is still present in the gnome-2-14 branch, but HEAD fails differently now:
make[3]: Entering directory `/home/lool/cvs/cvs.gnome.org/at-spi/libspi'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I..  -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare  -DORBIT2=1 -pthread -I/usr/include/libbonobo-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -I/usr/include/freetype2      -g -O2 -MT Accessibility-imodule.lo -MD -MP -MF ".deps/Accessibility-imodule.Tpo" -c -o Accessibility-imodule.lo Accessibility-imodule.c; \
        then mv -f ".deps/Accessibility-imodule.Tpo" ".deps/Accessibility-imodule.Plo"; else rm -f ".deps/Accessibility-imodule.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -DORBIT2=1 -pthread -I/usr/include/libbonobo-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -I/usr/include/freetype2 -g -O2 -MT Accessibility-imodule.lo -MD -MP -MF .deps/Accessibility-imodule.Tpo -c Accessibility-imodule.c  -fPIC -DPIC -o .libs/Accessibility-imodule.o
In file included from Accessibility-common.c:10,
                 from Accessibility-imodule.c:9:
Accessibility.h:5534: error: static declaration of 'Bonobo_Stream__iinterface' follows non-static declaration
/usr/include/libbonobo-2.0/bonobo/Bonobo.h:5385: error: previous declaration of 'Bonobo_Stream__iinterface' was here
Accessibility.h:5541: error: static declaration of 'Bonobo_Stream__imethods' follows non-static declaration
/usr/include/libbonobo-2.0/bonobo/Bonobo.h:5392: error: previous declaration of 'Bonobo_Stream__imethods' was here
Accessibility.h:5547: error: static declaration of 'Bonobo_Storage__iinterface' follows non-static declaration
/usr/include/libbonobo-2.0/bonobo/Bonobo.h:5398: error: previous declaration of 'Bonobo_Storage__iinterface' was here
Accessibility.h:5554: error: static declaration of 'Bonobo_Storage__imethods' follows non-static declaration
/usr/include/libbonobo-2.0/bonobo/Bonobo.h:5405: error: previous declaration of 'Bonobo_Storage__imethods' was here
make[3]: *** [Accessibility-imodule.lo] Error 1
make[3]: Leaving directory `/home/lool/cvs/cvs.gnome.org/at-spi/libspi'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/lool/cvs/cvs.gnome.org/at-spi/libspi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lool/cvs/cvs.gnome.org/at-spi'
make: *** [all] Error 2

Will you do a bugfix release for the 2.14 branch?  What are the version number of the current and next release of at-spi in 2.14?

(Reopening, bug leaving the patches as obsolete.)
Comment 9 Loïc Minier 2006-07-19 20:16:03 UTC
Do you want me to open a separate report for the new failure?
Comment 10 bill.haneman 2006-07-19 20:25:42 UTC
I cannot reproduce your failure in comment #8.

I don't see why you'd be using stable at-spi in a debian-unstable env anyhow.

If you'd like to apply the old patches to the gnome-2.14 branch, please feel free.
Comment 11 Loïc Minier 2006-07-19 20:45:28 UTC
1) Debian "unstable" is unstable because we're preparing stable there.  We upload software to Debian unstable, and if it has no serious bug, it enters the archive that we will call "stable" the day of the release.

We only upload releases, and currently we track GNOME 2.14.  GNOME 2.15/2.16 is being partly uploaded to experimental, but we lack manpower to do so completely.

The bug is as simple as: you fixed the build failure un HEAD, it exists in 2.14 too, people couldn't rebuild at-spi from GNOME 2.14 in Debian (I think we discovered this when we removed *.la files), I've added the patches to the 2.14 tarball in a new Debian upload, and this is now fixed.  Ideally, you would integrate the fixes in the next 2.14 release of at-spi, hence my bug, hence my requests.


2) I don't have commit access.


3) Concerning the build failure, this is with Orbit 2 version 2.14.0, no fancy build procedure:
cvs -d:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co at-spi
cd at-spi
./autogen.sh
make

I'm not alone with this failure:
http://jhbuild.bxlug.be/builds/2006-07-19-0005/logs/at-spi/#build
Comment 12 Luca Ferretti 2006-07-21 12:11:27 UTC
I've the same build failure on comment 8 in my jhbuild sandbox.

This prevents from build following modules: libgail-gnome gnome-mag gnopernicus gok orca :-(

Of course, if the HEAD branch is not target for GNOME-2-16, I'll change jhbuild modulestes to use stable branch.


In file included from Accessibility-common.c:9,
                 from Accessibility-imodule.c:8:
Accessibility.h:5534: error: static declaration of 'Bonobo_Stream__iinterface' follows non-static declaration
/opt/gnome2/include/libbonobo-2.0/bonobo/Bonobo.h:5385: error: previous declaration of 'Bonobo_Stream__iinterface' was here
Accessibility.h:5541: error: static declaration of 'Bonobo_Stream__imethods' follows non-static declaration
/opt/gnome2/include/libbonobo-2.0/bonobo/Bonobo.h:5392: error: previous declaration of 'Bonobo_Stream__imethods' was here
Accessibility.h:5547: error: static declaration of 'Bonobo_Storage__iinterface' follows non-static declaration
/opt/gnome2/include/libbonobo-2.0/bonobo/Bonobo.h:5398: error: previous declaration of 'Bonobo_Storage__iinterface' was here
Accessibility.h:5554: error: static declaration of 'Bonobo_Storage__imethods' follows non-static declaration
/opt/gnome2/include/libbonobo-2.0/bonobo/Bonobo.h:5405: error: previous declaration of 'Bonobo_Storage__imethods' was here
make[3]: *** [Accessibility-imodule.lo] Error 1
make[3]: Leaving directory `/home/luca/cvs/gnome2/at-spi/libspi'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/luca/cvs/gnome2/at-spi/libspi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/cvs/gnome2/at-spi'
make: *** [all] Error 2
Comment 13 bill.haneman 2006-07-21 12:45:48 UTC
OK, guys - I CANNOT reproduce this error (comment#8).  This makes it difficult for me to fix.

I suspect it may have been introduced by the fix for bug 313122
http://bugzilla.gnome.org/show_bug.cgi?id=313122

If you could try reverting that patch and see if it solves your problem I would appreciate it.  If it does, I'll just reopen that bug and back out the patch.

I don't expect to do another 2.14 release of at-spi, BTW.  All effort is going into HEAD/2.15/2.16 ATM.

Bill

Comment 14 bill.haneman 2006-07-21 12:49:00 UTC
[Note also that the files generating the errors are autogenerated files, so the root cause of the problem is elsewhere.]
Comment 15 Luca Ferretti 2006-07-21 13:19:30 UTC
Reverted patch from bug #313122 (id=69179) and now I'm able to compile at-spi HEAD in my jhbuild sandbox :-|

Could it be related on recent bonobo/gnome-vfs changes?
Comment 16 Loïc Minier 2006-07-21 13:27:30 UTC
Same here, reverting the patch fixed the problem, re-adding it re-introduced it.

(<http://bugzilla.gnome.org/attachment.cgi?id=69179>, "patch to avoid duplicate linking, see comment #14")
Comment 17 bill.haneman 2006-08-22 15:56:57 UTC
Old patched have been applied to the 2.14 branch.

Note that there aren't any new gnome 2.14 releases scheduled.  In order to make a new 2.14 release of at-spi, we'd need to create a micro release, i.e.

1.7.6.1
Comment 18 Loïc Minier 2006-08-23 10:35:01 UTC
(We're at 1.7.10 in Debian already.)