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 609918 - [OS X] configure: cdda_interface.h: present but cannot be compiled (if VERSION is defined)
[OS X] configure: cdda_interface.h: present but cannot be compiled (if VERSIO...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.26
Other Mac OS
: Normal major
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-14 15:07 UTC by paf01361
Modified: 2011-06-15 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
conftest.c that fails (2.82 KB, text/plain)
2010-02-15 21:52 UTC, Daniel Macks
  Details
cdparanoiasrc: fix build on OSX by #undef-ing VERSION before including system headers (1.99 KB, patch)
2010-05-30 12:44 UTC, Tim-Philipp Müller
committed Details | Review

Description paf01361 2010-02-14 15:07:23 UTC
configure: WARNING: cdda_interface.h: present but cannot be compiled
configure: WARNING: cdda_interface.h:     check for missing prerequisite headers?
configure: WARNING: cdda_interface.h: see the Autoconf documentation
configure: WARNING: cdda_interface.h:     section "Present But Cannot Be Compiled"
configure: WARNING: cdda_interface.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------------------------------ ##
configure: WARNING:     ## Report this to bugzilla.gnome.org—enter_bug.cgi <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer> ##
configure: WARNING:     ## ------------------------------------------------------------------------ ##




===========configure detail =======
bzip2 -dc /sw/src/gst-plugins-base-0.10.26.tar.bz2 | /sw/bin/tar -xf -  --no-same-owner --no-same-permissions 
[ -r /sw/fink/dists/unstable/main/finkinfo/gnome/gst-plugins-base-0.10.patch ]
sed -e 's,@GSTVERSION@,0.10.26,' /sw/fink/dists/unstable/main/finkinfo/gnome/gst-plugins-base-0.10.patch | patch -p1
patching file ext/cdparanoia/gstcdparanoiasrc.c
perl -pi -e 's,osxvideosink,sdlvideosink,g;' configure
/var/tmp/tmp.33.gzeZF0
+ export ac_cv_path_PYTHON=/sw/bin/python2.5
+ ac_cv_path_PYTHON=/sw/bin/python2.5
+ export PATH=/sw/lib/xmkmf/bin:/sw/var/lib/fink/path-prefix-g++-4.0:/sw/bin:/sw/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin
+ PATH=/sw/lib/xmkmf/bin:/sw/var/lib/fink/path-prefix-g++-4.0:/sw/bin:/sw/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin
+ ./configure --prefix=/sw --without-check --libexecdir=/sw/lib/gst-plugins-base-0.10 --mandir=/sw/share/man --enable-gtk-doc --disable-libvisual --disable-static --disable-dependency-tracking --enable-tests --enable-failing-tests PKG_CONFIG_PATH=/sw/lib/fontconfig2/lib/pkgconfig:/sw/lib/freetype219/lib/pkgconfig:/sw/lib/pango-ft219/lib/pkgconfig: FREETYPE_CONFIG=/sw/lib/freetype219/bin/freetype-config --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
configure: WARNING: unrecognized options: --without-check, --enable-tests, --enable-failing-tests
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking nano version... 0 (release)
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... powerpc-apple-darwin8.11.0
checking host system type... powerpc-apple-darwin8.11.0
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld
checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... otool64
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.11.0 dyld
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether NLS is requested... yes
checking for msgfmt... /sw/bin/msgfmt
checking for gmsgfmt... /sw/bin/msgfmt
checking for xgettext... /sw/bin/xgettext
checking for msgmerge... /sw/bin/msgmerge
checking for ld used by GCC... /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld
checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld) is GNU ld... no
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... yes
checking for CFLocaleCopyCurrent... yes
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -L/sw/lib -liconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -L/sw/lib -lintl -Wl,-framework -Wl,CoreFoundation
checking for pkg-config... /sw/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for VALGRIND... no
no
configure: Using GStreamer Base Plug-ins source release as package name
configure: Using Unknown package origin as package origin
configure: Using /sw/lib/gst-plugins-base-0.10/gst-install-plugins-helper as plugin install helper

configure: *** checking feature: building of plug-ins with external deps ***
configure: building external plug-ins

configure: *** checking feature: building of experimental plug-ins ***
configure: not building experimental plug-ins
checking whether byte ordering is bigendian... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking whether gcc and cc understand -c and -o together... yes
checking for valgrind... no
checking for gobject-introspection... no
checking whether to build gtk-doc documentation... yes
checking for gtkdoc-check... /sw/bin/gtkdoc-check
configure: Looking for Python version >= 2.1
checking for python... (cached) /sw/bin/python2.5
checking "/sw/bin/python2.5":... okay
checking local Python configuration... looks good
checking whether to build plugin documentation... yes
checking for ANSI C header files... (cached) yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking for hstrerror... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking for sys/types.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for sys/stat.h... (cached) yes
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in _stdint.h (assuming C99 compatible system)
checking for localtime_r... yes
checking for gmtime_r... yes
checking for cbrt... yes
checking for FIONREAD in sys/ioctl.h... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for lrint... yes
checking for lrintf... yes
checking whether gcc implements __PRETTY_FUNCTION__... yes
checking whether gcc implements __FUNCTION__... yes
checking whether gcc implements __func__... yes
checking for socket... yes
checking for gethostbyname... yes
checking for GLIB... yes
checking for LIBOIL... yes
checking for GST... yes
configure: using GStreamer tools in /sw/bin
configure: using GStreamer plug-ins in /sw/lib/gstreamer-0.10
checking for GST_BASE... yes
checking for GST_GDP... yes
checking for GST_CONTROLLER... yes
checking for GST_CHECK... yes
checking for GTK... yes
checking for GTK_X11... yes
configure: Using /sw/lib/gstreamer-0.10 as the plugin install location
checking to see if compiler understands -Wall... yes
checking to see if compiler understands -Wdeclaration-after-statement... yes
checking to see if compiler understands -Wvla... no
checking to see if compiler understands -Wpointer-arith... yes
configure: set ERROR_CFLAGS to -Wall -Wdeclaration-after-statement -Wpointer-arith
configure: Using autoaudiosink as default audio sink
configure: Using osxaudiosrc as default audio source
configure: Using autovideosink as default video sink
configure: Using v4l2src as default video source
configure: Using goom as default visualizer
checking which audio resample format to use for integer... auto
checking whether to use iso-codes if they are available... yes
checking whether iso-codes are available on this system... no

configure: Checking libraries for plugins in sys/

checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include

configure: *** checking feature: X libraries and plugins ***
configure: *** for plug-ins: ximagesink ***
checking whether -R must be followed by a space... neither works
checking for gethostbyname... (cached) yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking X11/Xlib.h usability... yes
checking X11/Xlib.h presence... yes
checking for X11/Xlib.h... yes
configure: *** These plugins will be built: ximagesink

configure: *** checking feature: X11 XVideo extensions ***
configure: *** for plug-ins: xvimagesink ***
checking for XvQueryExtension in -lXv_pic... no
checking for XvQueryExtension in -lXv... yes
configure: *** These plugins will be built: xvimagesink

configure: *** checking feature: X Shared Memory extension ***
checking for XShmAttach in -lXext... yes

configure: *** checking feature: Video 4 Linux ***
configure: *** for plug-ins: video4linux ***
checking whether VID_TYPE_MPEG_ENCODER is declared... no
configure: *** These plugins will not be built: video4linux

configure: Checking libraries for plugins in ext/


configure: *** checking feature: ALSA ***
configure: *** for plug-ins: alsa ***
checking for ALSA... no
checking for ALSA CFLAGS... 
checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.1... not present.
configure: *** These plugins will not be built: alsa

configure: *** checking feature: CDParanoia ***
configure: *** for plug-ins: cdparanoia ***
checking for cdda_open in -lcdda_interface... yes
checking cdda_interface.h usability... no
checking cdda_interface.h presence... yes
configure: WARNING: cdda_interface.h: present but cannot be compiled
configure: WARNING: cdda_interface.h:     check for missing prerequisite headers?
configure: WARNING: cdda_interface.h: see the Autoconf documentation
configure: WARNING: cdda_interface.h:     section "Present But Cannot Be Compiled"
configure: WARNING: cdda_interface.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------------------------------ ##
configure: WARNING:     ## Report this to bugzilla.gnome.org—enter_bug.cgi <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer> ##
configure: WARNING:     ## ------------------------------------------------------------------------ ##
Comment 1 Sebastian Dröge (slomo) 2010-02-14 15:40:14 UTC
Please attach the generated config.log file to this bugreport
Comment 2 Daniel Macks 2010-02-15 21:43:02 UTC
I get the same thing on my OS X 10.4/ppc machine. Here's the relevant config.log excerpt (this is a fink-driven build, as is submitter's)

configure:22040: checking cdda_interface.h usability
configure:22040: gcc -c -Os -funroll-loops -fstrict-aliasing -fno-common -fno-common -I/sw/lib/freetype219/include/freetype2 -I/sw/lib/freetype219/include -I/sw/include/libcdparanoia -I/sw/include conftest.c >&5
In file included from /System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSITaskLib.h:29,
                 from /sw/include/libcdparanoia/cdda_interface.h:25,
                 from conftest.c:102:
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:70: error: parse error before string constant
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:80: error: parse error before '}' token
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:81: error: parse error before '*' token
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:91: error: parse error before string constant
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:109: error: parse error before '}' token
In file included from /sw/include/libcdparanoia/cdda_interface.h:25,
                 from conftest.c:102:
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSITaskLib.h:585: error: parse error before 'SCSICmd_INQUIRY_StandardData'
configure:22040: $? = 1
configure: failed program was:
[...]
| #include <cdda_interface.h>



So it looks like the IOKit framework headers are using a type or token without #including the file that declares it. I'm not sure if it is documented that some other header must also be #included (either for cdda or IOKit), or if it's more simply a bug in IOKit headers. Regardless, it's *also* a weakness in fink's cdparanoia/cdda package, not compensating for standard usability...I'll alert its maintainer for input there.
Comment 3 Daniel Macks 2010-02-15 21:52:53 UTC
Created attachment 153870 [details]
conftest.c that fails

Okay, it's actually weirder. *Just*:

> #include <cdda_interface.h>

builds fine using that same compiler call. So it's something in the autoconf stuff earlier in the test program that is breaking cdda's headers somehow. Attached is the whole conftest.c of that "failed program" from config.log.
Comment 4 Daniel Macks 2010-02-15 22:11:16 UTC
> #define VERSION "0.10.26"
> #include <cdda_interface.h>

is the reproducible failure here. In particular it fails iff VERSION is defined in a way that is not a simple string. Here's why: /System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h defines some structs that have an element named VERSION. Yikes! So the bug is really triggered by (and can only be solved within) gst, by avoiding using that apparently non-safe AC variable because cdda uses an OS X system header that uses that for another meaning.
Comment 5 Tim-Philipp Müller 2010-04-13 00:49:15 UTC
Hilarious :) Marking as NEW since we know what the problem is now.
Comment 6 David Schleef 2010-04-13 17:52:03 UTC
Does a simple "#undef VERSION" fix the problem?
Comment 7 Tim-Philipp Müller 2010-05-30 12:44:50 UTC
Created attachment 162315 [details] [review]
cdparanoiasrc: fix build on OSX by #undef-ing VERSION before including system headers

Bug reporter: ping? (re. Dave's question whether an #undef VERSION is enough?)

Hacking around this in the plugin itself seems easy enough, but I'm not really sure how to best do this in configure.ac.
Comment 8 Daniel Macks 2010-06-02 21:57:02 UTC
I can override the configure test with ac_cv_header_cdda_interface_h=yes but a later cdparanoia test fails

checking for paranoia_cachemodel_size in -lcdda_paranoia... no
configure: *** These plugins will not be built: cdparanoia

so I can't get as far as knowing if the source patch in Comment #7 is workable. My libcdda_paranoia must be too old? I checked its public interface and indeed it does not have that symbol defined in the shared lib or headers.
Comment 9 Tim-Philipp Müller 2010-06-11 23:12:28 UTC
This can be solved properly after the next cdparanoia release, which will contain a pkg-config file for cdparanoia. I've added the checks to configure.ac in git already:

 commit dab38bb8a05262d52f8abbb9848a913763f9579c
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Fri Jun 11 22:16:26 2010 +0100

    cdparanoia: check for cdparanoia with pkg-config first
    
    cdparanoia now has a .pc file in post-0.10.2 SVN, so use
    that to check for cdparanoia before we try all the other
    checks. Besides being generally nicer, this may help with
    correctly detecting cdparanoia on OSX some day (see #609918).

so in order to try the patch above you could drop a file cdparanoia-3.pc into $prefix/lib/pkgconfig that looks like this:

---snip-------------------------------------------
prefix=/usr/local 
exec_prefix=${prefix} 
libdir=${exec_prefix}/lib 
includedir=${prefix}/include 

Name: Cdparanoia III 
Description: Compact Disc Digital Audio (CDDA) Digital Audio Extraction (DAE) library 
Requires: 
Version: 10.2
Libs: -L${libdir} -lcdda_interface -lcdda_paranoia 
Cflags: -I${includedir} 
---snip-------------------------------------------

You might need to adjust the path in prefix to match yours.
Comment 10 Tim-Philipp Müller 2010-06-25 12:01:21 UTC
Hrm, so from the looks of it this is not even with the official cdparanoia, but some third-party port to OSX (http://www.buserror.net/cdparanoia/ presumably). I would consider this a bug in the port's library headers really. I don't think there's any need to include those IOKit system headers in the public cdda_interface.h header and to put all these platform-specific things into the public cdrom_drive structure. The struct has a cdda_private_data_t *private_data member for a reason, but the porter just removed that.

Unfortunately it looks like the port isn't worked on any longer, so I guess we'll have to hack around it *sigh*.
Comment 11 Sebastian Dröge (slomo) 2011-05-09 09:29:15 UTC
Comment on attachment 162315 [details] [review]
cdparanoiasrc: fix build on OSX by #undef-ing VERSION before including system headers

Right, so lets get this committed after freeze
Comment 12 Sebastian Dröge (slomo) 2011-05-17 07:20:37 UTC
commit 74cc9865939d97cfafeb3aad94dc1596773ef82e
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sun May 30 13:21:00 2010 +0100

    cdparanoiasrc: fix build on OSX by #undef-ing VERSION before including syste
    
    On OSX the cdparanoia headers include IOKit framework headers (in particular
    SCSICmds_INQUIRY_Definitions.h) which define a structure that has a member
    named VERSION, so we must #undef VERSION before including those for things
    to compile on OSX.
    
    Fixes #609918.