Re: wackamole pain

Theo Schlossnagle <[email protected]> Tue, 20 Apr 2004 14:46:57 -0400
Newsgroups gmane.comp.apache.mod-wackamole.general
Message-ID <[email protected]>
Jay West wrote:

>>Embedding perl is one of those black arts that makes perl coders wish
>>they had never heard of Perl :-D
>>    
>>
>Well, at least they TRIED to get it right... perlxsi DOT C!!
>
>Still get...
>gcc -g -O2 -Wall    -I/usr/libdata/perl/5.00503/mach/CORE -I. -I.  -I/usr/lo
>cal/include -DDONT_USE_THREADS -DETCDIR=\"/usr/local/etc\"  -D_PATH_WACKAMOL
>E_PIDDIR=\"/var/run\"  -DBUNDLEEXT=\"so\" -DHAVE_CONFIG_H -c perlxsi.c
>gcc -o wackamole wackamole.o alarm.o lex.wack.o y.tab.o arpcache.o
>spoofmanager.o  abt.o control.o apue.o configuration.o userloader.o
>ife-bpf.o perl.o
>perlxsi.o -L/usr/local/lib  -Wl,-R/usr/lib -Wl,-E -lperl -lm
>/usr/libdata/perl/5.00503/mach/auto/DynaLoader/DynaLoader.a -L/usr/libdata/p
>erl/5.00503/mach/CORE -lperl -lm -lc -lcrypt -lperl -lm -rdynamic -lpcap  -l
>spread
>perl.o: In function `my_eval_sv':
>/usr/local/software/wackamole/perl.c:21: undefined reference to `eval_sv'
>perl.o: In function `perl_handler':
>/usr/local/software/wackamole/perl.c:113: undefined reference to `call_pv'
>*** Error code 1
>
>Stop in /usr/local/software/wackamole.
>
>Is it possibly easier to call a C executable instead of perl, or do you
>still have to have the embedded perl interpreter?
>  
>
It is possible to run C routines... but not executables.  That seems 
pretty easy to accomplish though.  Easiest to do with a perl 
interpreter, but fork()/exec() isn't very complicated...

I do all my testing on perl 5.8.x, not perl 5.005.  And I believe that 
perl 5.6 is a bare minumum requirement. In all fairness, perl5.005 is 5 
years old and even perl5.6 is 3 years old.

On FreeBSD it should be as easy as:
pkg_add -r perl5.8
/usr/local/bin/use.perl port

(if you want to switch back, just: /usr/local/bin/use.perl system)

After switching perl to the port, make clean and remove perlxsi.c and 
remake.  Hopefully you will see some improvement.  That's the build 
environment on my box here.

-- 
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth