Author Topic: Help with error which only occurs in Xqt terminals  (Read 3724 times)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« on: February 28, 2004, 06:25:03 pm »
I just tried to run Octave and R inside Xqt. Octave is completely terminal based, and R is mainly a terminal program which can generate graphical elements which require X11.

Anyway I can start both programs just fine from outside Xqt (in konsole), but as soon as I try to run either inside Xqt (in rxvt or xterm) I get the following error (same error for both octave and R, but obviously different paths and names):

# octave
/usr/local/bin/octave-2.1.50: relocation error: /usr/local/bin/octave-2.1.50: undefined symbol: __div0

This reminds me of some troubles I had a while back when I was compiling against one version of libncurses and then trying to use another while running, but in this case I can\'t see that that is the case. LD_LIBRARY_PATH is the same both inside and outside Xqt.

I am running OZ 3.3.6pre1 (compiled with GCC3.x, using libc2.3.x), both octave and R were compiled with GCC3.3.2 and linked against libc2.3 with the latest OZ GCC3 cross toolchain.

Does anyone know what this signifies and why it only happens inside Xqt?

Thanks,


Simon
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #1 on: March 02, 2004, 07:30:41 am »
bump
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #2 on: March 03, 2004, 04:51:28 pm »
Right, even if I run an old version of Octave (2.0.17) which I compiled using GCC 2.95.3 I still get the same error.

What on earth is causing this? Has no-one else experienced this?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Help with error which only occurs in Xqt terminals
« Reply #3 on: March 03, 2004, 05:20:57 pm »
Chances are that your LD_LIBRARY_PATH is set differnt under konsole than it is in the xterm.  Normally, this would cause a differnet error, such as \"can\'t find library ....\", but in this case it found the libraries that it is looking for, but is picking up the wrong version of one of them.
Solution: \"echo $LD_LIBRARY_PATH\" under both konsole and your xterm, and compare.
You can also copy the ldd script from a regular linux workstation over to your Zaurus, and run \"ldd programname\" to see which libraries it\'s picking up.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #4 on: March 04, 2004, 04:40:00 am »
Under konsole and rxvt:

LD_LIBRARY_PATH=\'/opt/QtPalmtop/lib:/usr/local/lib:/usr/lib/:/lib:/usr/X11R6/lib\'

I agree that the \'undefined symbol\' part looks like the wrong lib has been loaded for some reason, but what about this \'relocation error\' thing? What does that mean or signify?


Si


P.S. As an aside, I have a strange env var in rxvt: LANG=\'ja_JP.eucJP\' is this normal or should there be fewer references to Japan there?
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

derekp

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Help with error which only occurs in Xqt terminals
« Reply #5 on: March 04, 2004, 08:23:45 am »
The \"relocation error ... undefined symbol ...\" is generally part of the same problem.  Usually occurs when ld.so has found all the libraries that a program is looking for, but one or more of the found libraries are missing functions that the program is using.  Of course, if your LD_LIBRARY_PATH is the same in both environments, then the problem is a bit deeper.
I\'ve seen where the wrong LANG variable can cause similar problems (on other unix\'s).  If that\'s the case (either unset LANG or export LANG=C), then it is because one of the libraries is dynamicly linking to, i.e., a language library that will vary depending on the LANG setting.

Try dumping the whole environment from konsole (env ]/tmp/env.works), and sourcing it in rxvt (eval `cat /tmp/env.works`).  This will make both sides match (or at least, rxvt will have everything that konsole has, plus any additional variables that were already defined).

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #6 on: March 04, 2004, 11:10:15 am »
I will try that, but I think I may have bigger problems to do with the keyboard. I used to be able to get a bracket after pressing fn a couple of times. I can\'t any longer.

In fact I now get numbers almost everywhere with the fn key I get the following:

Normal:
7 instead of \'

with shift:
+ instead of ;
* instead of :

with fn:
1 instead of !
3 instead of #
4 instead of $
5 instead of %
6 instead of &
8 instead of (
9 instead of )


Random.

This has stopped me from trying your script (no \' available). I\'ll try reinstalling and go from there.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Help with error which only occurs in Xqt terminals
« Reply #7 on: March 04, 2004, 12:16:04 pm »
Maybe Xqt has already loaded (or has statically linked) the wrong version of the library? Then Octave may be using the version of the library loaded by Xqt rather than dynamically loading a new version?

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #8 on: March 04, 2004, 12:28:44 pm »
Yes, it could be a static linking thing. I\'ll look at the source (and try to compile it for opie/libc2.3 anyway).

Cheers guys, I\'ll let you know how it goes.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #9 on: March 04, 2004, 02:34:06 pm »
Very random. I uninstalled, then re-installed everything and this time I put thing which were supposed to be installed to / in / (it doesn\'t behave any differently, I still had to chmod +x the X11R6 file somewhere under /etc/X11/).

Now I don\'t have any more relocation errors, but I still have a funny keyboard. I\'m wondering if this has something to do with my running as root all the time.

I\'ll post a question on the main Xqt thread.

Cheers,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
Help with error which only occurs in Xqt terminals
« Reply #10 on: June 29, 2004, 12:21:41 pm »
Did you manage to get octave working under x/qt? I can't seem to unpack the octave .ipk  It says under console that the file isn't in .ipk format. How do i install files like these?
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help with error which only occurs in Xqt terminals
« Reply #11 on: July 01, 2004, 06:25:29 am »
Yes it worked fine.

The version you downloaded is probably in ar format.

I don't have access to the ftp server at the moment otherwise I'd fix the link to 1.9.x and change the format.

Give me a couple of days and I'll try to get it sorted.


Si

P.S. BTW Octave is command line, it's just gnuplot which uses X (and it can be run outside of X too to produce pngs instead)
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
Help with error which only occurs in Xqt terminals
« Reply #12 on: July 01, 2004, 06:30:32 am »
btw there is a program called qtplot (i think) which has a qtopia frontend for gnuplot. It seems to work well, although i haven't got around to using octave with it yet.
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
Help with error which only occurs in Xqt terminals
« Reply #13 on: July 02, 2004, 06:52:28 am »
Just to let people know, i manually unpacked Octave 2.0.17 onto my CF card and it ran perfectly from there! It also works perfectly with QtPlot (the Qtopia frontend for gnuplot)...  Absolutely fantastic, i took one program that did some calculations with the wave equation that i had developed on Matlab last year, and up it came on the graph exactly the same....   Fantastic!    I also got ZGCC up and running last night, my Z is amazing. ;-)
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.