This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiling THTTPD webserver to run on DM6467

Hi,

I'm havng trouble compiling and running the thttpd webserver on the DM6467.

ARCH=ARM CC=arm-none-linux-gnueabi-gcc ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --with-build-cc=gc

make ARCH=ARM CC=arm-none-linux-gnueabi-gcc

The system is running  buildroot.

When I try and run it I get the following error:

./thttpd: line 1: sntax error: unexpected word (expecting ")")

If anyone could shed some light of this I would be very gratefull.

Many Thanks

  • Hi James,

    James said:

    When I try and run it I get the following error:

    ./thttpd: line 1: sntax error: unexpected word (expecting ")")

    This is because the binary has been built for i686 instead of getting built for ARM. You can confirm this by using 'file ./thttpd'

    The options given to configure command need to be reviewed. Can you try dropping the --build and --host options you have provided?

    Thanks,

    Sekhar

     

  • Hi Sekhar,

    Thanks for the quick reply.

    I did think it was somthing like this, I've dropped the build and host options and 'file ./thttpd' and I get:

    ./thttpd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped

    During the ./configure the following is printed:

    checking host system type... i686-pc-linux-gnu
    checking target system type... arm-none-linux-gnueabi
    checking build system type... i686-pc-linux-gnu

    Which seems to suggest it is compiling correctly?

    Could there be something else I'm doing wrong, or missing an option?

    Thanks

  • I've checked the files on the target board and the host compliled files and they are slightly different, would this have give this effect?

    "file ./ping"   ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped
    "file ./thttpd" ELF 32-bit LSB executable,ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped

     

  • Hi James,

    While I do not know if the differences the file command is showing is the cause of the issues you see, but may I suggest trying to use the pre-built FS from arago site (assuming you are working with a community kernel)?

     The filesystem comes with thttpd pre-built.

    Thanks,

    Sekhar

  • Hi Sekhar,

    Unfortunatly i'm using the PSP 3 enviroment, I have tried to use the pre-built thttpd version with this, but it also comes back with the same error.

    My only thought is the possiblity of something not being included in buildroot.

    Thanks,

    James