Bug 477759 - httpd does not support modules built with -D_FILE_OFFSET_BITS=64
httpd does not support modules built with -D_FILE_OFFSET_BITS=64
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2008-12-23 07:52 EST by Jarkko
Modified: 2009-01-13 08:13 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-13 08:13:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jarkko 2008-12-23 07:52:38 EST
Description of problem:
httpd does not support modules built with -D_FILE_OFFSET_BITS=64

When I remove -D_FILE_OFFSET_BITS=64 from CFLAGS, things work. With that flag I get segfaults. The module gets that flag automatically from mysql as pkg-config is used, so removing the flag requires some ugly hacks.

Version-Release number of selected component (if applicable):

How reproducible:
Well... Always if the flag is there.

Steps to Reproduce:
1. Build a httpd module with -D_FILE_OFFSET_BITS=64 in CFLAGS.
2. Load the module in httpd configuration.
3. Request a page.
Actual results:

Expected results:
things working :)

Additional info:
Not sure if httpd actually supports -D_FILE_OFFSET_BITS=64 or not (apr has some comments about it in configure/configure.in and CHANGES - under SOURCES/httpd-2.2.3/srclib/apr/). If it does, this could go away if httpd would be built with that flag? I already tried to set that flag in CFLAGS, but httpd doesn't take it. I didn't try to patch Makefile etc. so I didn't actually try what happens if the actual build takes the flag.
Comment 1 Joe Orton 2009-01-13 08:13:08 EST
No, this is not supported.

Redefining FILE_OFFSET_BITS affects the size of system types and hence can e.g. affect various structure sizes.   I recommend you separate your module into multiple source files, to isolate the parts which need to interact with MySQL (and hence need _FILE_OFFSET_BITS=64.

Note You need to log in before you can comment on or make changes to this bug.