Project

General

Profile

Actions

Bug #7317

closed

When building libdvdcss-1.4.0 _FILE_OFFSET_BITS reported to be redefined

Added by r a about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-08-22
Due date:
% Done:

0%

Estimated time:
Difficulty:
Tags:
needs-triage

Description

When building libdvdcss-1.4.0 with command below this executes correctly.

$CC=gcc ./configure --prefix=/usr

However, when I issue the gmake command to build the library I get the following error

/tmp/libdvdcss-1.4.0$ gmake
gmake all-am
gmake[1]: Entering directory '/tmp/libdvdcss-1.4.0'
CC src/libdvdcss.lo
CC src/device.lo
CC src/css.lo
CC src/ioctl.lo
CC src/error.lo
In file included from src/device.h:28:0,
from src/libdvdcss.h:31,
from src/error.c:26:
./config.h:152:0: warning: "_FILE_OFFSET_BITS" redefined [enabled by default]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/stdio.h:37:0,
from src/error.c:24:
/usr/include/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
CCLD libdvdcss.la
doxygen doc/doxygen.cfg
touch stamp-doxygen
gmake[1]: Leaving directory '/tmp/libdvdcss-1.4.0'

Examining the /usr/include/sys/feature_tests.h:231 I find that the line is #define _FILE_OFFSET_BITS 32 by changing this to 64 bits temporarily the build of libdvdcss completes.
Given that largefile support is enabled by default is this an error in the include files?

Actions #1

Updated by Aurélien Larcher about 5 years ago

Documentation says that in 32bits if the macro is not defined before inclusion of the header file then it is default initialized as 32 (and that's actally the behaviour enforced by the header).
Passing the macro definition in CPPFLAGS should remove the warning.
In any case this is not a bug since the code actually redefines the macros to support large files and this does not require changing system headers.

To remove the warning add $(CPP_LARGEFILES) to CPPFLAGS, defined in shared-macros.mk.

It expands `getconf LFS_CFLAGS` as "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" which is exactly what we want.

Actions #2

Updated by Aurélien Larcher about 5 years ago

  • Status changed from New to Closed
  • Difficulty deleted (Medium)

Invalid, described behaviour is as documented and should make use of required compilation flags.

Actions #3

Updated by Aurélien Larcher about 5 years ago

May I suggest that you could update the component in oi-userland in the process?

https://github.com/OpenIndiana/oi-userland/tree/oi/hipster/components/encumbered/libdvdcss

Thank you in advance if you have the time to help :)

Actions

Also available in: Atom PDF