maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Scratchbox QEMU Errors? (https://talk.maemo.org/showthread.php?t=11541)

penguinbait 2007-11-10 00:09

Scratchbox QEMU Errors?
 
When running scratchbox with either 3.2 or 4.0 I can not compile QT4.3

It throws several errors

Over and over again, adding the little or big endian is no help, I am clueless :confused:

Is this just making calls that the emulator can't handle? ANY Ideas are welcome, I am sure its repeatable in your own scratcbox also....






terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238
qemu: Unsupported syscall: 268
qemu: Unsupported syscall: 238

The system byte order could not be detected!
Turn on verbose messaging (-v) to see the final report.
You can use the -little-endian or -big-endian switch to
./configure to continue.

free 2007-11-10 16:12

Re: Scratchbox QEMU Errors?
 
"Is this just making calls that the emulator can't handle"
Looks like yes
Maybe trying a newer qemu that has a better arm support?
Or you could try to replace some syscall by others but this is only doable for easy stuff.
238 and 268:

#define __NR_tkill (__NR_SYSCALL_BASE+238)
#define __NR_tgkill (__NR_SYSCALL_BASE+268)

I'll give it a try when I find a bit of time.
edit:
I think I had underestimated the size needed simply for compiling.. no more space on device :) after 1h ..
929 MB .. damned /scratchbox
meanwhile, my qemu is version 0.7, very very old... scratchbox2 would help
edit: it does compile here on the 3.2, i have run qtdemo. qt4.3.1.:confused:

penguinbait 2007-11-12 21:18

Re: Scratchbox QEMU Errors?
 
So you compiled 4.3.1 on 3.2 I got the same error on both, did you upgrade scratchbox or alter the source?

free 2007-11-13 12:09

Re: Scratchbox QEMU Errors?
 
My scratchbox is the normal one.

For qt:
As "usual" I patched it with the debian patch first, as it's supposed to be for a kindof debian target system.

http://packages.debian.org/lenny/libqt4-core
Don't know if you know debian pages,
On this page, you have the upstream and the debian patch
http://ftp.de.debian.org/debian/pool....1.orig.tar.gz
http://ftp.de.debian.org/debian/pool....3.1-2.diff.gz
It even shows that it compiles on arm, armel is unfortunatly not yet part of the debian system, thought it has been asked months ago.
Under x86 target (oops I hope that I didn't make a bad assumption from the start of this thread, that you are talking about the same target!)
Then I wanted to still compile it the debian way
debian/rules binary

But it needed some newer "quilt" tool for putting into cdbs and I was not able (and lazy) to correct the problem.

So I did the normal
./configure
make
then it failed on precompiled headers so
./configure -no-pch
make
1.3G later, it was compiled.

I'm new to this scratchbox but I'm a bit surprised that you get a qemu error during compilation. I would expect it during runtime maybe. So it must be gcc-arm that creates this or?

Are you able to locate the exact file that creates this problem?

If all you did for my tablet and for others, I'll be happy to help you. Unfortunatly I can't give you access to my box because I have no internet at home.

Bye

free 2007-11-13 18:47

Re: Scratchbox QEMU Errors?
 
So...
Back to ARMEL target :D

Using a test program, the ARM on the n800 is set to little-endian for the release 4.2007.38-2 and probably will stick to it like most arm architectures.

./configure fails to auto-detection anything, also the endianness. This seems like a critical problem.
Code:

./configure --little-endian
[...]
Code:

Reading /home/lke/src/qt-x11-opensource-src-4.3.1/demos/qtdemo/qtdemo.pro
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc
qemu: uncaught target signal 6 (Aborted) - exiting
  356 projects found.

Creating makefiles. Please wait...
  for /home/lke/src/qt-x11-opensource-src-4.3.1/src/corelib/corelib.pro
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc
qemu: uncaught target signal 6 (Aborted) - exiting
  for /home/lke/src/qt-x11-opensource-src-4.3.1/src/script/script.pro

[...]
Code:

  for /home/lke/src/qt-x11-opensource-src-4.3.1/tools/linguist/linguist/linguist.pro
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc
qemu: uncaught target signal 6 (Aborted) - exiting
  for /home/lke/src/qt-x11-opensource-src-4.3.1/tools/assistant/assistant.pro
  for /home/lke/src/qt-x11-opensource-src-4.3.1/tools/assistant/translations/translations.pro
Project ERROR: This is a dummy profile to be used for translations ONLY.

        NOTICE: Qt will not be built with XShape support.

        As a result, drag-and-drop in the Qt Designer will NOT
        work. We recommend that you enable XShape support by passing
        the -xshape switch to ./configure.

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /usr/local/Trolltech/Qt-4.3.1

To reconfigure, run 'make confclean' and 'configure'.

[sbox-SDK_ARMEL: ~/src/qt-x11-opensource-src-4.3.1] > make
make: *** No rule to make target `FORCE', needed by `sub-moc-make_default-ordered'.  Stop.

Code:

strace -s 1024 -f -F -v -o ~/src/strace.log home/lke/src/qt-x11-opensource-src-4.3.1/bin/qmake -Wall -nocache spec /home/lke/src/qt-x11-opensource-src-4.3.1/mkspecs/linux-g++ ONFIG+= 'LIBS*=' 'INCLUDEPATH*=' 'QMAKE_CXXFLAGS*=' home/lke/src/qt-x11-opensource-src-4.3.1/config.tests/unix/floatmath/floatmath.pro -o /home/lke/src/qt-x11-opensource-src-4.3.1/config.tests/unix/floatmath/Makefile
PHP Code:

22904 lstat64("/home/lke/src/qt-x11-opensource-src-4.3.1/mkspecs/features", {st_dev=makedev(32), st_ino=455297st_mode=S_IFDIR|0755st_nlink=5st_uid=1000st_gid=1000st_blksize=4096st_blocks=8st_size=4096st_atime=2007/11/14-16:09:33st_mtime=2007/11/14-01:42:54st_ctime=2007/11/14-01:42:54}) = 0
22904 open
("/home/lke/src/qt-x11-opensource-src-4.3.1/mkspecs/features"O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
22904 fstat64
(6, {st_dev=makedev(32), st_ino=455297st_mode=S_IFDIR|0755st_nlink=5st_uid=1000st_gid=1000st_blksize=4096st_blocks=8st_size=4096st_atime=2007/11/14-16:09:33st_mtime=2007/11/14-01:42:54st_ctime=2007/11/14-01:42:54}) = 0
22904 fcntl64
(6F_SETFDFD_CLOEXEC)   = 0
22904 statfs64
("/home/lke/src/qt-x11-opensource-src-4.3.1/mkspecs/features"84, {f_type="EXT2_SUPER_MAGIC"f_bsize=4096f_blocks=1393484f_bfree=458871f_bavail=402243f_files=708224f_ffree=625504f_fsid={1220338559, -1291029597}, f_namelen=255f_frsize=4096}) = 0
22904 mmap2
(NULL1074257920PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_ANONYMOUS, -10) = -1 ENOMEM (Cannot allocate memory)
22904 mmap2(0x3360001074319360PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS00) = -1 ENOMEM (Cannot allocate memory)
22904 --- SIGSEGV (Segmentation fault) @ (0) ---
22904 --- SIGSEGV (Segmentation fault) @ (0) ---
22903 <... waitpid resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0) = 22904
22903 
--- SIGCHLD (Child exited) @ (0) ---
22903 sigreturn()                       = ? (mask now [RTMIN])
22903 gettimeofday({1195052973986321}, NULL) = 0
22903 getpid
()                          = 22903
22903 write
(3"[2007-11-14 15:09:33 22903] signal: \"Segmentation fault\"  time: 0.455577\n"73) = 73
22903 munmap
(0x400010004096)          = 0
22903 exit_group
(126)                   = ?


Now I'll go back to compile stuffs for humans , like .. not qt 4.3 :)
Have fun ;)

edit:
laziness

free 2007-11-16 09:12

Re: Scratchbox QEMU Errors?
 
2 Attachment(s)
So it looks like there is something bad happening during a memory allocation, but only under ARMEL target (looks like a race condition)
Using a wrapper, I tracked the problem.
This is my temporary patch, it corrects the problem but will need more understanding to give a definitive patch

Code:

cd  qt-x11-opensource-src-4.3.1
patch -p1 < ../qt4-x11_4.3.1-2-armel-maxPathName.diff.txt

./configure doesn't shout anymore: the detections of capabilities (libpng, xrandr, endianness ) are properly done.
make goes (in case you have problem with arthurplugin demos, simply remove all reference to arthur in demos/Makefile and restart make)

Still under Scratchbox (I didn't have the time to test it on the device but I'm very looking forward to seeing your results), some things start (with some warnings of not found syscalls) and very few simply crash.

Still some work to be done but it's one step further.

free 2007-11-20 11:22

Re: Scratchbox QEMU Errors?
 
And on the n800:
Spreadsheet

Btw, all demos and examples run. Some are quite cpu intensive (rotozoom for example). Could be maybe tweaked a bit for speed. And prelinking could help maybe..

I'll try to upload the tar.gz somewhere, eventhough with my patch it's straightforward so everybody should be able to do it.
Penguinbait, if you're interested, do you have some hosting space? PM me.

dumb3128 2008-12-15 13:07

Re: Scratchbox QEMU Errors?
 
Hi, I tried to build QT4.4.3 in scratchbox for an ARM target. I have followed the above tips, including applying patch provided by Debian for QT4.4.3 and patch provided by free. I executed ./configure -no-pch.

I ran into an infinite loop when doing make (I have to press CTRL-C to exit). The last output was:
"qt-x11-opensource-src-4.4.3/bin/uic ../../../shared/qtgradienteditor/qtgradienteditor.ui -o .uic/release-shared/ui_qtgradienteditor.h"
Any tips for this problem? Thanx.


All times are GMT. The time now is 14:42.

vBulletin® Version 3.8.8