OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #zaurus and #alarmz chat on freenode.net | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Adding Perl modules, and dev_img errors
Zar2Cool
post Sep 29 2004, 12:00 PM
Post #1





Group: Members
Posts: 11
Joined: 29-September 04
Member No.: 4,804



Hello to everyone.

I am trying to install Apache/Perl/Mysql on my Zaurus. I write a lot of perl scripts that work with mysql and it would be handly to test stuff on the Zaurus. Speaking of, it's a 5600 with 1GB SD and Sharp 3.00 rom (I really should upgrade the rom, but I don't want to blast everything away.)

Ya, I know it's going to be slow and all that, but I am doing this more to just see if I can.

Apache, mySQL, and Perl 5.8 installed fine. It's the Perl DBI module that I am having problems with.
In order to build it, I need make. I downloaded dev_img and tried to install it, but I got this error.

CODE
# ./image_setup.sh /mnt/card/devel/dev_img-1.5 /mnt/dev
Setting mount point /mnt/dev...
Mounting image /mnt/card/devel/dev_img-1.5...
Failed to mount image /mnt/card/devel/dev_img-1.5 on /mnt/dev
#

It does mount the image fine, but seems to fail seting up the symlinks.
I tried to set them up by hand and I think it's right. Least the config script is happy.

I downloaded the Perl DBI source and did.
Perl Makefile.pl

and it was happy. I edited the makefile to point to the correct location of gcc and ran make, but I get this error.

CODE
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/DBI/PurePerl.pm blib/lib/DBI/PurePerl.pm
cp lib/DBI/ProfileData.pm blib/lib/DBI/ProfileData.pm
/home/system/var/mnt/dev/usr/bin/perl5.8.0 -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
/home/system/var/mnt/dev/usr/bin/perl5.8.0 /mnt/pkgs/perl/perl5.8.0/lib/5.8.0/ExtUtils/xsubpp  -typemap /mnt/pkgs/perl/perl5.8.0/lib/5.8.0/ExtUtils/typemap -typemap typemap  Perl.xs > Perl.xsc && mv Perl.xsc Perl.c
/mnt/dev/bin/gcc -c   -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O3   -DVERSION=\"1.43\" -DXS_VERSION=\"1.43\" -fpic "-I/mnt/pkgs/perl/perl5.8.0/lib/5.8.0/linux/CORE"  -Wall -Wno-comment -DDBI_NO_THREADS Perl.c
gcc: installation problem, cannot exec `as': No such file or directory
make: *** [Perl.o] Error 1


I have not had this problem when installing on X86 systems, so I am assuming that it is something that I need to change for arm CPU support.

Can anyone offer any tips or pointers on how to debug this?

Thank you
-Eddie
Go to the top of the page
 
+Quote Post
stupkid
post Sep 29 2004, 12:16 PM
Post #2





Group: Members
Posts: 578
Joined: 2-January 04
From: Texas USA
Member No.: 1,324



I successfully got the MySQLPP (the pure Perl implementation of the MySQL driver) and DBI modules to compile on my Zaurus, but I was never able to connect to the MySQL database with any of the scripts that I wrote. I will gladly tar up the modules for you if you are interested.

Hope this helps!
Go to the top of the page
 
+Quote Post
stupkid
post Sep 29 2004, 12:33 PM
Post #3





Group: Members
Posts: 578
Joined: 2-January 04
From: Texas USA
Member No.: 1,324



Here are the modules that I compiled with dev_img-1.5. If you untar the modules under /mnt/card, You should be able to add these modules to your path with:

use lib qw(/mnt/card/perlmods);
use DBI;

You can take a look at the documentation for mysqlPP on CPAN.

Let me know if you actually get it to connect to the database.

Enjoy!
Attached File(s)
Attached File  perlmods.tar.gz.file ( 492.16K ) Number of downloads: 7
 
Go to the top of the page
 
+Quote Post
Zar2Cool
post Sep 29 2004, 04:25 PM
Post #4





Group: Members
Posts: 11
Joined: 29-September 04
Member No.: 4,804



Thank for the code. I got it working.
The trick is not to say what host you are connecting to. It defaults to the localhost and that seems to work.

My test program blow.
CODE
#!/usr/bin/perl

use lib qw(/mnt/card/perlmods);
use DBI;


# Connect to the database.
my $dbh10 = DBI->connect("dbi:mysqlPP:inv","root","");


$sth = $dbh10->prepare( "
    SELECT itemnumber,itemgroup,descrip
    FROM maininv" );


$sth->execute();

while ( ($itemnumber,$itemgroup,$descrip ) = $sth->fetchrow_array() ) {
   print "$itemnumber,$itemgroup,$descrip\n";
};


$sth->finish;


Thanks a bunch. Now to see if my Zaurus can handle this large program. smile.gif

-Eddie
Go to the top of the page
 
+Quote Post
Zar2Cool
post Sep 29 2004, 09:50 PM
Post #5





Group: Members
Posts: 11
Joined: 29-September 04
Member No.: 4,804



If you have time, can you try.

[code[
select count(*) from <table>;
[/code]

it's hanging if i do that. However,

CODE
select count(*) from <table> where <field> == 1;


having anything where in the statement and it seems to work.
Not sure what is going on here.

Thanks
Go to the top of the page
 
+Quote Post
stupkid
post Sep 30 2004, 10:26 PM
Post #6





Group: Members
Posts: 578
Joined: 2-January 04
From: Texas USA
Member No.: 1,324



I'm excited to give the modules a try. I'll take a look at the problem you are seeing, but I'm going on a weeks vacation starting today.

TTFN
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th January 2018 - 09:39 AM