Author Topic: Nonnative Native Compiliation?  (Read 1912 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Nonnative Native Compiliation?
« on: May 25, 2007, 10:57:25 pm »
Is it possible to do nonnative-native compilation using QEMU, like running pdaXrom (not pdaX86) in QEMU full system emulation, compiling, then mounting the rootfs to take the files off of it? It seems like it would go faster than native compilation and avoid the issues with cross-compilation.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Nonnative Native Compiliation?
« Reply #1 on: May 26, 2007, 04:23:40 am »
there is a thread in this forum about semi-native compilation (by pgas).
If you want to avoid the cross-compiler problems and look for speed, check that one.

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Nonnative Native Compiliation?
« Reply #2 on: May 26, 2007, 11:57:17 am »
Quote
there is a thread in this forum about semi-native compilation (by pgas).
If you want to avoid the cross-compiler problems and look for speed, check that one.

Chero.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=162069\"][{POST_SNAPBACK}][/a][/div]
I did try that. It still had issues with something "not in the right form" or something like that.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

realm

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • http://
Nonnative Native Compiliation?
« Reply #3 on: May 26, 2007, 06:00:03 pm »
this type of error?

armv5tel-cacko-linux-g++ -Os -fomit-frame-pointer -I/opt/cross/arm/3.4.6-xscale-
softvfp-akita/armv5tel-cacko-linux/include -DSHAPE -I/opt/cross/arm/3.4.6-xscale
-softvfp-akita/armv5tel-cacko-linux/include -I/opt/cross/arm/3.4.6-xscale-softvf
p-akita/armv5tel-cacko-linux/include/freetype2 -o fluxbox ArrowButton.o FbAtoms.
o FbWinFrame.o FbWinFrameTheme.o fluxbox.o Keys.o main.o Netizen.o RootTheme.o F
bRootWindow.o Screen.o ScreenResources.o Slit.o SlitTheme.o SlitClient.o WinButt
on.o WinButtonTheme.o Window.o Workspace.o FbCommands.o IntResMenuItem.o FbMenu.
o WinClient.o Xutil.o CurrentWindowCmd.o WorkspaceCmd.o CommandParser.o FbComman
dFactory.o Shape.o MenuTheme.o Container.o TextTheme.o BorderTheme.o CommandDial
og.o SendToMenu.o Parser.o FbMenuParser.o StyleMenuItem.o RootCmdMenuItem.o Menu
Creator.o IconMenu.o WorkspaceMenu.o HeadArea.o Resources.o Ewmh.o Remember.o Re
gExp.o ClientPattern.o Toolbar.o ToolbarTheme.o ToolbarItem.o ClockTool.o Worksp
aceNameTool.o IconbarTool.o IconbarTheme.o ToolTheme.o IconButton.o SystemTray.o
 GenericTool.o ButtonTool.o ButtonTheme.o ToolFactory.o  -L/opt/cross/arm/3.4.6-
xscale-softvfp-akita/armv5tel-cacko-linux/lib /usr/lib/libSM.so /usr/lib/libICE.
so FbTk/libFbTk.a /usr/lib/libXft.so /opt/cross/arm/3.4.6-xscale-softvfp-akita/a
rmv5tel-cacko-linux/lib/libfontconfig.so /usr/lib/libexpat.so /usr/lib/libXrende
r.so /usr/lib/libXpm.so /opt/cross/arm/3.4.6-xscale-softvfp-akita/armv5tel-cacko
-linux/lib/libImlib2.so /opt/cross/arm/3.4.6-xscale-softvfp-akita/armv5tel-cacko
-linux/lib/libfreetype.so -lz /usr/lib/libX11.so /usr/lib/libXext.so -ldl -lm /u
sr/lib/libXrandr.so -Wl,--rpath -Wl,/opt/cross/arm/3.4.6-xscale-softvfp-akita/ar
mv5tel-cacko-linux/lib -Wl,--rpath -Wl,/opt/cross/arm/3.4.6-xscale-softvfp-akita
/armv5tel-cacko-linux/lib
/usr/lib/libSM.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[5]: *** [fluxbox] Error 1
make[5]: Leaving directory `/pdaXrom/myrom/build/fluxbox-0.9.12/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/pdaXrom/myrom/build/fluxbox-0.9.12/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/pdaXrom/myrom/build/fluxbox-0.9.12/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/pdaXrom/myrom/build/fluxbox-0.9.12'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/pdaXrom/myrom/build/fluxbox-0.9.12'
make: *** [/pdaXrom/myrom/state/fluxbox.compile] Error 2


it comes from trying to link against local libraries instead of they cross compiler lib's i'm trying to figure out what part of the config is making some packages try and link against sys libs like this also.
SL-C860   r197
SL-C3000 Angstrom with e17 /1 Gig SD/Senao Wifi/CF Bluetooth/CF GPS

realm

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • http://
Nonnative Native Compiliation?
« Reply #4 on: May 26, 2007, 06:40:52 pm »
this link has how to fix the linking error posted in my last post, if that link goes away its because the blah.la file in the cross compiler directory says blah.so lives in /usr/lib in its libdir var, change that var in blah.la when you link the lib and you should be good to go.

http://metastatic.org/text/libtool.html

so to apply this to the pdaxrom build system just create a .la file for each library that isn't linking correctly, etc /usr/lib/libSM.so is what you error trying to link against, the default path for the pdaxrom cross compiler libs is /opt/cross/arm/3.4.6-xscale-softvfp-akita/armv5tel-cacko-linux/lib so do something like

cp libglut.la libSM.la

then edit a few fields in your new libSM.la so the linker will look in the right directory for your libs, libglut is the base i used because the important line

libdir='/opt/cross/arm/3.4.6-xscale-softvfp-akita/armv5tel-cacko-linux/lib'

is already set, so just change the name and version info and your set, a script could easily take care of all this so that
1 any .so file that doesn't have a .la file gets one made for it with the right libdir path for crosscompiling
2 any .la file with /usr/lib is changed to the crosscompiling path

all but code selftest problems should be taken care of with this, no more linking problems. anyone with more cross compiling problems like this please post
« Last Edit: May 27, 2007, 09:16:21 pm by realm »
SL-C860   r197
SL-C3000 Angstrom with e17 /1 Gig SD/Senao Wifi/CF Bluetooth/CF GPS