Problems with Programming the BS2 on Linux
SB316
Posts: 33
Hi all,
Just recently I tried to download and install the "Basic Stamp Linux Software" that is linked to from Parallax's Basic Stamp downloads page. I've since tried to install and run it several times, but when I run bstamp_tokenize from the terminal, I get these errors:
/usr/local/lib/libbstamptokenizer.so: undefined symbol: __gxx_personality_v0: Success
./tokenizer.so: cannot open shared object file: No such file or directory: Success
Sometimes it's only one of them, but it never seems to work. I've deleted and reinstalled all the files several times, but it doesn't work. I tried adding /usr/local/lib to the LD_LIBRARY_PATH variable. I looked up the top error and found that that sometimes happens when files don't link right with libstdc++. I found where that was and added that to LD_LIBRARY_PATH. Nothing.
Can anyone help me with this?
Thanks,
SB316
P.S. I'm running Ubuntu 11.10
Parallax Downloads Page: http://www.parallax.com/tabid/441/Default.aspx
Basic Stamp Linux Software Page: http://bstamp.sourceforge.net/
Just recently I tried to download and install the "Basic Stamp Linux Software" that is linked to from Parallax's Basic Stamp downloads page. I've since tried to install and run it several times, but when I run bstamp_tokenize from the terminal, I get these errors:
/usr/local/lib/libbstamptokenizer.so: undefined symbol: __gxx_personality_v0: Success
./tokenizer.so: cannot open shared object file: No such file or directory: Success
Sometimes it's only one of them, but it never seems to work. I've deleted and reinstalled all the files several times, but it doesn't work. I tried adding /usr/local/lib to the LD_LIBRARY_PATH variable. I looked up the top error and found that that sometimes happens when files don't link right with libstdc++. I found where that was and added that to LD_LIBRARY_PATH. Nothing.
Can anyone help me with this?
Thanks,
SB316
P.S. I'm running Ubuntu 11.10
Parallax Downloads Page: http://www.parallax.com/tabid/441/Default.aspx
Basic Stamp Linux Software Page: http://bstamp.sourceforge.net/
Comments
I'm running 11.10 on an IBM laptop. I just downloaded the stamp software. I do not have a RS232 port so I will use the USB adapter to go to RS232. Give me a few days to figure this out. I tired pbasic on my Gentoo box and it did not work. As you know Gentoo is highly customizable and fast but the packages lag a bit behind Ubuntu.
root@io:~# uname -a
Linux io 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux
I take that back: I'm two kernels behind on my gentoo build and I'm running 3.0.6. I rebuild my kernel as needed.
Thanks for your reply,
SB316
This is the symlink I'm having troube with:
cd /dev
ln -s ttyS# bstamp
I'm not sure what value (integer) to repalce for #
Also look at my persmissions for the following:
root@io:/usr/local/lib# ls -l
total 108
-rw-r--r-- 1 root root 102464 2012-02-02 08:42 libbstamptokenizer.so
drwxrwsr-x 4 root staff 4096 2011-10-12 08:27 python2.7
I did this:
root@io:/usr/local/lib# chmod +x libbstamptokenizer.so
root@io:/usr/local/lib# ls -l
total 108
-rwxr-xr-x 1 root root 102464 2012-02-02 08:42 libbstamptokenizer.so
drwxrwsr-x 4 root staff 4096 2011-10-12 08:27 python2.7
You do not integrate this into your code: ln -s ttyS# bstamp. I'm still trying to get this to work:
cwc@io:~$ bstamp_run
Error: Could not open /dev/bstamp for reading/writing!
cwc@io:~$
root@io:/dev# ls -s ttyS
ttyS0 ttyS12 ttyS16 ttyS2 ttyS23 ttyS27 ttyS30 ttyS6
ttyS1 ttyS13 ttyS17 ttyS20 ttyS24 ttyS28 ttyS31 ttyS7
ttyS10 ttyS14 ttyS18 ttyS21 ttyS25 ttyS29 ttyS4 ttyS8
ttyS11 ttyS15 ttyS19 ttyS22 ttyS26 ttyS3 ttyS5 ttyS9
root@io:/dev# ls -s ttyS0
Display all 212 possibilities? (y or n)
root@io:/dev# ls -s ttyS0
Display all 212 possibilities? (y or n)
root@io:/dev# ls -s ttyS0 bstamp
ls: cannot access bstamp: No such file or directory
0 ttyS0
root@io:/dev# ls -s ttyS1 bstamp
ls: cannot access bstamp: No such file or directory
0 ttyS1
root@io:/dev# ls -s ttyUSB0 bstamp
ls: cannot access bstamp: No such file or directory
0 ttyUSB0
I might need to configure the USB to RS232
You, my friend, are using `ls` which is a "list" command for displaying contents of a folder. What you should be using is `ln` which is the "link" command to make symbolic links.
I have this same problem and I haven't changed much about my setup, so I'll be posting back when I figure out what the problem is.
/cheers
alternatively you could add the following to bstamp_tokenize.cpp
extern "C" void __gxx_personality_v0();
if (argc < 0) __gxx_personality_v0();
and do the make make install
that will generate a reference to the needed module, and the never-true "if" won't actually ever call it ....