alehouse / cantata

Automatically exported from code.google.com/p/cantata
GNU General Public License v3.0
1 stars 0 forks source link

Build Failure With SpeexDSP>=1.2rc2 #627

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of Cantata?
r5668

Which build? KDE, Qt4, Qt5, Windows, Ubuntu, Mac?
KDE and Qt5

When the speex devs split the speex codec library and the speex DSP library 
into separate source trees starting with v1.2rc2 they made the following 
changes to /usr/include/speex/speex_config_types.h:

#ifndef __SPEEX_TYPES_H__                    #ifndef __SPEEX_TYPES_H__
#define __SPEEX_TYPES_H__                    #define __SPEEX_TYPES_H__

/* these are filled in by configure */       | #include <stdint.h>
typedef short spx_int16_t;                   |
typedef unsigned short spx_uint16_t;         | typedef int16_t spx_int16_t;
typedef int spx_int32_t;                     | typedef uint16_t spx_uint16_t;
typedef unsigned int spx_uint32_t;           | typedef int32_t spx_int32_t;
                                             > typedef uint32_t spx_uint32_t;

#endif                                       #endif

This now results in a build failure when trying to build with speexdsp-1.2rc2 
or higher:

In file included from /usr/include/speex/speexdsp_types.h:122:0,
                 from /usr/include/speex/speex_resampler.h:87,
                 from /home/user/Projects/cantata-kde-svn/src/cantata-kde-svn/3rdparty/ebur128/ebur128.c:34:
/usr/include/speex/speexdsp_config_types.h:13:9: error: unknown type name 
‘uint16_t’
 typedef uint16_t spx_uint16_t;
         ^
/usr/include/speex/speexdsp_config_types.h:15:9: error: unknown type name 
‘uint32_t’
 typedef uint32_t spx_uint32_t;
         ^
Scanning dependencies of target qtiocompressor
/home/user/cantata-kde-svn/src/cantata-kde-svn/3rdparty/ebur128/ebur128.c: In 
function ‘ebur128_check_true_peak’:
/home/user/cantata-kde-svn/src/cantata-kde-svn/3rdparty/ebur128/ebur128.c:395:19
: warning: comparison between signed and unsigned integer expressions 
[-Wsign-compare]
     for (i = 0; i < out_len; ++i) {
                   ^
3rdparty/ebur128/CMakeFiles/ebur128.dir/build.make:54: recipe for target 
'3rdparty/ebur128/CMakeFiles/ebur128.dir/ebur128.o' failed
make[2]: *** [3rdparty/ebur128/CMakeFiles/ebur128.dir/ebur128.o] Error 1
CMakeFiles/Makefile2:305: recipe for target 
'3rdparty/ebur128/CMakeFiles/ebur128.dir/all' failed
make[1]: *** [3rdparty/ebur128/CMakeFiles/ebur128.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Original issue reported on code.google.com by hbdee.a...@gmail.com on 15 Feb 2015 at 3:17

GoogleCodeExporter commented 9 years ago
Build log cant be from r5668 - as the warning about signed/unsigned is fixed in 
that revision.

The actual errors, however, appear to be *within* speex itself. 
/usr/include/speex/speexdsp_config_types.h is a speex file - and that is where 
the error lies. Not sure what you expect Cantata to do. I'm guessing speex 
needs to include stdint.h. If you edit 3rdparty/ebur128/ebur128.c and add:

#include <stdint.h>

just before "#include <speex/speex_resampler.h>" - does this work-around the 
issue? If so, its still a speex issue - its headers should include any other 
headers they require.

Original comment by craig.p....@gmail.com on 15 Feb 2015 at 3:29

GoogleCodeExporter commented 9 years ago
Actually, looking at your original post it appears as if 
speexdsp_config_types.h does include stdint.h So, this is very odd. Therefore, 
my 'fix' above will probably not work - worth a try.

Does your stdint.h have a typedef line for uint16_t ??

Original comment by craig.p....@gmail.com on 15 Feb 2015 at 4:18

GoogleCodeExporter commented 9 years ago
Your fix actually worked. stdint.h does have a typedef line for uint16_t: 
typedef uint16_t spx_uint16_t;

Original comment by hbdee.a...@gmail.com on 16 Feb 2015 at 2:21

GoogleCodeExporter commented 9 years ago
Fixed in trunk and branches/1.5 - thanks for the confirmation. Still, the issue 
is with speex

Original comment by craig.p....@gmail.com on 17 Feb 2015 at 8:06

GoogleCodeExporter commented 9 years ago
I had the same error with alsa project and fixed it by adding '-DHAVE_STDINT_H' 
to CFLAGS.

IMHO this issue should be reported to speex mailist. It should be really 
resolved on their side.

Original comment by ana...@google.com on 4 Mar 2015 at 5:16