Menu

#4 Revision 666 problem building on Ubuntu

open
nobody
None
5
2014-08-26
2009-07-17
Brian Assaf
No

Everything works fine up until making.

-------------------------------------------
In file included from ../vgmstream.h:21,
from coding.h:4,
from adx_decoder.c:1:
/usr/include/mpg123.h:37:2: error: #error "Mismatch in large file setup! Enable/disable large file support appropriately to use libmpg123."
make[2]: *** [adx_decoder.lo] Error 1

-------------------------------------------
Checking the mpg123 homepage faq, it covers that error
Mismatch in large file setup!

You try to compile a program using libmpg123 on GNU/Linux or Solaris and get this:

/usr/local/include/mpg123.h:37:2: error: #error "Mismatch in large file setup!
Enable/disable large file support appropriately to use libmpg123."

This is due to libmpg123 being compiled with large file support and your app is trying to compile without... or the other way round. Usually, it is the case that you upgraded to mpg123 1.6, which enabled large file support as default and your app build fails to use the switch for enabling large support.

Solution

The usual case is resolved by this:

1. Make sure you use off_t properly for all file offsets (mpg123 API, but also other file I/O).
2. Add -D_FILE_OFFSET_BITS=64 to your compiler flags -- for the whole build.

Note that just disabling large file support in libmpg123 may be an option, but not a smart move. Everyone should use large file support nowadays and GNU/Linux distributions use it as default.
http://www.mpg123.de/faq.shtml

Thanks

Discussion


Log in to post a comment.