I was able to go a bit further.
First of all, I uncomment line 58 in src/apache-2/mod_rivet.c and
comment line 57 in src/apache-2/mod_rivet.h and then the duplicate
symbol error disapears.
After that, I discovered my apache requires x86_64 libraries, so I
rebuild all like that:
export LDFLAGS="-arch x86_64"
export CFLAGS="-arch x86_64"
make clean
./configure --with-apache-version=2 --prefix=/usr --enable-symbols --
with-apache=/usr
make
make install
This time apache2 can load rivet but Tcl can't because tclsh is i386
(don't ask me why apple do that):
bash-3.2# file /usr/sbin/httpd
/usr/sbin/httpd: Mach-O universal binary with 4 architectures
/usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc
/usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64
/usr/sbin/httpd (for architecture i386): Mach-O executable i386
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable
x86_64
bash-3.2# file /usr/bin/tclsh8.4
/usr/bin/tclsh8.4: Mach-O universal binary with 2 architectures
/usr/bin/tclsh8.4 (for architecture ppc7400): Mach-O executable ppc
/usr/bin/tclsh8.4 (for architecture i386): Mach-O executable i386
The side effect is all libraries loaded by rivet must be universal
binary with at least i386 and x86_64. So, I first tried to rebuild all
for multiple arch:
export LDFLAGS="-arch x86_64 -arch i386"
export CFLAGS="-arch x86_64 -arch i386"
make clean
./configure --with-apache-version=2 --prefix=/usr --enable-symbols --
with-apache=/usr
make
But i fails with this error:
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with
multiple -arch flags
So, I copy all x86_64 library to /tmp and I rebuild all for i386:
export LDFLAGS="-arch i386"
export CFLAGS="-arch I386"
make clean
./configure --with-apache-version=2 --prefix=/usr --enable-symbols --
with-apache=/usr
make
make install
Then I add x86_64 using lipo:
lipo -create /usr/libexec/apache2/mod_rivet.so /tmp/
mod_rivet.so -output /usr/libexec/apache2/mod_rivet.so
lipo -create /usr/lib/rivet0.8.0/librivet.so /tmp/
librivet.so -output /usr/lib/rivet0.8.0/librivet.so
lipo -create /usr/lib/rivet0.8.0/librivetparser.so /tmp/
librivetparser.so -output /usr/lib/rivet0.8.0/librivetparser.so
Last thing, I have to edit /usr/lib/rivet0.8.0/packages/tclrivet/
tclrivet.tcl to change:
load [file join [file dirname [info script]] .. .. .. src \
librivetparser[info sharedlibextension]]
to:
load [file join [file dirname [info script]] .. .. \
librivetparser[info sharedlibextension]]
This time rivet could be loaded by apache2 and tclsh. Alas, when I try
to load a .rvt file I get this in error_log:
[Mon Dec 10 12:52:38 2007] [notice] child pid 63165 exit signal
Segmentation fault (11)
I guess this mean rivet crashed, but I haven't time to instrospect
where and why right now (I have payjob to finnish before).
Anyway, I hope this will help you.
Regards,
--
David Zolli
[EMAIL PROTECTED]
http://www.kroc.tk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]