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 645711 - patchdetect: link error while using gcc-4.52
patchdetect: link error while using gcc-4.52
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-26 05:21 UTC by brofkims
Modified: 2011-03-26 12:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description brofkims 2011-03-26 05:21:39 UTC
1. On 64-bit Ubuntu 11.04 beta(gcc-4.52-7ubuntu1, 2.21.0.20110322-1ubuntu1), I failed to build gst-plugins-bad-0.10.32.1+git20110325 due to 'undefined reference to rint' in function `gst_patchdetect_transform_ip' while compiling .libs/libgstpatchdetect_la-gstpatchdetect.o.

Error log follows at the end of this report.


2. With following patch, I could link it and build gst-plugins-bad-0.10.21.1 package.
'rint' is part of libm.

-------- a/gst/patchdetect/Makefile.am.orig  2011-03-25 15:14:40.000000000 +0900
+++ b/gst/patchdetect/Makefile.am       2011-03-25 15:15:11.000000000 +0900
@@ -13,7 +13,7 @@
        $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
        $(GST_BASE_LIBS) \
        $(GST_LIBS) \
-       $(ORC_LIBS)
+       $(ORC_LIBS) $(LIBM)
 libgstpatchdetect_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstpatchdetect_la_LIBTOOLFLAGS = --tag=disable-static


3. Error messages:

....
libtool: link: echo "{ global:" > .libs/libgstpatchdetect.ver
libtool: link:  cat .libs/libgstpatchdetect.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libgstpatchdetect.ver
libtool: link:  echo "local: *; };" >> .libs/libgstpatchdetect.ver
libtool: link:  gcc -shared  .libs/libgstpatchdetect_la-gstpatchdetect.o   -L/usr/lib/x86_64-linux-gnu -lgstvideo-0.10 /usr/lib/libgstbase-0.10.so /usr/lib/libgstreamer-0.10.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so /usr/lib/libxml2.so /usr/lib/x86_64-linux-gnu/libgthread-2.0.so -lrt /usr/lib/x86_64-linux-gnu/libglib-2.0.so -lorc-0.4  -pthread -pthread -Wl,-Bsymbolic-functions -Wl,-z -Wl,defs -Wl,-O1 -Wl,--as-needed -pthread -pthread -pthread   -pthread -Wl,-soname -Wl,libgstpatchdetect.so -Wl,-version-script -Wl,.libs/libgstpatchdetect.ver -o .libs/libgstpatchdetect.so
.libs/libgstpatchdetect_la-gstpatchdetect.o: In function `gst_patchdetect_transform_ip':
/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1175: undefined reference to `rint'
/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1176: undefined reference to `rint'
/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1177: undefined reference to `rint'
/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1207: undefined reference to `rint'
/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1208: undefined reference to `rint'
.libs/libgstpatchdetect_la-gstpatchdetect.o:/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect/gstpatchdetect.c:1209: more undefined references to `rint' follow
collect2: ld returned 1 exit status
make[4]: *** [libgstpatchdetect.la] error 1
make[4]: Leaving directory `/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst/patchdetect'
make[3]: *** [patchdetect] error 2
make[3]: Leaving directory `/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324/gst'
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory `/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324'
make[1]: *** [all] error 2
make[1]: Leaving directory `/home/brofkims/build/gst-plugins-bad0.10-0.10.21.1+git20110324'
make: *** [debian/stamp-makefile-build] error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Comment 1 Tim-Philipp Müller 2011-03-26 12:47:19 UTC
Fixed, thanks:

 commit 9bd9b8bf7280cc6656700ad6f61cd1ed07c3b007
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Sat Mar 26 12:45:24 2011 +0000

    patchdetect: link against libm
    
    Link against libm. Include math-compat.h header. Don't link against
    orc, since it's not actually used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=645711