Forum.ArchosFans.com
http://forum.archosfans.com/

?Compiling for Angstrom?
http://forum.archosfans.com/viewtopic.php?f=34&t=30794
Page 1 of 2

Author:  leoinj [ Mon Feb 15, 2010 6:21 pm ]
Post subject:  ?Compiling for Angstrom?

I'm looking to compile a comic book reader with support for cbr/cbz for Angstrom. I'm sure I could just unzip everything to a folder, but I'm used to the convenience of software like cdisplay and would like some of the comic book software options. cbrPager or comic-reader seem like good choices. comic-reader has a build for maemo that comes in an arm4 .ipk but I have no idea if it will work or how to install it. I downloaded the cbrpager source but even after a
Code:
opkg install gcc
running
Code:
./configure
on my archos doesn't find a suitable c compiler.

Could use a bit of help here. Perhaps a good introduction to compiling for Angstrom. or perhaps someone has a bit of spare time to bake some code for us Linux noobs. I know I'm not the only one who wants a decent comic program on the Archos.

Author:  grond [ Mon Feb 15, 2010 6:38 pm ]
Post subject:  Re: ?Compiling for Angstrom?

Usually you don't really want to compile stuff on the device itself, you rather use a cross-compiler, i.e. a compiler that runs on your PC (usually an x86-based computer running linux) but compiles code for the ARM-architecture used in the A5/A7. If you compile the whole Angstr├Âm stuff yourself (e.g. following the guide here http://dev.openaos.org/wiki/Setting_up_OpenEmbedded) you should also get the necessary runtime environment to compile code for use in Angstr├Âm. I'm sure there is an elegant way to include the source code of a package of your liking into the whole thing but honestly I don't understand enough of the OpenEmbedded approach yet to tell you how you can do this.

Author:  leoinj [ Mon Feb 15, 2010 7:14 pm ]
Post subject:  Re: ?Compiling for Angstrom?

Figured that would be the case. Looks like both have openembedded recipes available. Hope I can build them without having to change any code.

Author:  rsksmiles [ Tue Feb 16, 2010 9:18 am ]
Post subject:  Re: ?Compiling for Angstrom?

I have tried to compile c code on my A7. I have installed the package for the compiler but I have not yet found an assembler (as). :(

Author:  grond [ Tue Feb 16, 2010 9:24 am ]
Post subject:  Re: ?Compiling for Angstrom?

rsksmiles wrote:
I have tried to compile c code on my A7. I have installed the package for the compiler but I have not yet found an assembler (as). :(


The gcc binutils package includes gnu-as, gas or as. It can also be called something like arm-linux-as. If you have a gcc cross-compiler there is definitely also the gnu assembler. It usually is in the same directory as the other binutils such as objdump which can be found more easily using something like "find / -name '*objdump'"...

Author:  rsksmiles [ Tue Feb 16, 2010 9:44 am ]
Post subject:  Re: ?Compiling for Angstrom?

grond wrote:
rsksmiles wrote:
I have tried to compile c code on my A7. I have installed the package for the compiler but I have not yet found an assembler (as). :(


The gcc binutils package includes gnu-as, gas or as. It can also be called something like arm-linux-as. If you have a gcc cross-compiler there is definitely also the gnu assembler. It usually is in the same directory as the other binutils such as objdump which can be found more easily using something like "find / -name '*objdump'"...


Excellent thanks grond. I had tried to find "as" in the packages using opkg files but it returned nothing. I was leaning towards cross compiling as I have the sde dev env setup. Either way I will (hopefully soon) have a performance comparison between java and c. For what its worth so far there are some math functions which run like a (slow) dog in java.

So far I have not yet stopped having fun with the sde!

Author:  grond [ Tue Feb 16, 2010 10:30 am ]
Post subject:  Re: ?Compiling for Angstrom?

rsksmiles wrote:
For what its worth so far there are some math functions which run like a (slow) dog in java.


That could be due to the fact that most ARM CPUs haven't got an FPU. Thus, every time a floating-point instruction is found in the executable, an exception will occur which has to be handled by the kernel using some emulation code. Of course this is VERY slow but works good enough for the occasional FP instruction but not for FP-intensive code. I assume the library you are using isn't compiled for neither soft-fpu (the compiler will generate emulation code rather than FPU-instructions which is a tad faster because the execution handling is avoided) nor NEON (instruction set extension in the Cortex A8 that has support for floating-point instructions).

Author:  rsksmiles [ Tue Feb 16, 2010 10:51 am ]
Post subject:  Re: ?Compiling for Angstrom?

grond wrote:
rsksmiles wrote:
For what its worth so far there are some math functions which run like a (slow) dog in java.


That could be due to the fact that most ARM CPUs haven't got an FPU. Thus, every time a floating-point instruction is found in the executable, an exception will occur which has to be handled by the kernel using some emulation code. Of course this is VERY slow but works good enough for the occasional FP instruction but not for FP-intensive code. I assume the library you are using isn't compiled for neither soft-fpu (the compiler will generate emulation code rather than FPU-instructions which is a tad faster because the execution handling is avoided) nor NEON (instruction set extension in the Cortex A8 that has support for floating-point instructions).


I am using the standard java libs with no special compile options. I will add it to my to do checklist :)

Author:  leoinj [ Tue Feb 16, 2010 2:50 pm ]
Post subject:  Re: ?Compiling for Angstrom?

problem now is
Code:
[email protected]:/usr/src/openaos/build/profiles/openaos$ bitbake initramfs-archos-image
ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.
   Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
   Following is the list of potential problems / advisories:

   /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.
Please install following missing utilities: C++ Compiler (${BUILD_PREFIX}g++),help2man,diffstat,texi2html,makeinfo,cvs,gawk
Using dash as /bin/sh causes various subtle build problems, please use bash instead.

Author:  rsksmiles [ Tue Feb 16, 2010 4:40 pm ]
Post subject:  Re: ?Compiling for Angstrom?

leoinj wrote:
problem now is
Code:
[email protected]:/usr/src/openaos/build/profiles/openaos$ bitbake initramfs-archos-image
ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.
   Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
   Following is the list of potential problems / advisories:

   /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.
Please install following missing utilities: C++ Compiler (${BUILD_PREFIX}g++),help2man,diffstat,texi2html,makeinfo,cvs,gawk
Using dash as /bin/sh causes various subtle build problems, please use bash instead.


Perhaps you should install the package that contains gcc?

Author:  grond [ Tue Feb 16, 2010 6:00 pm ]
Post subject:  Re: ?Compiling for Angstrom?

leoinj wrote:
/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.


Well, just do what it says... :)

Author:  leoinj [ Tue Feb 16, 2010 6:49 pm ]
Post subject:  Re: ?Compiling for Angstrom?

rsksmiles wrote:
Perhaps you should install the package that contains gcc?


I already have gcc on my dev machine. Do I need to somehow install it within the openaos dev environment as well?

Author:  rsksmiles [ Tue Feb 16, 2010 6:52 pm ]
Post subject:  Re: ?Compiling for Angstrom?

leoinj wrote:
rsksmiles wrote:
Perhaps you should install the package that contains gcc?


I already have gcc on my dev machine. Do I need to somehow install it within the openaos dev environment as well?


I had the issue when I first installed the sde. I think it may have been due to the fact that I had installed using root access. I did not update the "To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.". Did you install as root or a std user? is gcc accessible on the path?

Author:  dm8tbr [ Tue Feb 16, 2010 7:14 pm ]
Post subject:  Re: ?Compiling for Angstrom?

leoinj wrote:
Code:
Please install following missing utilities: C++ Compiler (${BUILD_PREFIX}g++),help2man,diffstat,texi2html,makeinfo,cvs,gawk
Using dash as /bin/sh causes various subtle build problems, please use bash instead.

gcc is not a c++ compiler, g++ is
the other dependencies have debian/ubuntu packages, just install them.
Refer to http://packages.ubuntu.com to find those.

Author:  CheBuzz [ Wed Feb 17, 2010 7:24 am ]
Post subject:  Re: ?Compiling for Angstrom?

grond wrote:
leoinj wrote:
/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.


Well, just do what it says... :)


Or if you want to just fix it for the current running system, run "echo 0 > /proc/sys/vm/mmap_min_addr" as root.

Author:  leoinj [ Thu Feb 25, 2010 12:27 pm ]
Post subject:  Re: ?Compiling for Angstrom?

well i finally got bitbake working. problem now is i can't make it to the end of a sucessfull compile. im getting failures on step 45 out of several hundred. from what i can tell the build errors are coming from problems downloading build dependencies. it seems that dependencies sucesfully installed in previous bitbakes are skipped the next time i try to bitbake cbrpager. if this is the case then i am at least making progress though i worry about getting a clean build.

Author:  leoinj [ Sun Mar 21, 2010 1:28 pm ]
Post subject:  Re: ?Compiling for Angstrom?

error on do_configure

configure: error: C compiler cannot create executables

Code:
checking for arm-angstrom-linux-gnueabi-gcc... arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
FATAL: oe_runconf failed


I get this when running 'bitbake -b /recipes/someprogram/someprogram.bb' on every recipe I try to bitbake with -b. any help?

Author:  CheBuzz [ Mon Mar 22, 2010 7:42 am ]
Post subject:  Re: ?Compiling for Angstrom?

Have you sourced a profile in your current shell?

Author:  leoinj [ Tue Mar 23, 2010 5:40 pm ]
Post subject:  Re: ?Compiling for Angstrom?

CheBuzz wrote:
Have you sourced a profile in your current shell?

Yep, I've been using the guide here: http://dl.dropbox.com/u/387849/wiki.html

Author:  leoinj [ Fri Apr 23, 2010 7:56 pm ]
Post subject:  Re: ?Compiling for Angstrom?

An update on compile status. I recently upgraded to a new laptop and decided to give Ubuntu it's own little home on my drive partition instead of running off of a virtual machine stored on an external eSATA drive. Not only is compiling much faster since the upgrade, I haven't run into any inexplicable errors yet. The only possible explanation for the previous errors besides the occasional missing xxxxxx-native dependency is hardware glitch. Thanks to everyone who has offered useful comments and support. I expect to have a few further questions about moving my newly compiled software onto my Archos in the near future.

Page 1 of 2 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/