Skip to main content
Topic: Changing Opus default bitrate (Read 7078 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Changing Opus default bitrate

Reply #25
I get the dreaded error "conflicting types for 'ssize_t'". I don't have the exact error message here right now, but it seemed that in some .h it was declared as int and in some as long.

Is this a problem with the sources or my MSYS environment?

Then why don't you post the error message? GCC should have provided you with enough information.

Changing Opus default bitrate

Reply #26
(Downloaded XhmikosR's MSYS package from http://xhmikosr.1f0.de/tools/msys/)

Why?

Because it has a pre-compiled toolchain, and has been working fine for compiling x264 and x265.
Quote
Where did you get your mingw? What's your gcc version? What does
Code: [Select]
make check
tell you for opus-1.1?
MinGW is included in that package, gcc is version 4.9.2. Make check passes all items for opus-1.1.1-beta.

1) Unpack MSYS to c:\ so it's at c:\msys
2) Run pi.bat and entered path to MinGW as c:/msys/mingw

Usually it's the other way around, i.e. msys is under mingw, but it shouldn't matter since msys.bat mounts the mingw path.
That's how it is in the package, I've not changed it in any way.

5) ./configure --prefix=/c/msys; make; make install

Why the weird prefix? Do you really want to install stuff into the msys root? At least use /usr, but I'd stick with what I posted above.
Why don't you export the PKG_CONFIG_PATH if you use a nonstandard location?
If I install stuff without setting that prefix, they are installed under c:\msys\local. In the package, everything is pre-installed under the msys root. I can move things to c:\msys\local and set PKG_CONFIG_PATH to what you suggested (and test that pkg-config --list-all finds everything) but I still get the errors during make.

Quote
Then why don't you post the error message? GCC should have provided you with enough information.
Dang, I though the config.log included those.. Here's what make prints out:

$ make
make  all-recursive
make[1]: Entering directory `/c/sources/opus-tools-0.1.9'
Making all in .
make[2]: Entering directory `/c/sources/opus-tools-0.1.9'
  CC      src/opusenc-opus_header.o
In file included from C:/MSYS/local/include/ogg/os_types.h:38:0,
                from C:/MSYS/local/include/ogg/ogg.h:25,
                from src/opus_header.h:31,
                from src/opus_header.c:32:
C:/MSYS/local/include/sys/types.h:137:14: error: conflicting types for 'ssize_t'

typedef long ssize_t;
              ^
In file included from c:\msys\mingw\i686-w64-mingw32\include\crtdefs.h:10:0,
                from c:\msys\mingw\i686-w64-mingw32\include\stddef.h:7,
                from c:\msys\mingw\lib\gcc\i686-w64-mingw32\4.9.2\include\stddef.h:1,
                from C:/MSYS/local/include/ogg/ogg.h:24,
                from src/opus_header.h:31,
                from src/opus_header.c:32:
c:\msys\mingw\i686-w64-mingw32\include\_mingw.h:389:13: note: previous declaration of 'ssize_t' was here
typedef int ssize_t;
            ^
make[2]: *** [src/opusenc-opus_header.o] Error 1
make[2]: Leaving directory `/c/sources/opus-tools-0.1.9'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/sources/opus-tools-0.1.9'
make: *** [all] Error 2


Once again, thanks to everyone. I understand how frustrating it can sometimes be to guide a newbie (at work I often train new and existing users to use a rather complicated system)

Changing Opus default bitrate

Reply #27
C:/MSYS/local/include/sys/types.h:137:14: error: conflicting types for 'ssize_t'
c:\msys\mingw\i686-w64-mingw32\include\_mingw.h:389:13: note: previous declaration of 'ssize_t' was here
typedef int ssize_t;

Don't you have c:\msys\mingw\i686-w64-mingw32\include\sys\types.h ? It is the right one to be picked up when you are targeting i686-w64-mingw32. However, the compiler seems to have picked up sys/types.h from incorrect place -- maybe the one targeting msys itself , not i686-w64-mingw32.
Still, I don't understand why it is C:/MSYS/local/include and not C:/MSYS/include. Do you happen to have an idea about that? Is it a directory that you have created yourself to install packages you have built locally? Then why sys/types.h is there?

Anyway, it's about the toolset setup and something is going wrong here. A quickest fix might be to rename C:/MSYS/local to C:/MSYS/bar or something.

Changing Opus default bitrate

Reply #28
Works fine for me, even with the mingw/compiler included in that package. (I didn't notice it because mingw-get usually installs MSYS within mingw, not the other way around.)
But I'm using the latest stable versions found on the websites.
"I hear it when I see it."

Changing Opus default bitrate

Reply #29
I almost resolved the issue, I'll just need to do some double-checking and then post my results. I have some questions I need to verify first

Changing Opus default bitrate

Reply #30
I tested the operation on my Win7 laptop at work: installed the MSYS/MinGW package to C:\TEMP\MSYS and in fstab set the /mingw mount point to c:/temp/msys/mingw. The directory structure is kind of backwards like xnor mentioned, MinGW is installed under MSYS.

It seems that everything that is readily installed, is installed under the MSYS root. After installing, pkg-config --list-all will list

Code: [Select]
$ pkg-config --list-all
liblzma    liblzma - General purpose data compression library
libarchive libarchive - library that can create and read several streaming archive formats
openssl    OpenSSL - Secure Sockets Layer and cryptography libraries and tools
guile-1.8  GNU Guile - GNU's Ubiquitous Intelligent Language for Extension
libcrypto  OpenSSL-libcrypto - OpenSSL cryptography library
zlib       zlib - zlib compression library
libxml-2.0 libXML - libXML library version2.
autoopts   AutoOpts - A semi-automated generated/library option parser
minizip    minizip - Minizip zip file manipulation library
libssl     OpenSSL - Secure Sockets Layer and cryptography libraries


If I now try - without setting a specific path to pkgconfig - to simply configure, make and install, everything goes fine and items appear in the pkg-config list until the make of opustools which fails as I've posted. Is this just a "feature" of compiling it with this particular toolset or is there something wrong with the setup?


Extracting pkgconfig to the path xnor mentioned (which didn't exist in the MSYS package) and setting the environment variable, I was able to compile all the necessary libraries and executables. During make of opustools, I did get these warnings:

Code: [Select]
$ make
make  all-recursive
make[1]: Entering directory `/c/temp/sources/opus-tools-0.1.9'
Making all in .
make[2]: Entering directory `/c/temp/sources/opus-tools-0.1.9'
  CC       src/opusenc-opus_header.o
  CC       src/opusenc-opusenc.o
  CC       src/opusenc-picture.o
  CC       src/opusenc-resample.o
src/resample.c: In function 'update_filter':
src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (j=0;j<st->filt_len;j++)
                    ^
src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<st->magic_samples[i];j++)
                       ^
src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<olen-1;j++)
                       ^
src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (;j<st->filt_len-1;j++)
                    ^
src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
                       ^
src/resample.c: In function 'opustools_resampler_process_float':
src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            for(j=0;j<ichunk;++j)
                     ^
src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(j=0;j<ichunk;++j)
                    ^
src/resample.c: In function 'opustools_resampler_process_int':
src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(j=0;j<ichunk;++j)
                   ^
src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(j=0;j<ichunk;++j)
                   ^
src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (j=0;j<ochunk+omagic;++j)
                ^
  CC       src/opusenc-audio-in.o
  CC       src/opusenc-diag_range.o
  CC       src/opusenc-flac.o
  CC       src/opusenc-lpc.o
  CC       win32/opusenc-unicode_support.o
  CCLD     opusenc.exe
  CC       src/opusdec-opus_header.o
  CC       src/opusdec-wav_io.o
  CC       src/opusdec-wave_out.o
  CC       src/opusdec-opusdec.o
src/opusdec.c: In function 'main':
src/opusdec.c:891:20: warning: 'opus_serialno' may be used uninitialized in this
function [-Wmaybe-uninitialized]
                    fprintf(stderr,"\nError: Apparent chaining without changing
serial number (%" I64FORMAT "==%" I64FORMAT ").\n",
                    ^
  CC       src/opusdec-resample.o
src/resample.c: In function 'update_filter':
src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (j=0;j<st->filt_len;j++)
                    ^
src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<st->magic_samples[i];j++)
                       ^
src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<olen-1;j++)
                       ^
src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (;j<st->filt_len-1;j++)
                    ^
src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (j=0;j<st->filt_len-1+st->magic_samples[i];j++)
                       ^
src/resample.c: In function 'opustools_resampler_process_float':
src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            for(j=0;j<ichunk;++j)
                     ^
src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(j=0;j<ichunk;++j)
                    ^
src/resample.c: In function 'opustools_resampler_process_int':
src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(j=0;j<ichunk;++j)
                   ^
src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(j=0;j<ichunk;++j)
                   ^
src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (j=0;j<ochunk+omagic;++j)
                ^
  CC       src/opusdec-diag_range.o
  CC       win32/opusdec-unicode_support.o
  CCLD     opusdec.exe
  CC       src/opusinfo-opus_header.o
  CC       src/opusinfo-opusinfo.o
  CC       src/opusinfo-info_opus.o
  CC       src/opusinfo-picture.o
  CC       win32/opusinfo-unicode_support.o
  CCLD     opusinfo.exe
  CC       src/opusrtp.o
  CCLD     opusrtp.exe
make[2]: Leaving directory `/c/temp/sources/opus-tools-0.1.9'
make[1]: Leaving directory `/c/temp/sources/opus-tools-0.1.9'
Is this anything to worry about? My sources are always 48kHz so resampling won't be applied.

The other remaining question now is, should I recompile those pre-compiled libraries to suggested location /usr/local or can I copy them under /usr/local and edit the paths in .pc files accordingly?

Changing Opus default bitrate

Reply #31
The warnings can be ignored.
As for libraries, I don't think you need any of those. opus-tools requires opus and ogg, that should be it.
"I hear it when I see it."

Changing Opus default bitrate

Reply #32
Everything's working smoothly now, except that the binary is quite a lot slower than the "official" build (10x vs 17.1x realtime). Is there something possibly missing, assembly optimizations are not available according to configure.

Changing Opus default bitrate

Reply #33
Static build, different compiler (Visual Studio), possibly some compiler optimizations enabled ...
"I hear it when I see it."

Changing Opus default bitrate

Reply #34
Everything's working smoothly now, except that the binary is quite a lot slower than the "official" build (10x vs 17.1x realtime). Is there something possibly missing, assembly optimizations are not available according to configure.

You're probably missing out on SIMD optimizations.

 
SimplePortal 1.0.0 RC1 © 2008-2019