Bug 477759 - httpd does not support modules built with -D_FILE_OFFSET_BITS=64
Summary: httpd does not support modules built with -D_FILE_OFFSET_BITS=64
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd
Version: 5.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-23 12:52 UTC by Jarkko
Modified: 2009-01-13 13:13 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-13 13:13:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jarkko 2008-12-23 12:52:38 UTC
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):
httpd-2.2.3-11.el5_2


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:
segfaults


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 13:13:08 UTC
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.