Cherokee on the ARM

Dave Festing
I have been working with a guy who does this sort of stuff for a job and he
has run of ideas why we get the following error on trying to run Cherokee:

<***glibc detected *** /home/cherokee/sbin/cherokee/cherokee-worker:
corrupted double-linked list: 0x0015d9b0 *** PID 851: received a signal=6>

There is some suggested that there is "a problem with recent versions of
glibc".

The only tutorial that seems useful is:

http://marcoalfonso.net/2009/06/26/cherokee-running-on-a-motorola-a1200i/

and he appears to use a quite old glibc library.

Is this a known problem or can someone suggest a fix?

Thank you,
Dave

andres
hi friend, i wanted to start again, and when i install the compiller i
realize of this:


felipe@felipe-desktop:/opt/FriendlyARM/mini2440/examples/comtest$
arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld
--enable-languages=c,c++ --enable-shared --enable-symvers=gnu
--enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72'
--with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls
--prefix=/opt/codesourcery
--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc
--with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gn

ueabi/libc
--with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-li

nux-gnueabi-i686-pc-linux-gnu/usr
--with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-l

inux-gnueabi-i686-pc-linux-gnu/usr
--disable-libgomp --enable-poison-system-directories
--with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux


-gnueabi/bin
--with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux


-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) 

this is how its configure, i think it most be important to see, some
mistake in our script, i hope this could help us!!


bye

andres
at first sight i see a mistake in this line for example:

export CROSS_COMPILE=arm-none-linux-gnueabi-   #here
export CC=${CROSS_COMPILE}"gcc" 
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as" 
export RANLIB=${CROSS_COMPILE}"ranlib" 
export LD=${CROSS_COMPILE}"ld" 


i think it most be with out the last " - ".

the compiler shows this:

Target: arm-none-linux-gnueabi

i wait for your before i change my code, i think we most be close

bye

andres
im not sure but maybe when we take the folders to the mini2440 our files
look for the libraries in our host (desktop pc) for this route:

-s -lcrypt -lpthread -ldl
-L/home/felipe/mini2440-bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/
lib"


i think it most be something like i see below

i give you some ideas, i have been looking too ejjeje

or maybe your friend could run it because he was working on another version
of linux in his desktop pc. im not sure

again i hope this could help us, 

bye

andres
hi again ejjeej

i continue watching mi compiler and i wanted to do some examples that are
available on mini2440's cd  but when i tried to compiller it this was what
happend to me:


felipe@felipe-desktop:/opt/FriendlyARM/mini2440/examples/math$ sudo make
arm-linux-gcc -o mathtest mathtest.c -lm
make: arm-linux-gcc: No se encontró el programa
make: *** [mathtest] Error 127

but when i write this: arm-linux-gcc -v

show what i write about, do you know something of this?

davef
***
export CROSS_COMPILE=arm-none-linux-gnueabi-   #here
***
There is nothing wrong with this line.

I will follow up on your idea of "the route to the library".  

To determine your arm-linux-gcc version you have to be in the bin directory
where it is stored then try:

arm-linuc-gcc -v 
arm-linux-gcc --v 
arm-linux-gcc -version
arm-linux-gcc --version

Sorry, my Linux box is at home.

If you try to compile a program without a script you will need a path to
compiler.

Type:

export PATH=/path/to/your/compiler/bin:$PATH

in your command like before you try to make anything.

andres
friend, did you find something new about the path of libraries? tell me how
can i help you

davef
Andres,

I have submitted a posting to the Cherokee mailing list asking for
verification that glibc 2.9 works with Cherokee 0.99.44

I have Cherokee running on my FriendlyArm that has been compiled with GCC
3.4 and glibc 2.4  AND it seems to work as expected.

You could put a toolchain together with GCC 3.4 and glibc 2.4 and I could
send you the script that built Cherokee, for that toolchain.

Dave

andres
ok friend im so happy, i wait for your messenge, and instructions of how
can i install cherokee in my mini too, good luck friend!!!

davef
Appears there could be some similar issues with 0.99.44

http://code.google.com/p/cherokee/issues/detail?id=805#c1

and

http://svn.cherokee-project.com/changeset/4851

Cherokee-admin does not work with our compilation.

I get around this, for my needs, by just modifying the cherokee.conf file

Without the same toolchain as us you will not be able to re-compile, ie to
get cherokee-admin or PHP or MySQL or ? working.

I would suggest waiting until the next release of Cherokee or getting it
out of the repository yourself and trying to get the latest version
working.

If you would like to continue this discussion off-line then email:
dave_festing at hotmail dot com

andres
Friend i already add to my msn, i want to know how to compile my cherokee
:) if you want put your steps here to get the right toolchain and cherokee
version, (so this could be useable to other people), thanks friend!!

andres
Friend i send you a email, i wait your answer, is it your correct email??
dave_festing @ hotmail . com

davef
I currently have 3 ARM experts giving me advise on why Cherokee 0.99.44
won't compile with GCC 4.3.2 and glibc 2.9

Fortunately, I have another 3 to try and extract some ideas out of!

I got your email.

andres
friend and i why dont you tellme how install it with the tools you did it?
it doesnt matter if it is an old version

davef
Because I think you are wasting your time.

However, as you are happy with an old working version that can't be
modified, I'll see how big a file I can send over hotmail tonight..

Dave Festing
Attachment: cherokee.sh (1.67 KB)
Now you can go get the latest snapshot from Cherokee, modify the attached
script to the same snapshot number and run it.  They have fixed the
problem.

I would suggest that you wait until 0.99.45

david
hi friend i install it doing what you tellme by your mail, i works!!!!
thanks alot but i test php and when i m going to open a php windows it
tries to download the page as it is a downloader program, how can i fix it?

THANKS A LOT :)

davef
You need cherokee-admin to function properly and it does not seem work with
the latest snapshot.  Well it doesn't for me and I haven't a clue how to
fix it.

I would suggest waiting until they release 0.99.45 and then if it doesn't
work join their mailing list and post your queries there.

davef
Apparently Python 2.5 or 2.6? needs to be cross-compiled and installed on
the machine running cherokee-admin . . . in your case the mini2440.

Good luck.

andres
friend, cherokee works for me but with the archives you giveme in my email,
now i want to compile the file you send me above, if the compilation runs
ok, it will generate the files you giveme isnt it?

now im trying to compile that file i only change these lines:

export PATH=/home/felipe/mini2440-bootstrap/arm-2008q3/bin:$PATH

 LDFLAGS="-s -lcrypt -lpthread -ldl
-L/home/felipe/mini2440-bootstrap/arm-2008q3/arm-none-linux-gnueabi/libc/lib"
\
            CFLAGS=" -march=armv4t -mtune=arm920t -Os"


cp -a -r /home/cherokee/* /home/felipe/mini2440-bootstrap/output/cherokee
cp -a -r /www /home/felipe/mini2440-bootstrap/output/cherokee


changing davef by felipe.

i succesfull done the cross compile but it only create 3 folders bin lib
and sbin, how can i get the others that i found in the archive .zip you
sendme? etc, include and share?

now i want to understand the proccess

another important thing:

to the program can run i have to made the folder www in /var but when i
shutdown the mini2440 this folder ALWAYS DISSAPAIR how can i fix it?
 
thanks

Nani
Hi,
Can you please tell me what is the configuration options we need to give
and steps to follow for ARM.

Thanks

davef
This was a long mostly unsuccessful process.

Is there something special about Cherokee you want?  I am currently running
thttpd enabled for PHP.

How about Apache?  If that is appropriate I would suggest going here and
spending a few days learning how to drive this BSP.

http://www.oselas.org/oselas/bsp/pengutronix/mini2440_bsp_en.html


Good luck!