captchagen

Discussion re sg development. You don't have to be a developer.

Library not found

Postby SysKoll » Mon Nov 24, 2003 8:58 pm

Josh,

On Linux, you can change the library directories by changing the LD_LIBRARY_PATH. Assume that your libtiff.so lib is in /some/lib/dir. Do this from the shell:

Code: Select all
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/some/lib/dir/


Then run the convert program again from that shell and see if the env var helped.

If it works, you can set
Code: Select all
$ENV{LD_LIBRARY_PATH} .= ":/some/lib/dir/"
in the Perl code before you invoke convert.

Let me know if this is on a place I can access. If so, I can do some troubleshooting.
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Mon Nov 24, 2003 9:21 pm

I did know that, I swear :oops:

I think I'm going to need to recompile Image Magick on the web box -- after bringing in all the libs, I get:

./convert: error in loading shared libraries
: undefined symbol: __cxa_atexit
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Recompile

Postby SysKoll » Mon Nov 24, 2003 11:43 pm

I think a recompile could fix things. The atexit is the hook called when the program exits, and it is probably coming from a library mismatch.

I examined the possibilty of using the Perl Image::Magick module instead (see http://www.imagemagick.org/www/perl.html ) but alas, this code has prereqs we don't satisfy:
You must have ImageMagick 5.4.3 or above and Perl version 5.005_02 or greater installed on your system for either of these utilities to work.

So we're stuck with installing convert.
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Wed Dec 03, 2003 2:53 pm

this is getting fun :)


Code: Select all
depmode=gcc /bin/sh ../depcomp \
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I../ -I. -I. -I.
 -I.. -I../ltdl  -D_REENTRANT  -g -O2 -Wall -c -o magick.lo `test -f 'magick.c'
|| echo './'`magick.c
magick.c:92: conflicting types for `SignalHandler'
/usr/include/signal.h:46: previous declaration of `SignalHandler'
make[2]: *** [magick.lo] Error 1
make[2]: Leaving directory `/.../tmp/imagemagick/ImageMagick-5.5.7/magick'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/.../tmp/imagemagick/ImageMagick-5.5.7/magick'
make: *** [all-recursive] Error 1


not sure what the problem is here. I just grabbed the most recent stable version tarball and did a configure and a make.

I'll start looking into this unless anyone has a quick anwer.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Postby josh » Sat Dec 06, 2003 2:56 pm

OK - I got it to compile. That SignalHandler struct had a name collision with something in that header file, so I just renamed it (open source is good).

Now, I'm working on getting the proper "delegates" set up -- shouldn't be too long now.

At some point, I'll probably ask for help on reducing the hard drive footprint of captchagen, it's about 13.4 megs now. I'll have to add more stuff for the delegates, etc.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

13MB???

Postby SysKoll » Sat Dec 06, 2003 4:59 pm

At some point, I'll probably ask for help on reducing the hard drive footprint of captchagen, it's about 13.4 megs now. I'll have to add more stuff for the delegates, etc.


Captchagen? It's 20 lines of Perl! Or do you mean convert and ImageMagick?
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Mon Dec 08, 2003 4:44 pm

yeah - It must be all the libraries I've copied over, along with the image files, dictionary, etc. Picking through it, I bet there's a lot I can get rid of without much problem.

Do you know how to fake out the image magick build configuration script into thinking that libz and libpng are installed on the machine when in fact they are not?
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Postby SysKoll » Mon Dec 08, 2003 5:07 pm

You'll have to dig in the configure script and remove the test for these libs (which is a compilation of a sample program, I think).
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Fri Dec 12, 2003 11:36 pm

not to sound pessimistic about my chances of getting things running on the web server, but how about wrapping captchagen in a web service or rpc call to the mail server?
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Postby maratheamit » Sat Dec 13, 2003 4:56 am

do the mail and web servers share a file system? if not, i don't see how a web service or rpc call will help. in that case we can host the verification part on the mail server with a redirect to the web server when the captchgen challenge receives the proper response.
maratheamit
 
Posts: 82
Joined: Fri Aug 29, 2003 2:35 pm

Postby SysKoll » Sat Dec 13, 2003 9:14 pm

do the mail and web servers share a file system? if not, i don't see how a web service or rpc call will help.


Amit, actually, you can perfectly have a web service or an RPC service running on a server without any file system sharing.

Josh, is it possible to NFS-export a file system from the mail server and mout it on the web server? That would allow us to run captchagen on the mail server.

If NFS is impossible, then I'll wrap captchagen in an RPC. Let me know.
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Sun Dec 14, 2003 6:29 pm

I've never been able to mount an nfs volume as non-root -- and I suppose I'd be spooked about an nfs export on the mail server, anyway, if you guys know a way to pull it off, I'll do it.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Postby SysKoll » Sun Dec 14, 2003 7:59 pm

So if NFS is out of the question, I'll try to wrap captchagen into some RPC.
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Fri Dec 19, 2003 4:50 pm

cool - I don't know how you feel about wsdl/soap, but if you want to work that way, I can install whatever modules we need and set up apache, etc.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

XML-RPC?

Postby SysKoll » Mon Jan 05, 2004 10:02 pm

Josh,

I'd like to try to wrap catchagen in an XML-RPC server. This server would run on the mail server, and the web machine would be a client invoking the captchagen service.

To do this, both sides need to load the XMLRPC module (from CPAN), namely: XMLRPC::Transport::HTTP on the server, XMLRPC::Lite on the clienty (web machine).

Let me know if you can install these prereq modules.
-- SysKoll
SysKoll
 
Posts: 889
Joined: Thu Aug 28, 2003 9:24 pm

PreviousNext

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron