Easiest way to start some perl stuff


Forum: DSL-N
Topic: Easiest way to start some perl stuff
started by: xlancealotx

Posted by xlancealotx on Mar. 25 2008,19:04
ok, dsl-4 had at least the basic's, LWP, MakeMaker, etc.

Rather than going crazy with kernel compiling, dsl-n comes with the 2-6 which supports the device I needed.  But, when I start to play with perl, step 1;
perl -MCPAN -e shell gives the (you need CPAN.pm) error.

So after downloading, the attempted;
perl Makefile.pm gives;
"Can't locate ExtUtils/MakeMaker.pm in @INC"

So before I start going depency crazy, and since dsl-4 has a lot already installed, where can I download those .dsl packages?  I didn't see them in the repo's.

The other problem with dsl-n is I don't see how/where to enable apt-get.

Thanks for any help as always.

Posted by curaga on Mar. 25 2008,19:20
Save yourself the trouble and get perl-5.8.0 from testing. Includes everything.
Posted by xlancealotx on Mar. 25 2008,20:39
Thanks, but not "everything" it seems.  It didn't have LWP/Simple (which installed via a force), but I can't get Device::SerialPort installed.  Through the install I get;
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
After looking throught that, all looks ok until;
configure: exit 77

It looks from looking around that the error seems to be missing g++, but I have the dsl package g++ with libs installed, I don't think I would need the g++ one by itself right?

Thanks again.

Posted by Juanito on Mar. 26 2008,03:33
A couple of things - dsl-n stands for dsl-not, so several (many?) of the mydsl extensions might not work on dsl-n.

The perl-5.8.0 extension was built to overwrite the stripped version of perl-5.8.0 in dsl - dsl-n used a different stripped version of perl, which might be the cause of your problem.

The gcc mydsl extensions were also written for dsl - I have managed to use them to compile in dsl-n, but they might not work for everything. There is however, a version of gnu-utils for dsl-n

If you look at the dpereciated dsl-n forum (there is a link on the main dsl page), there are a couple of threads about enabling apt-get in dsl-n

Posted by xlancealotx on Mar. 26 2008,16:50
Thanks for the update.  I know it's 'not' dsl, but it's supposed to be the big brother (quoting the site).

I have a little ebox, the 1st generation seemed to work, but the 2nd gen's arent with the usb.  Basically these box's are supposed to boot, run 2 perl scripts and collect data from the serial port (there are no serial ports, but a usb-serial adapter worked) to display using a flash file (gflashplayer).

Since the new box's came, dsl-4 is not working (seems usb is not seen), but dsl-n (with the 2.6 kernel) seems to see the usb, but naturally a few other issues.  I got the perl modules working, but gflashplayer spits out an error saying;
error loading shared libraries: libstdc++libc6.2-2.so.3 which seems to come from compat-libstdc.  I found an rpm, converted using alien and when I tried to intstall it got;
dpkg: `install-info' not found on PATH.
dpkg: 1 expected program(s) not found on PATH.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.

I am pretty much a fedora guy, so debian, etc. is all new, but I am again stuck between 2 things.  

DSL-N, 2.6 USB support, need the above
DSL-4 - 2.4 no usb (compiling sounded like a nightmare), but gflashplayer works fine.

There is always something . . . .

Posted by lucky13 on Mar. 26 2008,17:19
DSL's libC version is older. DSL isn't fully Debian-compatible. Debian isn't fully RPM-compatible. The more mix-and-match you use, the buggier your system ultimately will be (imo).

I'm surprised you're not able to get USB to function. How about any USB content in dmesg? Does your controller show up in lspci? Is usb-core loaded when you check lsmod? Can you load usb modules? Etc.

Posted by xlancealotx on Mar. 26 2008,19:12
Well my ideal thing would be use the dsl4 as that is what is out in the field working well.  I have the perl modules installed, cursor's hidden, no gflash error, but it's that usb is all that is left.

Lspci shows the following;
00:00.0 Host bridge: VIA Technologies, Inc. VT8623 [Apollo CLE266]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics (rev 03)

So it shows, but as a test, I use minicom.  Change my device to /dev/ttyUSB0, run it and get dropped to;
minicom: cannot open /dev/ttyUSB0: No such device

and dropped back to shell where the older box's they came right up.  If the moderators see fit, move this post to general, or I can start a new one, but I would much rather keep the dsl4 and just get the USB to work, but can't deal with all the kernel stuff.  So is there a way to test another way?  

dmsg is empty (nothing seems to log to it)
lsmod shows;
usb-storage            62208   0
usb-uhci               21708   0 (unused)
usbcore                58240   1 [usb-storage hid usb-uhci]

I tried just popping in a usb flash drive (ironically the one I installed dsl from) but I get nothing.  I am looking around and wonder what the diff's are, embedded, initrd, syslinux, vmx, etc. all found here (ftp://ftp.oss.cc.gatech.edu/pub/linux/distributions/damnsmall/current/)

Thanks again ...

Posted by ^thehatsrule^ on Mar. 26 2008,19:38
Quote
dmsg is empty
Should be dmesg.  What kind of installation are you running?

Quote
I am looking around and wonder what the diff's are, embedded, initrd, syslinux, vmx, etc. all found here (ftp://ftp.oss.cc.gatech.edu/pub/linux/distributions/damnsmall/current/)
See the readme

For gflashplayer, I'd suggest getting (maybe compile it?) a 'clean' installation that's compatible with the system.

Posted by xlancealotx on Mar. 26 2008,20:13
ah ha, missed the 1-readme!

As for running, I am not sure anymore, might be the embedded (which I thought (since I didn't see that readme) ) was installed local (which might just be the difference).

As for dmesg, yea, I knew that one, typo, but still empty nothing logging there;
-rw-r--r--    1 root     root            0 Nov 28  2001 dmesg

So I can look tonight at just the plain vanilla current one (or the 4.3, but that might be tempting fate) but it seems things are all good except that usb.

Posted by curaga on Mar. 26 2008,20:20
The app, not the file.. Use the app..
Posted by lucky13 on Mar. 26 2008,20:39
Yeah, try
% dmesg | grep [Uu][Ss][Bb]

With what you've already shown, there's no problem with USB. The controller is shown. The modules are loaded. You don't just pop in a device and use it in 2.4. I don't know how you're mounting the devices, but try mounting the standard mountpoints set by hotplug, e.g., /mnt/sda1, /mnt/sdb1, etc.

EDIT: Check /etc/fstab *before* and *after* inserting devices and see where the hotplug script adds mountpoints.

Posted by ^thehatsrule^ on Mar. 26 2008,23:14
Quote
% dmesg | grep [Uu][Ss][Bb]
fyi, you can pass -i instead, such as `dmesg | grep -i usb`

Posted by xlancealotx on Mar. 27 2008,13:12
man, that was bad, your like use the app, I am looking all over, forgetting the obvious (this project is taking it's toll on me!)  Now I know you guys were saying about mouting, fstab, but reminder, this is a terminal connecting to a serial port device that is just spitting out data, so there is no mounting involved.  I will use a usb flash to test (to verify usb is working, once I see that is good, I can move to the perl app that collects it).  So; on boot I  have the following showing up;
<6>usb.c: registered new driver usbdevfs
<6>usb.c: registered new driver hub
<6>usb-uhci.c: $Revision: 1.275 $ time 11:56:04 Aug 29 2005
<6>usb-uhci.c: High bandwidth mode enabled
<6>usb-uhci.c: USB UHCI at I/O 0xec00, IRQ 11
<4>usb-uhci.c: Detected 2 ports
<6>usb.c: new USB bus registered, assigned bus number 1
<6>hub.c: USB hub found
<6>usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
<4>usbdevfs: remount parameter error
<6>usb.c: registered new driver hiddev
<6>usb.c: registered new driver hid
<6>hid-core.c: USB HID support drivers

--- I added a usb flash drive and now see;
<6>hub.c: new USB device 00:10.0-1, assigned address 2
<4>usb.c: USB device 2 (vend/prod 0x5dc/0xa720) is not claimed by any active driver.
<6>Initializing USB Mass Storage driver...
<6>usb.c: registered new driver usb-storage
<6>scsi1 : SCSI emulation for USB Mass Storage devices
<4>  Vendor: Lexar     Model: USB Flash Drive   Rev: 1100
<7>WARNING: USB Mass Storage data integrity not assured
<7>USB Mass Storage device found at 2
<6>USB Mass Storage support registered.

So it does look it's recognized.  When I put in the usb/serial converter which is connected to the serial device, I then see;
<6>hub.c: new USB device 00:10.0-1, assigned address 4
<4>usb.c: USB device 4 (vend/prod 0x5ad/0xfba) is not claimed by any active driver.

The next test is to open minicom, change the serial setting to ttyUSB0, which after that I get minicom: cannot open /dev/ttyUSB0: No such device

I don't have access to the ones in the field which worked, but this is slightly different hardware, but the same dsl4 OS.

Hope that helps a bit more

Posted by lucky13 on Mar. 27 2008,14:46
Thanks for your reminder because I'm not a psychic.  Maybe if you'd give more details about this device ("not claimed by any active driver") and converter we might be able to figure out if the module is already available or if you can compile one.
Posted by xlancealotx on Mar. 27 2008,14:59
oh man ... is all I have to say!

Replaced that crappy radio shack serial converter with another one and got this;
<6>usb.c: registered new driver serial
<6>usbserial.c: USB Serial support registered for Generic
<6>usbserial.c: USB Serial Driver core v1.4
<6>usbserial.c: USB Serial support registered for PL-2303
<6>usbserial.c: PL-2303 converter detected
<6>usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
<6>pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.10.1

opened minicom, and right away got the data!!  Man, sometimes it's starting you right in the face.  So with that, this is solved, but I do thank everyone for their  .02

Once this device is set which should be today, I want to mass produce these.  Hardware will be the same, no cd, so I want to boot off a USB stick the way I have been, and then simply take that image and put it on each machine.  I see a menu option for mydsl remaster, is that what I am looking for?  

I will look around a bit and do some reading if I need to, but don't want to let this box out the door until I have a working backup way of moving it to other machines quickly.

Lr

Posted by ^thehatsrule^ on Mar. 27 2008,15:57
Quote
Once this device is set which should be today, I want to mass produce these.  Hardware will be the same, no cd, so I want to boot off a USB stick the way I have been, and then simply take that image and put it on each machine.  I see a menu option for mydsl remaster, is that what I am looking for?
I don't think so.  By "take that image," do you mean all of the data on your USB stick?  Exact copy from USB stick to USB stick?  Are you looking for something that installs itself automatically?  What is your current setup? (frugal with backup/restore and mydsl?)

Posted by xlancealotx on Mar. 27 2008,16:57
No, not the stick.  Basically I am not sure if it's considered a 'frugal' install, but I would boot off the usb stick to the live session.  right click, select install to hard drive (the box has an internal 512mb flash drive looked at as an ida (hda))

Once that is done, I reboot (no more usb stick).  I installed a few custom .dsl packages (gflashplayer, some cursor changes), then install the testing perl.dsl, cpan a few more (like Device::SerialPort).  Change some boot scripts and finally it's done.

Now I want to take that hda1 partition and just package it so I can take that bootable usb stick, boot and have that new premade dsl version there without the 5 above steps.

I played with dd'ing the image, but never got it to work, so I was wondering what that dsl option <apps/tools/Make MyDSL CD Remaster> did.  It sounded to me like 'make my current dsl configuration an image'....

Posted by ^thehatsrule^ on Mar. 27 2008,17:10
Quote
I played with dd'ing the image, but never got it to work,
Yes, you'll want to use `dd` or some similar imaging program.  There were some users that have posted about it here before, and iirc someone also posted some scripts.  Of course, you could always look up the specific program documentation for it.  You'll need some way of transferring the image though (i.e. enough space left on your usb stick)

Quote
so I was wondering what that dsl option <apps/tools/Make MyDSL CD Remaster> did.  It sounded to me like 'make my current dsl configuration an image'....
Looking it up could also help you here if you don't understand the title.

Posted by xlancealotx on Mar. 27 2008,17:41
Did do the dd a while back;
ex. dd if=/dev/hda1 of=image.img, after time you get the 200mb image written, etc. but when I would reverse it, it would create the partition, but empty.  Since I have this device and it's not running out the door, I have the luxury of a week to get it the way I want.

Thanks again for all the help / support.

Lr

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.