Author Topic: can't link x86 binaries for testing in qvfb  (Read 555 times)

ceratophyllum

  • Newbie
  • *
  • Posts: 11
    • View Profile
can't link x86 binaries for testing in qvfb
« on: January 07, 2020, 11:31:08 am »
So I set up SuSE 8.2 in VirtualBox and installed the RPMs located here:
http://www.ossh.com/zaurus/mirrors/docs.za...tup_howto.shtml

No funny errors or warnings; they just installed.

I can build the example for arm and I was able to compile Frotz 2.50 (dumb version; ncurses is a mess).
I tested and the arm dfrotz binary works fine on my Zaurus.

However, I when I try to build the x86 example binary for testing in qvfb, I get a bunch of undefined symbols when gcc tries to link it.

Am I missing some RPMs?

qvfb works with the prebuilt binaries in /opt/Qtopia/bin and it would sure speed things up to be able to build things and test them without having to transfer them to the Zaurus.

Here is some of the output:

Code: [Select]
ld: warning: cannot find entry symbol _start; defaulting to 0000000008048270
main.o(.text+0x1e): In function `main':
: undefined reference to `QPEApplication::QPEApplication(int&, char**, QApplication::Type)'
main.o(.text+0x3f): In function `main':
: undefined reference to `QPEApplication::showMainWidget(QWidget*, bool)'
main.o(.text+0x47): In function `main':
: undefined reference to `QPEApplication::exec()'
main.o(.text+0x5a): In function `main':
: undefined reference to `QPEApplication::~QPEApplication()'
main.o(.gnu.linkonce.t._ZN7QGArrayaSERKS_+0x5): In function `QGArray::operator=(QGArray const&)':
: undefined reference to `QGArray::assign(QGArray const&)'
main.o(.gnu.linkonce.t._ZN7QGArray6detachEv+0xc): In function `QGArray::detach()':
: undefined reference to `QGArray::duplicate(QGArray const&)'
main.o(.gnu.linkonce.t._ZN11QStringDataD2Ev+0x35): In function `QStringData::~QStringData()':
: undefined reference to `operator delete[](void*)'
main.o(.gnu.linkonce.t._ZN11QStringDataD2Ev+0x28): In function `QStringData::~QStringData()':
: undefined reference to `operator delete[](void*)'
main.o(.gnu.linkonce.t._ZN11QStringDataD1Ev+0x35): In function `QStringData::~QStringData()':
: undefined reference to `operator delete[](void*)'
main.o(.gnu.linkonce.t._ZN11QStringDataD1Ev+0x28): In function `QStringData::~QStringData()':
: undefined reference to `operator delete[](void*)'
main.o(.gnu.linkonce.t._ZNK7QString8containsEcb+0x1f): In function `QString::contains(char, bool) const':
: undefined reference to `QString::contains(QChar, bool) const'
main.o(.gnu.linkonce.t._ZN7QString6insertEjc+0x1d): In function `QString::insert(unsigned, char)':
: undefined reference to `QString::insert(unsigned, QChar)'
main.o(.gnu.linkonce.t._ZNK7QString2atEj+0x13): In function `QString::at(unsigned) const':
: undefined reference to `QChar::null'
main.o(.gnu.linkonce.t._ZN7QString3refEj+0x18): In function `QString::ref(unsigned)':
: undefined reference to `QString::subat(unsigned)'
main.o(.gnu.linkonce.t._ZNK7QStringcvPKcEv+0x5): In function `QString::operator char const*() const':
: undefined reference to `QString::latin1() const'
main.o(.gnu.linkonce.t._ZN7QString7compareERKS_S1_+0x5): In function `QString::compare(QString const&, QString const&)':
« Last Edit: January 07, 2020, 11:39:09 am by ceratophyllum »

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1166
    • View Profile
can't link x86 binaries for testing in qvfb
« Reply #1 on: January 09, 2020, 05:52:39 am »
Just a quick check: are you switching to the x86 environment variables with the dev-x86-qpe.sh script, and running again tmake to rebuild the Makefile before attempting to compile the binary?

It would be great if you could release any package you manage to compile, in case anyone would need them. I can setup on the OESF's server a public feed with all the stuff you'd like to share, just let me know.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

ceratophyllum

  • Newbie
  • *
  • Posts: 11
    • View Profile
can't link x86 binaries for testing in qvfb
« Reply #2 on: January 09, 2020, 10:18:00 am »
Quote from: Varti
Just a quick check: are you switching to the x86 environment variables with the dev-x86-qpe.sh script, and running again tmake to rebuild the Makefile before attempting to compile the binary?

It would be great if you could release any package you manage to compile, in case anyone would need them. I can setup on the OESF's server a public feed with all the stuff you'd like to share, just let me know.

Varti
Yes, I read the directions and followed them. It looks like someone else--using a distro from around the same time--has had this problem:
https://www.oesf.org/forum/index.php?showtopic=2045

It is probably because the distro's x86 gcc 3.2 is too new. The arm-linux-gcc is 2.92.2. It is suggested in the post above that upgrading to qtopia-free 1.7 will fix things for gcc 3.x.
Unfortunately, qtopia-free-1.7.0-2rh9.i386.rpm is noplace. Everyone just has a broken link to ftp.trolltech.com.
« Last Edit: January 09, 2020, 10:25:16 am by ceratophyllum »

ceratophyllum

  • Newbie
  • *
  • Posts: 11
    • View Profile
can't link x86 binaries for testing in qvfb
« Reply #3 on: January 09, 2020, 11:03:16 am »
Quote from: ceratophyllum
Quote from: Varti
Just a quick check: are you switching to the x86 environment variables with the dev-x86-qpe.sh script, and running again tmake to rebuild the Makefile before attempting to compile the binary?

It would be great if you could release any package you manage to compile, in case anyone would need them. I can setup on the OESF's server a public feed with all the stuff you'd like to share, just let me know.

Varti
Yes, I read the directions and followed them. It looks like someone else--using a distro from around the same time--has had this problem:
https://www.oesf.org/forum/index.php?showtopic=2045

It is probably because the distro's x86 gcc 3.2 is too new. The arm-linux-gcc is 2.92.2. It is suggested in the post above that upgrading to qtopia-free 1.7 will fix things for gcc 3.x.
Unfortunately, qtopia-free-1.7.0-2rh9.i386.rpm is noplace. Everyone just has a broken link to ftp.trolltech.com.

Ok, it definitely is the compiler. The problem is in dev-x86-qpe.sh.  It is assuming you have gcc 2.9XXX installed in /usr/local/x86and putting this path at the beginning of $PATH. Since I don't have that, it just picks up the distro's gcc 3.3 farther down in the PATH list.

I guess /usr/local/x86 was where RedHat put it's "compat" version of gcc2.

Fortunately, I found binaries of gcc 2.96.3  in here https://feed-zaurus.dahwa.fr/zaurusfr/sdk/Embedix.tgz .To get things working, I just extracted the archive and put ~/Embedix/native/bin at the beginning of the PATH= line in dev-x86-qpe.sh.