Author Topic: Problems crosscompiling ... sample apps ...  (Read 4076 times)

Martin

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Problems crosscompiling ... sample apps ...
« on: October 20, 2004, 03:56:10 am »
Hi ...

I'm new with crosscompiling for Z (c860) pdaxrom 1.0.5 ... installed SDK ... following instructions on pdaxrom ... trying to compile sample apps newvox ...

using runzgcc.sh for ... getting problems with running make ... after using special "./configure ..." line ... seems everything ok ?! ... but make running into errors ..

Any help or explanations why and what running wrong?

Normal compile running good without problems ... using SuSE 9.1 with gcc 3.3.3

THANKS very much
Martin

-------------------------------- configure output --------------------------------
sh-2.05b$ pwd
/home/mazi1802/Desktop/ZAURUS-Dateien/ZAURUS-ARM-cross-compile/newvox-1.0
sh-2.05b$ ./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include --x-libraries=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib --disable-debug --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/mazi1802/Desktop/ZAURUS-Dateien/ZAURUS-ARM-cross-compile/newvox-1.0/missing: Unknown`--run' option
Try `/home/mazi1802/Desktop/ZAURUS-Dateien/ZAURUS-ARM-cross-compile/newvox-1.0/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for armv5tel-cacko-linux-strip... armv5tel-cacko-linux-strip
checking for armv5tel-cacko-linux-gcc... armv5tel-cacko-linux-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether armv5tel-cacko-linux-gcc accepts -g... yes
checking for armv5tel-cacko-linux-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of armv5tel-cacko-linux-gcc... gcc3
checking for sdl-config... /opt/arm/3.3.2/bin/sdl-config
checking for SDL - version >= 1.0.1... cross compiling; assumed OK...
yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands

----------------------------- make output -------------------------------
sh-2.05b$ make
if armv5tel-cacko-linux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"newvox\" -DVERSION=\"1.0\"  -I. -I.     -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT -MT newvox.o -MD -MP -MF ".deps/newvox.Tpo" \
  -c -o newvox.o `test -f 'newvox.c' || echo './'`newvox.c; \
then mv ".deps/newvox.Tpo" ".deps/newvox.Po"; \
else rm -f ".deps/newvox.Tpo"; exit 1; \
fi
armv5tel-cacko-linux-gcc  -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT   -o newvox  newvox.o  -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libX11.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, notfound (try using -rpath or -rpath-link)
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libXext.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMProtocols'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMIconName'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XShmDetach'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetErrorDatabaseText'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWindowBackground'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetTransientForHint'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XListPixmapFormats'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGrabKeyboard'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSync'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XDefineCursor'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFreeCursor'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XChangePointerControl'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMapWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetVisualInfo'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCloseDisplay'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XIconifyWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XRaiseWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XPending'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetClassHint'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetModifierMapping'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreateSimpleWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XESetEventToWire'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreateImage'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XextAddDisplay'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFreeColormap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetWindowAttributes'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XResizeWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFreeGC'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XKeysymToKeycode'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XAllocSizeHints'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMoveResizeWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XDeleteProperty'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XStoreColors'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGrabPointer'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetWMHints'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XFlushGCCache'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XStringListToTextProperty'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XLookupString'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMoveWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSendEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XQueryPointer'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMHints'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMName'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XReparentWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFree'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFreeModifiermap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFreeColors'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XAllocClassHint'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetErrorHandler'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetIOErrorHandler'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XReadPad'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XChangeProperty'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XDestroyWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XQueryKeymap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWindowColormap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XKeycodeToKeysym'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreateColormap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XextFindDisplay'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XReply'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XShmCreateImage'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XChangeWindowAttributes'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XShmPutImage'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMatchVisualInfo'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWindowBackgroundPixmap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XShmAttach'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMaskEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XPeekEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCheckTypedEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XQueryColors'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMNormalHints'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XextCreateExtension'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetPointerControl'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XSetLastRequestRead'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XEatData'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XFlush'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XInternAtom'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XAllocColor'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreatePixmapCursor'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XShmQueryExtension'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XFlush'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreateWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XNextEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XSend'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSelectInput'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `_XRead'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetWMName'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XextRemoveDisplay'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XEventsQueued'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XClearWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XDisplayName'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMissingExtension'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XWarpPointer'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XUngrabKeyboard'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreatePixmapFromBitmapData'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XUngrabPointer'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XESetWireToEvent'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XPutImage'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreatePixmap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XUnmapWindow'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XAllocWMHints'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XGetWMIconName'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XCreateGC'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XOpenDisplay'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XInstallColormap'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XMapRaised'
collect2: ld returned 1 exit status
make: *** [newvox] Fehler 1


----------------------------- end outputs --------------------------------
--------------------------------------------------------
sl-c860 /w pdaXrom 1.1.0 Kathrin r121
CF 1GB , SD 2GB + 1GB + 512MB , MMC 512MB
Netgear MA701 WLAN 801b
Asus WL-HDD2.5 (very nice thing) /w 60 GB
--------------------------------------------------------
PC/Notebook SuSE 10.1 Prof. / KDE3.5.4
VDR /w KnoppMyth R5C7 (/w Myth 0.19)
--------------------------------------(August 2006)---

pgas2

  • Newbie
  • *
  • Posts: 31
    • View Profile
Problems crosscompiling ... sample apps ...
« Reply #1 on: October 20, 2004, 02:51:32 pm »
libX11.so.6 missing.
it misses the path to the x library

have you used configure with --x-includes and --x-libraries options?

BVer

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #2 on: October 20, 2004, 08:50:23 pm »
Quote
warning: libX11.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, notfound (try using -rpath or -rpath-link)
Hi,

It looks like the linker does not know $(BASEDIR)/armv5tel-cacko-linux/X11R6/lib path, using only $(BASEDIR)/armv5tel-cacko-linux/lib.

You can try manually invoke the compilation on cmdline with -L and -W:

/opt/arm/3.3.2/armv5tel-cacko-linux-gcc  -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT   -o newvox  newvox.o  -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib

It would generate the zaurus executable ´newvox´. If so, the ./configure process should be fixed.

hope it helps.
-bver
z: c860 pdaXrom 1.1.0 RC8
pc: Gentoo 2004.2

offroadgeek

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
    • View Profile
    • https://www.oesf.org
Problems crosscompiling ... sample apps ...
« Reply #3 on: November 04, 2004, 02:08:25 am »
i'm getting the same error when trying to compile the sample app:

Code: [Select]
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libX11.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libXext.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, not found (try using -rpath or -rpath-link)

when I run your suggestion, I get the following error:
Code: [Select]
sh-2.05b# /opt/arm/3.3.2/armv5tel-cacko-linux-gcc -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT -o newvox newvox.o -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib
sh: /opt/arm/3.3.2/armv5tel-cacko-linux-gcc: No such file or directory

any suggestions?
Search the OESF Wiki
C1000 w/Cacko 1.23 beta (from Streamline) / 760 pdaxrom rc9 / 6000L (thanks Santa's elf!) / 5500 - OZ 3.3.5 / SIMpad SL4
1GB, 256mb SanDisk CF / 2x 1GB, 512mb, 256mb, 128mb SanDisk SD
Ambicom WL100C-CF wifi / Socket 56k CF modem / AmbiCom BT2000-CF (x2)
Pocketop keyboard, Piel Frama case (1000 & 5500), PDAir case (760 & 1000)
sip:536093@fwd.pulver.com
| OESF | ELSI | Zaurus User Group | ZaurusThemes |

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #4 on: November 04, 2004, 02:15:28 am »
for  the second error: the path to arm gcc executable is wrong

I think /opt/arm/3.3.2/armv5tel-cacko-linux-gcc
should be something like
opt/arm/3.3.2/armv5tel-cacko-linux/bin/armv5tel-cacko-linux-gcc

or where ever you the arm gcc is
SLC-860 cacko / senao wifi

Dracula

  • Newbie
  • *
  • Posts: 23
    • View Profile
Problems crosscompiling ... sample apps ...
« Reply #5 on: November 04, 2004, 02:15:31 am »
i didn't try 1.05 SDK but i guess the g++ executables are located in /opt/arm/3.3.2/bin instead of /opt/arm/3.3.2

offroadgeek

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
    • View Profile
    • https://www.oesf.org
Problems crosscompiling ... sample apps ...
« Reply #6 on: November 04, 2004, 02:48:46 am »
thanks pgas and dracula, that led me into the right direction

here's what I used
Code: [Select]
/opt/arm/3.3.2/armv5tel-cacko-linux/bin/gcc -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT -o newvox newvox.o -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/libworked great..
« Last Edit: November 04, 2004, 02:49:09 am by offroadgeek »
Search the OESF Wiki
C1000 w/Cacko 1.23 beta (from Streamline) / 760 pdaxrom rc9 / 6000L (thanks Santa's elf!) / 5500 - OZ 3.3.5 / SIMpad SL4
1GB, 256mb SanDisk CF / 2x 1GB, 512mb, 256mb, 128mb SanDisk SD
Ambicom WL100C-CF wifi / Socket 56k CF modem / AmbiCom BT2000-CF (x2)
Pocketop keyboard, Piel Frama case (1000 & 5500), PDAir case (760 & 1000)
sip:536093@fwd.pulver.com
| OESF | ELSI | Zaurus User Group | ZaurusThemes |

donk0yote

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #7 on: November 10, 2004, 10:24:47 pm »
BVer,
i had same problem trying to crosscompile this and although i see how to get it compiled,
i'm wondering what the fix should be to make crosscompile work correctly.......if the ld program isn't recognizing the env variables does that mean the ld needs to be replaced/recompiled? i'm using the rc5 crosscompile package........
SL-C860,pdaXrom 1.1.0beta1, Socket CF 802.11
SL-5500, Sharp Rom

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #8 on: November 11, 2004, 03:41:56 pm »
With the Rc5 you have to replace 3.3.2 by 3.3.2-vfp in configure option
SLC-860 cacko / senao wifi

donk0yote

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #9 on: November 11, 2004, 08:52:35 pm »
well i obviously don't know anything about programing....  
i was thinking the crosscompile tools set would pass all the needed enviroment variables to the configure program, then i wouldn't need the big long options string......
so i changed the shell script , ( ./runzgcc-vfp.sh) fixed the 3.3.2-vfp and tried it, still no...
i changed the 3.3.2  to 3.3.2-vfp in the options passed to configure, didn't work.. seems the only way to compile this is as offroadgeek did....so is that because this particular programs' configure script won't play nice or because there is some thing not set right in the crosscompile tool set?.........school me please
another problem i have is one program i've been trying to compile is configure fails because
it can't run uname -r??
the crosscompile tool set is setting the variables correctly, i think, here is what i get:
<snip>
checking build system type... i686-pc-linux-gnu
checking host system type... armv5tel-cacko-linux-gnu
checking target system type... armv5tel-cacko-linux-gnu
<snip>
then it fails with:
checking Linux
configure: error: cannot determine linux version when cross-compiling
but if i type this:
sh-2.05b$ uname -r
i get:
2.6.5-7.108-default
which is the uname for my desktop

anyway the program i was trying to compile was libpcap and i found one pre-compiled.....it finally dawned on me that since it doesn't need x that the ones for cacko would work.
if i'm wrong, please tell me.

thanks
SL-C860,pdaXrom 1.1.0beta1, Socket CF 802.11
SL-5500, Sharp Rom

BVer

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #10 on: November 13, 2004, 06:07:57 am »
donk0yote,

Quote
i was thinking the crosscompile tools set would pass all the needed enviroment variables to the configure program, then i wouldn't need the big long options string......

you are absolutely right.
when both crosscompile tools and configure process are correct and in sync, you need not long options when invoking commands. my previous post was adressed to Martin who was trying to compile newvox demo and his linker could not find libSDL.so library.
i observe similar behavior when repeating his steps. so i am wondering if the cause of linking error (incorrect LIBS setting in Makefile?) is the same.

Quote
if the ld program isn't recognizing the env variables does that mean the ld needs to be replaced/recompiled?

i don´t think so. the ld linker does not recognise env. variables itself, they are passed to ld by gcc (ie. armv5tel-cacko-linux-gcc) and gcc knows these settings from Makefile. the Makefile is generated during the ./configure process.
the probable reason of our problems IMHO is some incompatibility between runzgcc-vfp.sh (which correctly sets X11LIB variable) and configure scripts for particular example (newvox in my and Martin´s case).

perhaps the source package we use is not ready for somehow newer crosscompiling process or we use wrong ./configure options.
in my case these options are:

export CC=/opt/arm/3.3.2-vfp/bin/armv5tel-cacko-linux-gcc
./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=/opt/arm/3.3.2-vfp/armv5tel-cacko-linux/X11R6/include --x-libraries=/opt/arm/3.3.2-vfp/armv5tel-cacko-linux/X11R6/lib --disable-debug --prefix=/usr/local

...and subsequent ´make´ produces linking errors.

another strange thing is the need for explicit exporting CC variable. it sould be done either by runzgcc-vfp.sh or by ./configure.
we were warned enough.

as for uname problem:
if you have working uname but the configure fails, try to understand how ./configure processes the uname output and determines the linux version. it can be some issue with commands following uname (like sed, etc.)

hey, i am also new in crossompiling; coud some pdaXrom guru be of assistance?
-bver
z: c860 pdaXrom 1.1.0 RC8
pc: Gentoo 2004.2

donk0yote

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #11 on: November 13, 2004, 08:20:06 am »
BVer,
thanks for the input, you confirm some of my suspicions...i wish i understood much more than i do...if i can get the crosscompiler to work - or i could understand what is going wrong when it doesn't, i could contribute something to the pdaxrom users....

>if you have working uname but the configure fails

i wonder if there needs to be a uname in the crosscompiler's ../bin?
but then i wonder why if the host and target variables are set, why configure should care?

anyway hoping someone might  
SL-C860,pdaXrom 1.1.0beta1, Socket CF 802.11
SL-5500, Sharp Rom

BVer

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #12 on: November 14, 2004, 03:23:28 pm »
donk0yote (and all),

it seems the crosscompilling will be better supported on pdaXrom website and we all should be just more patient:

Laze's posts:
Quote
... We might also built the entire documentation and faq around wiki... the entire developer section will be released with turtorials/examples/documentation etc,...

right now it looks like the 'newvox' demo is not as 'up to date' as it could be for the 3.3.2-vfp state of the art. it is not a fatal flaw: if you can write your own Makefiles for your project and autoconf-it later, you can fix and cook up things somehow.

but i agree with you on:
Quote
if i can get the crosscompiler to work - or i could understand what is going wrong when it doesn't, i could contribute something to the pdaxrom users....

... a good/working demo for crosscompiling newbies (removing such roadblocks) should really speed up an entire development for pdaXrom, which is great platform anyway.

hope we see all promised changes soon!
-bver
z: c860 pdaXrom 1.1.0 RC8
pc: Gentoo 2004.2

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Problems crosscompiling ... sample apps ...
« Reply #13 on: November 14, 2004, 05:01:30 pm »
As it has been said in an other thread I'm afraid that there is no way to give a generic method to make every cross-compilation work.

It is true that it is a bad thing that the sample doesn't work out of the box, but lots of configure scripts don't take cross compilation into account  and won't work whatever option you give to them. (configure script sometimes compiles small programs and try to run them to check an option for instance)

As for what to look if if fails you should read a bit about gcc (and its different options) Makefile, shell scripting, autoconf etc... You don't need to have a extensive knowledge about these (I for one surely don't) but  you should try to get a general idea of what's going on and try to find the cause of the problems you run into in the docs...

things that I do often:
* comment out part of the configure the script to bypass some test (or set the response from no to yes when I know that the answer should be yes even if the script says no)
* edit the generated Makefiles to modify include path libs etc...
SLC-860 cacko / senao wifi