Name: Juan Carlos Paz EspiƱeira
Member since: 2003-04-29 09:18:42
Last Login: N/A
Homepage: http://usuarios.lycos.es/juancpaz
Notes:
For 2 years, I worked in the Porting Center of Software AG forming part of the Team that ports Tamino Database to AIX. Among other functions, normally I have been in charge to build the distribution of Apache provides along with Tamino (a task not as trivial as can seem) I can therefore contribute with my experiences developing on AIX, as well as with solid C/C++ knowledge.
23 May 2003 (updated 23 May 2003 at 09:09 UTC) »
Note i use autotools to create configure files, those delivered with apache don't work rightPATH=$AUTOTOOLS:$PATH CC="xlc_r" CXX="xlC_r" CPP="xlC_r -E" LDFLAGS="-blipath:/usr/lib:/lib" CFLAGS="-q64 -I. -I/usr/vacpp/include -qstrict -qlanglvl=extended -D_LARGE_FILES -g -qfullpath" LTFLAGS=" " OBJEXT=".o" LIBEXT=".so" AR="/bin/ar" AR_FLAGS="-rv" RANLIB="/bin/ranlib -t -X64" OBJECT_MODE=64 LIBPATH="/usr/lib:/lib"
I don't execute build/binbuild.sh for to several reasons, as you can see below I need to change some things in middle of process... btw, apr and apr-util don't know Apache Layout, then, i usually set LAYOUT=apr and LAYOUT=apr-util in respective configures, just before sed command use it.cd $source_dir ./buildconf
1. Fix libexpat.so generationcd $source_dir ./configure --enable-layout=Apache --prefix=$source_dir/bindist --enable-mods-shared=most \ --with-expat=$source_dir/srclib/apr-util/xml/expat --enable-static-support</tt>
I usually use libtool from apr:... install: $(LIBRARY) $(APIHEADER) ... $(LIBTOOL) --mode=install cp $(LIBRARY) $(DESTDIR)$(libdir) ...
2. Fix httpd import symbols... LIBTOOL = $(SHELL) $source_dir/srclib/apr/libtool ...
3. Fix absolute path references in libraries... HTTPD_LDFLAGS = -bI:$my_source_dir/server/httpd.exp ...
$ dump -X64 -Hv libparutil-0.so
libaprutil-0.so:
...
***Import File Strings***
INDEX PATH BASE MEMBER
0 absolute_path:/usr/lib:/lib
1 absolute_path/bindist/lib libexpat.so
2 libiconv.a shr4_64.o
3 absolute_path/bindist/lib libapr-0.so
4 libc.a shr_64.o
Adding -blibpath=/usr/lib:/lib to LDFLAGS isn't sometimes enought to solve this. Sometimes, libtool removes this flag. If configure generated Makefiles with libraries full names in LIBS, or libtool doesn't find libraries in .libs, it will search for it in another places and full paths will be generatedFor modules, it could be enought modifying build/config_vars.mk, for apr-util, I didn't find the right place to properly fix it, so I dump libtool command to a log, then, after make and make install, I launch the xlc command manually, some like this:... LDFLAGS=-L$source_dir/srclib/apr -L$source_dir/srclib/apr-util \ -L$source_dir/srclib/apr-util/xml/expat/lib -blibpath:/usr/lib:/lib ... LDLIBS=-lapr-0 -laprutil-0 -lexpat ...
Something strange ... make build .so right, but make install "relinks" libaprutil-0.so (why?) taking other flags and producing a library with a wrong load header.xlc_r -o .libs/libaprutil-0.so.0.9.3 \ buckets/apr_buckets_file.o buckets/apr_buckets_pool.o buckets/apr_buckets_flush.o buckets/apr_buckets_refcount.o \ ... misc/apr_rmm.o misc/apr_reslist.o misc/apr_queue.o misc/apu_version.o strmatch/apr_strmatch.o xlate/xlate.o \ -L$source_dir/srclib/apr-util/xml/expat/lib/.libs -lexpat \ -L$source_dir/srclib/apr/.libs -lapr-0 \ -liconv -lm -lnsl -lc -Wl,-brtl -Wl,-bnoentry -Wl,-bexport:.libs/libaprutil-0.exp \ -Wl,-G -blibpath:/usr/lib:/lib
static int dav_fixups(request_rec *r)
{
dav_dir_conf *conf;
...
if (strcmp(r->handler, DAV_HANDLER_NAME) != 0) /* This is the fix, if program is allowed to continue */
return DECLINED; /* without this check, a core could be generated */
conf = (dav_dir_conf *)ap_get_module_config(r->per_dir_config,
&dav_module);
if (conf->provider == NULL) { /* This could become a core if conf isn't a valid pointer */
return DECLINED;
}
...
}
2. A colleague told me a different solution, this is to statically link mod_dav.a into mod_dav_fs.so, something like this:... and, well, it is true, httpd don't crash after this ... but I don't understand why this is done ... if we build a different provider, must we statically link mod_dav too? ... I dont know if mod_dav will work properly.xlc_r -o .libs/libmod_dav_fs.so.0.0.0 \ mod_dav_fs.o dbm.o lock.o repos.o ../main/.libs/libmod_dav.a \ -lc -Wl,-bnoentry -Wl,-bexport:.libs/libmod_dav_fs.exp -Wl,-G -blibpath:/usr/lib:/lib
29 Apr 2003 (updated 29 Apr 2003 at 14:13 UTC) »
juancpaz certified others as follows:
Others have certified juancpaz as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!