package fails to build with glibc-2.26

Bug #1730947 reported by Matthias Klose
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cairo-Dock Plug-ins
New
Undecided
Unassigned
cairo-dock-plug-ins (Gentoo Linux)
New
Undecided
Unassigned
cairo-dock-plug-ins (Ubuntu)
Confirmed
High
Unassigned

Bug Description

that might be an alsa-lib bug instead ...

cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/alsaMixer/src && /usr/bin/cc -DCAIRO_DOCK_FORCE_ICON_IN_MENUS=1 -DGL_GLEXT_PROTOTYPES=\"1\" -DINDICATOR_SOUNDMENU_WITH_IND3=1 -DIS_INDICATOR_NG=1 -DMY_APPLET_CONF_FILE=\"AlsaMixer.conf\" -DMY_APPLET_DOCK_VERSION=\"3.4.1\" -DMY_APPLET_GETTEXT_DOMAIN=\"cairo-dock-plugins\" -DMY_APPLET_ICON_FILE=\"icon.png\" -DMY_APPLET_PREVIEW_FILE=\"preview.jpg\" -DMY_APPLET_SHARE_DATA_DIR=\"/usr/share/cairo-dock/plug-ins/AlsaMixer\" -DMY_APPLET_USER_DATA_DIR=\"AlsaMixer\" -DMY_APPLET_VERSION=\"2.1.5\" -Dcd_AlsaMixer_EXPORTS -I/usr/include/cairo-dock -I/usr/include/cairo-dock/gldit -I/usr/include/cairo-dock/implementations -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/mirclient -I/usr/include/mircore -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libdrm -I/usr/include/x86_64-linux-gnu -I/usr/include/alsa -I/usr/include/libindicator3-0.4 -I/<<PKGBUILDDIR>>/Indicator-applet3 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -std=c99 -Wall -Werror-implicit-function-declaration -o CMakeFiles/cd-AlsaMixer.dir/applet-init.c.o -c /<<PKGBUILDDIR>>/alsaMixer/src/applet-init.c
In file included from /usr/include/sched.h:32:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/glib-2.0/glib/deprecated/gthread.h:128,
                 from /usr/include/glib-2.0/glib.h:108,
                 from /usr/include/cairo-dock/gldit/cairo-dock-struct.h:23,
                 from /usr/include/cairo-dock/cairo-dock.h:29,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-struct.h:26,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-init.c:20:
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h:8:8: error: redefinition of ‘struct timespec’
 struct timespec
        ^~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:49:0,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-struct.h:24,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-init.c:20:
/usr/include/alsa/global.h:143:8: note: originally defined here
 struct timespec {
        ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/time.h:25:0,
                 from /usr/include/cairo-dock/gldit/cairo-dock-image-buffer.h:25,
                 from /usr/include/cairo-dock/gldit/cairo-dock-icon-factory.h:26,
                 from /usr/include/cairo-dock/gldit/cairo-dock-file-manager.h:23,
                 from /usr/include/cairo-dock/gldit/cairo-dock-global-variables.h:24,
                 from /usr/include/cairo-dock/cairo-dock.h:31,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-struct.h:26,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-init.c:20:
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:8:8: error: redefinition of ‘struct timeval’
 struct timeval
        ^~~~~~~
In file included from /usr/include/alsa/asoundlib.h:49:0,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-struct.h:24,
                 from /<<PKGBUILDDIR>>/alsaMixer/src/applet-init.c:20:
/usr/include/alsa/global.h:138:8: note: originally defined here
 struct timeval {
        ^~~~~~~

Tags: ftbfs
Matthias Klose (doko)
tags: added: ftbfs
Changed in cairo-dock-plug-ins (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Adam Conrad (adconrad) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

doesn't work, the build then fails with

In file included from /usr/include/alsa/asoundlib.h:56:0,
                 from /home/ubuntu/libscan/failed-cairo-dock-plug-ins/cairo-dock-plug-ins-3.4.1/alsaMixer/src/applet-struct.h:24,
                 from /home/ubuntu/libscan/failed-cairo-dock-plug-ins/cairo-dock-plug-ins-3.4.1/alsaMixer/src/applet-init.c:20:
/usr/include/alsa/timer.h:108:19: error: field 'tstamp' has incomplete type
  snd_htimestamp_t tstamp; /**< Time stamp of each event */
                   ^~~~~~
alsaMixer/src/CMakeFiles/cd-AlsaMixer.dir/build.make:65: recipe for target 'alsaMixer/src/CMakeFiles/cd-AlsaMixer.dir/applet-init.c.o' failed
make[3]: *** [alsaMixer/src/CMakeFiles/cd-AlsaMixer.dir/applet-init.c.o] Error 1

Revision history for this message
Stuart Longland (redhatter) wrote :

I hit the same bug on Gentoo with glibc-2.29-r2 and alsa-lib-1.1.8.

Looking at the code, I see they do something similar to the suggestion made in https://stackoverflow.com/a/32672476.

It would appear this kludge no longer works. Down later the suggestion was to tweak the -std=XXX flag passed to gcc. After unsuccessfully trying to set this in CFLAGS, I got things compiling with this:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 639fdc711..2d1c744f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ include ("${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/GNUInstallDirs.cmake")
 project ("cairo-dock-plugins")
 set (VERSION "3.4.1")

-add_definitions (-std=c99 -Wall -Werror-implicit-function-declaration) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds)
+add_definitions (-std=gnu99 -Wall -Werror-implicit-function-declaration) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds)
 if (NOT DEFINED CMAKE_BUILD_TYPE)
        add_definitions (-O3)
 endif()

cairo-dock-plug-ins now build. I'm just trying them out to see if there are any ill effects from doing the above hack.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.