Mailing List Archive

wackamole pain
Trying to rebuild wackamole to support embedded perl; a portion of
configure:

checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h: check for missing prerequisite headers?
configure: WARNING: sys/socket.h: proceeding with the preprocessor's result
checking for sys/socket.h... yes

Then during make:
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 perl.c
perl.c: In function `my_eval_sv':
perl.c:19: warning: implicit declaration of function `eval_sv'
perl.c: In function `perl_handler':
perl.c:112: warning: implicit declaration of function `call_pv'
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
perlxsi.c:4: warning: parameter names (without types) in function
declaration
perlxsi.c:6: syntax error before `CV'
*** Error code 1

Stop in /usr/local/software/wackamole.
chopper#

Using freebsd 4.9 and cvs version of wackamole. Any thoughts??? Also, how
does one go about calling a C program for "on up" as opposed to Perl? I
didn't see anything about that....

Jay West
Knights Direct

---
[This E-mail scanned for viruses by Declude Virus]
wackamole pain [ In reply to ]
Jay West wrote:

>Trying to rebuild wackamole to support embedded perl; a portion of
>configure:
>
>checking sys/socket.h presence... yes
>configure: WARNING: sys/socket.h: present but cannot be compiled
>configure: WARNING: sys/socket.h: check for missing prerequisite headers?
>configure: WARNING: sys/socket.h: proceeding with the preprocessor's result
>checking for sys/socket.h... yes
>
>Then during make:
>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 perl.c
>perl.c: In function `my_eval_sv':
>perl.c:19: warning: implicit declaration of function `eval_sv'
>perl.c: In function `perl_handler':
>perl.c:112: warning: implicit declaration of function `call_pv'
>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
>perlxsi.c:4: warning: parameter names (without types) in function
>declaration
>perlxsi.c:6: syntax error before `CV'
>*** Error code 1
>
>Stop in /usr/local/software/wackamole.
>chopper#
>
>Using freebsd 4.9 and cvs version of wackamole. Any thoughts??? Also, how
>does one go about calling a C program for "on up" as opposed to Perl? I
>didn't see anything about that....
>
>
Hmmm sounds like you don't have threads or multiplicity defined in your
perl build... That isn't a problem, it should be as simple as removing
perlxsi.c and typing make perlxsi.c. That file should be autogenerated
by perl -- it is a bootstrapper for embedding perl.

--
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth
wackamole pain [ In reply to ]
Theo wrote...
> Hmmm sounds like you don't have threads or multiplicity defined in your
> perl build... That isn't a problem, it should be as simple as removing
> perlxsi.c and typing make perlxsi.c. That file should be autogenerated
> by perl -- it is a bootstrapper for embedding perl.

Now I get....
chopper# rm perlxsi.c
chopper# make perlxsi
/usr/bin/perl5 -MExtUtils::Embed -e xsinit -- -o perlxsi.c
gcc -g -O2 -Wall -I/usr/libdata/perl/5.00503/mach/CORE -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
erlxsi.c -o perlxsi
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x82): undefined reference to `main'
/tmp/ccBE5inI.o: In function `xs_init':
/usr/local/software/wackamole/perlxsi.c:41: undefined reference to
`boot_DynaLoader'
*** Error code 1

Stop in /usr/local/software/wackamole.

If I knew perl... *sigh*

Jay West

---
[This E-mail scanned for viruses by Declude Virus]
wackamole pain [ In reply to ]
Jay West wrote:

>Theo wrote...
>
>
>>Hmmm sounds like you don't have threads or multiplicity defined in your
>>perl build... That isn't a problem, it should be as simple as removing
>>perlxsi.c and typing make perlxsi.c. That file should be autogenerated
>>by perl -- it is a bootstrapper for embedding perl.
>>
>>
>
>Now I get....
>chopper# rm perlxsi.c
>chopper# make perlxsi
>
>
make perlxsi.c

not

make perlxsi

As a side effect, your command did make perlxsi.c, but then it went and
tried to make a binary out of it.. thats not what you want. Try typing
"make" now.

>If I knew perl... *sigh*
>
>
Embedding perl is one of those black arts that makes perl coders wish
they had never heard of Perl :-D

--
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth
wackamole pain [ In reply to ]
> 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?

Jay West

---
[This E-mail scanned for viruses by Declude Virus]
wackamole pain [ In reply to ]
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