patch for freebsd support in drizzle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Monty Taylor |
Bug Description
the attached patch gets drizzzle compiling and working on freebsd 7.1. most of the changes are pretty innocuous, fixing compiler/linker flags, quelling compiler warnings, adding missing #includes, ...
./configure must be run with the following env vars set (common on freebsd):
- LDFLAGS=
- CFLAGS=
- CPPFLAGS=
the __APPLE_CC__ stuff is to fix problems with a couple system header files that use it in math without making sure that it's defined. (bug w/freebsd's headers, unrelated to drizzle.)
non-trivial fixes:
- freebsd doesn't provide log2. workaround is #define log2(x) (log(x) / M_LN2) when it's not available.
- gperf needs the -D flag since to quell problems with value hashing collisions
- lots of UNIV_INTERN attributes needed to be added to the handler interface/code
- acx_pthread.m4 was putting the linker flags it found for pthreads in to PTHREAD_CFLAGS rather than PTHREAD_LIBS
the one problem i've yet to cleanly overcome is a bad interaction between the mktime autoconf test and some system headers included by drizzle/protobuf. i have left the fix out of the main patch (freebsd.patch) and included it in a separate patch (freebsd_
linux x86_64 builds cleanly after applying the patch.
make check almost completes without any failures. i'm currently seeing a couple problems related to math that i'm going to look in to and possibly report separately.
Related branches
Changed in drizzle: | |
status: | Fix Committed → Fix Released |
working on a cleaner patch for this part of things, no luck just yet, thoughts welcomed...