gtkmm : cannot compile

Hi!

I am building all the dependencies, and everything is fine until gtkmm-2.24.2 that cannot be compile.

root@main:/home/mrbark/src/ardour/gtkmm-2.24.2# ./configure --prefix=/usr/local/gtkmm-2.24.2
root@main:/home/mrbark/src/ardour/gtkmm-2.24.2# make -j 8
make all-recursive
make[1]: Entering directory /home/mrbark/src/ardour/gtkmm-2.24.2' Making all in tools make[2]: Entering directory/home/mrbark/src/ardour/gtkmm-2.24.2/tools’
depbase=echo extra_defs_gen/generate_defs_gtk.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';
g++ -DHAVE_CONFIG_H -I… -pthread -pthread -I/usr/local/atkmm-2.22.6/include/atkmm-1.6 -I/usr/include/atk-1.0 -I/usr/local/glibmm-2.32.0/include/glibmm-2.4 -I/usr/local/glibmm-2.32.0/lib/glibmm-2.4/include -I/usr/local/glib-2.40.2/include/glib-2.0 -I/usr/local/glib-2.40.2/lib/glib-2.0/include -I/usr/local/libsigc+±2.2.10/include/sigc+±2.0 -I/usr/local/libsigc+±2.2.10/lib/sigc+±2.0/include -I/usr/local/glibmm-2.32.0/include/giomm-2.4 -I/usr/local/glibmm-2.32.0/lib/giomm-2.4/include -I/usr/local/pangomm-2.28.4/include/pangomm-1.4 -I/usr/local/pangomm-2.28.4/lib/pangomm-1.4/include -I/usr/local/cairomm-1.10.0/include/cairomm-1.0 -I/usr/local/cairomm-1.10.0/lib/cairomm-1.0/include -I/usr/include/pango-1.0 -I/usr/local/cairo-1.12.14/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/gtk-unix-print-2.0 -Wall -g -O2 -MT extra_defs_gen/generate_defs_gtk.o -MD -MP -MF $depbase.Tpo -c -o extra_defs_gen/generate_defs_gtk.o extra_defs_gen/generate_defs_gtk.cc &&
mv -f $depbase.Tpo $depbase.Po
/bin/sh …/libtool --tag=CXX --mode=link g++ -Wall -g -O2 -no-undefined -avoid-version -o extra_defs_gen/generate_extra_defs extra_defs_gen/generate_defs_gtk.o -L/usr/local/atkmm-2.22.6/lib -L/usr/local/glibmm-2.32.0/lib -L/usr/local/glib-2.40.2/lib -L/usr/local/libsigc+±2.2.10/lib -L/usr/local/pangomm-2.28.4/lib -L/usr/local/cairomm-1.10.0/lib -L/usr/local/cairo-1.12.14/lib -latkmm-1.6 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lglibmm_generate_extra_defs-2.4
libtool: link: g++ -Wall -g -O2 -o extra_defs_gen/generate_extra_defs extra_defs_gen/generate_defs_gtk.o -L/usr/local/atkmm-2.22.6/lib -L/usr/local/glibmm-2.32.0/lib -L/usr/local/glib-2.40.2/lib -L/usr/local/libsigc+±2.2.10/lib -L/usr/local/pangomm-2.28.4/lib -L/usr/local/cairomm-1.10.0/lib -L/usr/local/cairo-1.12.14/lib /usr/local/atkmm-2.22.6/lib/libatkmm-1.6.so /usr/local/glibmm-2.32.0/lib/libgiomm-2.4.so /usr/local/pangomm-2.28.4/lib/libpangomm-1.4.so -L/usr/lib64 /usr/local/glibmm-2.32.0/lib/libglibmm-2.4.so /usr/local/cairomm-1.10.0/lib/libcairomm-1.0.so /usr/local/gtk±2.24.18/lib/libgtk-x11-2.0.so /usr/local/gtk±2.24.18/lib/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libX11-xcb.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libharfbuzz.so -licule -licuuc -licudata /usr/lib64/…/lib64/libstdc++.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/local/glib-2.40.2/lib/libgio-2.0.so -lresolv /usr/local/cairo-1.12.14/lib/libcairo.so /usr/lib64/libpixman-1.so /usr/lib64/libxcb-shm.so /usr/lib64/libxcb-render.so /usr/lib64/libXrender.so /usr/lib64/libXext.so /usr/lib64/libX11.so /usr/lib64/libxcb.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -lrt /usr/lib64/libpango-1.0.so /usr/local/glib-2.40.2/lib/libgthread-2.0.so /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libpng14.so -lz -lbz2 /usr/lib64/libexpat.so /usr/local/glibmm-2.32.0/lib/libglibmm_generate_extra_defs-2.4.so /usr/local/libsigc+±2.2.10/lib/libsigc-2.0.so /usr/local/glib-2.40.2/lib/libgobject-2.0.so /usr/lib64/…/lib64/libffi.so /usr/local/glib-2.40.2/lib/libgmodule-2.0.so -ldl /usr/local/glib-2.40.2/lib/libglib-2.0.so -lpthread /usr/local/gcc-4.9.1/lib/…/lib64/libstdc++.so -lm -pthread -Wl,-rpath -Wl,/usr/local/atkmm-2.22.6/lib -Wl,-rpath -Wl,/usr/local/glibmm-2.32.0/lib -Wl,-rpath -Wl,/usr/local/pangomm-2.28.4/lib -Wl,-rpath -Wl,/usr/local/glib-2.40.2/lib -Wl,-rpath -Wl,/usr/local/cairomm-1.10.0/lib -Wl,-rpath -Wl,/usr/local/gtk±2.24.18/lib -Wl,-rpath -Wl,/usr/local/cairo-1.12.14/lib -Wl,-rpath -Wl,/usr/lib64/…/lib64 -Wl,-rpath -Wl,/usr/local/libsigc+±2.2.10/lib -Wl,-rpath -Wl,/usr/local/gcc-4.9.1/lib/…/lib64 -Wl,-rpath -Wl,/usr/local/atkmm-2.22.6/lib -Wl,-rpath -Wl,/usr/local/glibmm-2.32.0/lib -Wl,-rpath -Wl,/usr/local/pangomm-2.28.4/lib -Wl,-rpath -Wl,/usr/local/glib-2.40.2/lib -Wl,-rpath -Wl,/usr/local/cairomm-1.10.0/lib -Wl,-rpath -Wl,/usr/local/gtk±2.24.18/lib -Wl,-rpath -Wl,/usr/local/cairo-1.12.14/lib -Wl,-rpath -Wl,/usr/lib64/…/lib64 -Wl,-rpath -Wl,/usr/local/libsigc+±2.2.10/lib -Wl,-rpath -Wl,/usr/local/gcc-4.9.1/lib/…/lib64
/usr/local/glibmm-2.32.0/lib/libglibmm-2.4.so: undefined reference to std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'</b> collect2: error: ld returned 1 exit status make[2]: *** [extra_defs_gen/generate_extra_defs] Error 1 make[2]: Leaving directory/home/mrbark/src/ardour/gtkmm-2.24.2/tools’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mrbark/src/ardour/gtkmm-2.24.2’
make: *** [all] Error 2

This is a slackware64 14.1 multilib with a 3.14.12 custom preempt kernel.

# uname -a Linux main 3.14.12-preempt #2 SMP PREEMPT Fri Sep 26 22:30:45 PDT 2014 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux

echo $PKG_CONFIG_PATH

/usr/lib64/pkgconfig

echo $PKG_CONFIG

/usr/bin/pkg-config

I just cannot find that error anywhere on the net…
Thank you for the help!
Best.

The most common cause I see online for this is building with gcc 4.9 when the supporting libs are built with an earlier version of gcc. Not sure that is the case in your instance, but makes me suspicious, especially given that you are using slackware.

    Seablade

Thank you seablade for the reply.
Although I was using gcc-4.9.1, I downgraded to 4.8.2 and the same error remains :frowning:

But now my whole system is full of things that have been compiled with gcc 4.9.1, do you think it matters?

Ok I answer to my own question:
Yes it DOES matter!

As we can see above, the error was caused by libglibmm-2.4.so, and I compiled glibmm-2.32.0 with gcc-4.9.1.
I just recompiled it with gcc-4.8.2 and now gtkmm-2.24.2 compiles!

Conclusion: compile everything with gcc-4.8 to avoid troubles, not just the library you have trouble with, but also the one(s) it depends on.