Updated patchset at: <http://people.apache.org/~pquerna/ts/patches/portable-v2/>
(note, some of the fixes aren't in the right 'order'... I didn't use the mq hg extension when I should of... oh well.) On Fri, Oct 30, 2009 at 9:20 AM, Leif Hedstrom <[email protected]> wrote: > Awesome! A few questions right away: > > *_Patch 1:_* Can we be sure these defines are valid for any platform where > ETIME / ENOTSUP isn't defined (I have no idea if there are such cases)? > Maybe be more defensive, and do something like > > #ifndef ETIME > #ifdef ETIMEDOUT > #define ETIME ETIMEDOUT > #endif > #endif > > And let it fail on platforms without ETIMEDOUT ? Yeah, changed it to do this in the new #18. > With this patch, I get a > warning from autoreconfig: > /usr/share/aclocal/autotrace.m4:7: warning: underquoted definition of > AM_PATH_AUTOTRACE > /usr/share/aclocal/autotrace.m4:7: run info '(automake)Extending > aclocal' > /usr/share/aclocal/autotrace.m4:7: or see > http://sources.redhat.com/automake/automake.html#Extending-aclocal > > It still builds though. This is just automake being stupid. Its a harmless warming, and in this case, being generated from 3rd party m4 code. > *_Patch 2:_* Does this imply that we don't require BDB any more?? I didn't > think that was the case, but maybe Andrew or someone in the team knows? As > for the glibc-devel check, any way we can do that in a cross platform way? Fixed in new #18. Will error out if no DB interface is found. the SimpleDBM wrapper still exists, its just that a DB-equiv is sometimes available in the core libc. I don't think the glibc function check is needed at all, eveything else we are testing for will tell if simple basics like the compiler works. > _*Patch 4:*_ Looks complicated, but using compiler support for the atomic > stuff seems like a great idea. But, this fails on Linux for me: > > gmake[1]: *** No rule to make target `ink_atomic.o', needed by > `libinktomi++.a'. Stop. > gmake[1]: Leaving directory > `/export/apache/trafficserver/traffic/trunk.pquerna/libinktomi++' > gmake: *** [all-recursive] Error 1 D'oh, my patch file was missing the *new* file, ink_atomic.cc. Included in the new patch set's #18. > *_Patch 6:_* This breaks my build on Linux, with > > unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof > -march=pentium -MT Allocator.o -MD -MP -MF .deps/Allocator.Tpo -c -o > Allocator.o Allocator.cc > In file included from SimpleDBM.h:54, > from inktomi++.h:139, > from Allocator.cc:33: > /usr/include/db.h:142: error: conflicting declaration ‘typedef struct > __db_dbt DBT’ > /usr/include/db_185.h:93: error: ‘DBT’ has a previous declaration as > ‘typedef struct DBT DBT’ > /usr/include/db.h:1371: error: conflicting declaration ‘DB_BTREE’ > /usr/include/db_185.h:108: error: ‘DB_BTREE’ has a previous declaration > as ‘DBTYPE DB_BTREE’ > /usr/include/db.h:1372: error: conflicting declaration ‘DB_HASH’ > /usr/include/db_185.h:108: error: ‘DB_HASH’ has a previous declaration as > ‘DBTYPE DB_HASH’ > /usr/include/db.h:1373: error: conflicting declaration ‘DB_RECNO’ > /usr/include/db_185.h:108: error: ‘DB_RECNO’ has a previous declaration > as ‘DBTYPE DB_RECNO’ > /usr/include/db.h:1376: error: conflicting declaration ‘typedef enum > DBTYPE DBTYPE’ > /usr/include/db_185.h:108: error: ‘DBTYPE’ has a previous declaration as > ‘typedef enum DBTYPE DBTYPE’ > /usr/include/db.h:1502: error: redefinition of ‘struct __db’ > /usr/include/db_185.h:111: error: previous definition of ‘struct __db’ > gmake[1]: *** [Allocator.o] Error 1 > gmake[1]: Leaving directory > `/export/apache/trafficserver/traffic/trunk.pquerna.test/libinktomi++' > gmake: *** [all-recursive] Error 1 fixed in patch 18. Now only include one header, if both are found. > _*Patch 7:*_ With this patch, the configure warning from above changes to: > > build-aux/apr_network.m4:24: warning: underquoted definition of > APR_TYPE_IN_ADDR > build-aux/apr_network.m4:24: run info '(automake)Extending aclocal' > build-aux/apr_network.m4:24: or see > http://sources.redhat.com/automake/automake.html#Extending-aclocal fixed. > and the build then fails (on linux): > ink_inet.cc: In function ‘hostent* ink_gethostbyname_r(char*, > ink_gethostbyname_r_data*)’: > ink_inet.cc:62: error: cannot convert ‘int*’ to ‘hostent**’ for argument > ‘5’ to ‘int gethostbyname_r(const char*, hostent*, char*, size_t, hostent**, > int*)’ > ink_inet.cc: In function ‘hostent* ink_gethostbyaddr_r(char*, int, int, > ink_gethostbyaddr_r_data*)’: > ink_inet.cc:83: error: cannot convert ‘int*’ to ‘hostent**’ for argument > ‘7’ to ‘int gethostbyaddr_r(const void*, __socklen_t, int, hostent*, char*, > size_t, hostent**, int*)’ > gmake[1]: *** [ink_inet.o] Error 1 > gmake[1]: Leaving directory > `/export/apache/trafficserver/traffic/trunk.pquerna.test/libinktomi++' > gmake: *** [all-recursive] Error 1 This looks like GETHOSTBYNAME_R_GLIBC2 isn't defined. This was caused by the headers not being detected before the check for the gethostbyname check was ran. Fixed in patch #19.
