Reply
Thread Tools
lcuk's Avatar
Posts: 1,635 | Thanked: 1,816 times | Joined on Apr 2008 @ Manchester, England
#71
Originally Posted by wannessmet View Post
@ lcuk

I followed your instructions but while trying to configure (ipmitool)

Code:
Nokia-N900-51-1:/home/user/MyDocs/Downloads/ipmitool-1.8.11# PATH=$PATH:. ;
Nokia-N900-51-1:/home/user/MyDocs/Downloads/ipmitool-1.8.11# sh ./configure
checking build system type... armv7l-unknown-linux-gnu
checking host system type... armv7l-unknown-linux-gnu
checking target system type... armv7l-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Nokia-N900-51-1:/home/user/MyDocs/Downloads/ipmitool-1.8.11# checking for gawk... no
Do you have any idea what's going wrong?


Yes, you did not read everything I said.


Originally Posted by lcuk View Post

note, this doesnt bring in autotools or dpkg
so no ./configure stage works, and no dpkg-buildpackage will run.
(normal make files and find an alternative for packaging)

if you don't need them and can work with makefiles its certainly usable and fast.
if you need -dev headers for libraries, expect even more space, I find nowadays I can get by mostly with libliqbase-dev

hth
So, I could not get this to work but did not need it.
If you investigate the error itself there is potential to get past it.
__________________
liqbase sketching the future.
like what i say? hit the Thanks, thanks!
twitter.com/lcuk
 
clasificado's Avatar
Posts: 466 | Thanked: 180 times | Joined on Feb 2010
#72
thats a very common error when preparing an n900 development environment of the device itself.

put your source inside the chroot image or inside /home/user.

in other words, dont try to compile from /home/user/MyDocs, because its FAT32. Or mess with ./configure to let you compile outside the source folder.

thats because with fat32 you dont get the execution bit.

clasificado

Last edited by clasificado; 2010-08-17 at 11:42.
 
lcuk's Avatar
Posts: 1,635 | Thanked: 1,816 times | Joined on Apr 2008 @ Manchester, England
#73
Originally Posted by nicolai View Post
checking whether the C compiler works... configure: error: cannot run C compiled programs.
Don't do this from within you MyDocs folder.
It is on a partitition which is formatted as VFAT
and you can not run executables from there.
Put your ipmitool-1.8.11 to
/home/user/
for example and try again.
Nicolai
hey Nicolai,
hmm last time I tried the configure stage would fail with anything, but you are certainly more confident than myself that it should work!
this is great if so and removes one block from the way

it would be best of all if we could optify these build-essential packages and get dpkg-buildpackage working happily.
__________________
liqbase sketching the future.
like what i say? hit the Thanks, thanks!
twitter.com/lcuk
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#74
I must admit, I don't know if the whole configure stage work.
I am working with plain old hand written Makefiles.

Nicolai
 

The Following User Says Thank You to nicolai For This Useful Post:
lcuk's Avatar
Posts: 1,635 | Thanked: 1,816 times | Joined on Apr 2008 @ Manchester, England
#75
Originally Posted by nicolai View Post
I must admit, I don't know if the whole configure stage work.
I am working with plain old hand written Makefiles.

Nicolai
Makefiles are elegant weapons... for a more civilized age
http://xkcd.com/297/


they work well!
I have just made libliqbase work on x86 with the ones there
__________________
liqbase sketching the future.
like what i say? hit the Thanks, thanks!
twitter.com/lcuk
 

The Following User Says Thank You to lcuk For This Useful Post:
Posts: 10 | Thanked: 3 times | Joined on Jul 2010 @ belgium
#76
Solved: I adapted the /etc/fstab. The home partition where I was building the software was mounted as noexec. I removed that option and it was working
 

The Following User Says Thank You to wannessmet For This Useful Post:
norayr's Avatar
Posts: 148 | Thanked: 216 times | Joined on Jul 2010 @ Yerevan
#77
I also prefer to compile on device, and that's my manual, how to do that with FreePascal
 

The Following User Says Thank You to norayr For This Useful Post:
Posts: 7 | Thanked: 2 times | Joined on Apr 2010 @ Delhi
#78
C Programming on Maemo Device (N 900): Mobile C programming lab
Download the following files to work with gcc
• binutils_2.18.50.20070820-4+0m5_armel.deb
• libgcc1_4.2.1-4maemo9+0m5_armel.deb
• libgomp1_4.2.1-4maemo9+0m5_armel.deb
• cpp-4.2_4.2.1-4maemo9+0m5_armel.deb
• gcc-4.2-base_4.2.1-4maemo9+0m5_armel.deb
• gcc-4.2_4.2.1-4maemo9+0m5_armel.deb
1. connect your N900 to PC and copy above files into one folder
~ $ cd ~/MyDocs //change to this folder in N900 in xterm
~/MyDocs $ cd files //here your above files are copied
~/MyDocs/files $ dpkg –i * // to run all the files in files folder
~/MyDocs/files $ vi hellowrold.c //create a c program by using vi editor
Note : for entering any letter you should press “I” to enter in to insert mode
#inlcude <stdio.h>
main()
{
Printf(“M. Reddi Prasad Reddy,IP University,Delhi”);
}
Note: to save the files click ESC and shift+: and wq! .so that your c program will be saved.
~/MyDocs/files $ gcc-4.2 hello.c // gcc compiler will compile your c program
~/MyDocs/files $ ls // you will find the output file
a.out hello.c
~/MyDocs/files $ sudo gainroot //shell root will be enabled
~home/usr/MyDocs/files # cp a.out /usr/bin // to see the output you should copy this outputfile to bin folder
~/usr/bin # chmod +x a.out // change the permissions
~/usr/bin # ./a.out
M. Reddi Prasad Reddy,IP University,Delhi


any other ideas and comments
Mail id: reddy.mrp@gmail.com
 

The Following User Says Thank You to virusforu For This Useful Post:
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#79
Originally Posted by virusforu View Post
~/MyDocs/files $ vi hellowrold.c //create a c program by using vi editor
Weird spelling of the file name. Especially as you're trying to compile hello.c later on.

Note : for entering any letter you should press “I” to enter in to insert mode
#inlcude <stdio.h>
main()
{
Printf(“M. Reddi Prasad Reddy,IP University,Delhi”);
}
Note: to save the files click ESC and shift+: and wq! .so that your c program will be saved.
It's spelled "include". The function you're looking for is "printf".

ESC leaves insertion mode. The command to save and quit is "wq" by itself and one enters command mode using ":".

~/MyDocs/files $ gcc-4.2 hello.c // gcc compiler will compile your c program
~/MyDocs/files $ ls // you will find the output file
a.out hello.c
Use -o flag to give the generated binary a name.

~/MyDocs/files $ sudo gainroot //shell root will be enabled
~home/usr/MyDocs/files # cp a.out /usr/bin // to see the output you should copy this outputfile to bin folder
~/usr/bin # chmod +x a.out // change the permissions
~/usr/bin # ./a.out
Why copy the binary to /usr/bin to then run it using ./a.out ?
 

The Following 2 Users Say Thank You to Joorin For This Useful Post:
Posts: 7 | Thanked: 2 times | Joined on Apr 2010 @ Delhi
#80
Corrected POST: Thank you JOORIN for your comments
~ $ cd ~/MyDocs //change to this folder in N900 in xterm
~/MyDocs $ cd files //here your above files are copied
~/MyDocs/files $ sudo gainroot //shell root will be enabled
~home/usr/MyDocs/files # dpkg –i * // to run all the files in files folder
~home/usr/MyDocs/files # vi hello.c //create a c program by using vi editor
Note : for entering any letter you should press “I” to enter in to insert mode

#include <stdio.h>
main()
{
Printf(“M. Reddi Prasad Reddy,IP University,Delhi”);
}

Note:ESC leaves insertion mode. The command to save and quit is "wq" by itself and one enters command mode using ":".
~home/usr/MyDocs/files # gcc-4.2 hello.c // gcc compiler will compile your c program
~home/usr/MyDocs/files # ls // you will find the output file
a.out hello.c

~home/usr/MyDocs/files # cp a.out /usr/bin // to see the output you should copy this outputfile to bin folder
~/usr/bin # chmod +x a.out // change the permissions
~/usr/bin # ./a.out
M. Reddi Prasad Reddy,IP University,Delhi


I have modified the post. this can help people little
i have saved the a.out to /usr/bin to execute otherwise its not able to get the permissions.
Q: but still some other N900 devices are not able to install gcc.
 
Reply

Tags
c compiler, c language, c programming, c++ compiler, c++ language, c++ programming, compile, compiler, development, maemo, on-device, on-device development, on-device programming, programming


 
Forum Jump


All times are GMT. The time now is 16:03.