View Full Version : Can I do basic C compilation on the unit itself?
michaelalanjones
12-21-2005, 04:18 PM
I have a question. I am going to try developing for the 770. FYI: I have previously only done C/C++ code for PC's and Mac's, never Linux.
I am wondering - is there a scaled-down version of the C toolkit that I can install on the 770, to code on the unit itself?
I figure I would only need the basic libraries and includes for now, to flesh out some data retrieval code, and the compiler. I can edit with the Notepad application. I figured the first applications would be like console apps on Windoze.
Later, when I feel good about the data part, I can add the other libraries to create the UI.
Has anyone done this yet? Do you know which files to include? I assume the basic ANSI C headers and libraries for Linux will work, but I am not sure, and I don't want to damage the unit.
Possible, but not worth it. Would be toooo slow for any practical purposes.
AaronL
12-21-2005, 07:44 PM
It's definitely possible. All the packages you need are available at repository.maemo.org (for example, you can get gcc at http://repository.maemo.org/pool/maemo1.1rc7/free/g/ ). Developers more commonly build on a PC and test there as well (see developer information on www.maemo.org), but for certain development tasks, it may be more convenient to build on the device itself.
AaronL
rapthor
07-24-2006, 09:24 AM
http://repository.maemo.org/pool/maemo1.1rc7/free/g/ [/url]
Unfortunately, the deb-packages don't see work anymore with OS 2006. Are there up-to-date gcc compilers running with my N770 and OS 2006?
fanoush
07-24-2006, 09:31 AM
Yep, in maemo2.0 folder http://repository.maemo.org/pool/maemo2.0/non-free/g/gcc-3.4/ . But it is really not worth it. I suppose for anything but simple hello world gcc compiler will run out of memory (not talking about speed and disk space). For coding directly on the device it is probably better to use some interpreter like Python, Perl or unix shell or some variant of Basic.
rapthor
07-25-2006, 03:38 AM
Thanks, it was just to compile netcat on the device itself. But I did find a pre-build netcat finally.
Yep, in maemo2.0 folder http://repository.maemo.org/pool/maemo2.0/non-free/g/gcc-3.4/ . But it is really not worth it. I suppose for anything but simple hello world gcc compiler will run out of memory (not talking about speed and disk space). For coding directly on the device it is probably better to use some interpreter like Python, Perl or unix shell or some variant of Basic.
I am failing to see why this would be an issue (cc on the 770). I would love to have Rogue on the tablet, it is a classic curses game and the requisite compiler and libraries to get it going should be well under 50 MB. Heck, in those days a 10 MB drive was considered huge. My experiences with Maemo and the "Scratchbox" have been very aggravating. Granted, much of the aggravation stems from using VPC to host Debian on a PPC Mac--yes, for many of you that is what awaits you in Hell.
To the cones: a great service would be a simplified IDE (c'mon, admit you have been looking for a project that will bring you fame and ...well fame in the 770 community) that would allow development right on the tablet. Hey, you've got a vacation coming up don't you? Two days on the beach and you'll be screaming to write some code...
lucky-luke
05-24-2007, 11:09 AM
There is anyway to install gcc in N700 Os2006(3), it would be interesting.
penguinbait
05-24-2007, 02:28 PM
When I had my 770 I compiled several small apps right on the device. When I got the n800, I started to use scratchbox, which is obviuosly faster, but sometimes, it would be just easier to compile directly on the device.
lucky-luke
05-25-2007, 03:35 AM
Yes. but the problems that I have are that I can't have a PC with linux and scratchbox, and I use my 770 as a main device, and a long time ago was a livecd to do this, but now there is only a wmware image with OS2007, and there is very large.
I was trying to install gcc but there are broken dependencies, there is any repo with all of them ok?
Thanks
TA-t3
05-25-2007, 05:56 AM
It's certainly possible. It's even possible on a Palm PDA (I think there are several native compiler/build systems for it, at least I know for certain about a Pascal compiler). I never tried that, because the screen isn't big enough (I'm too used to lots of screen estate for development). But the N800 would be better than a Palm PDA for this. GCC is probably a bit large, but there are other compilers.. lcc, for example. You can compile it yourself. I haven't used it for years, but it should still be out there.
Besides, my first Linux computer was a 33 MHz 486 with 16 MB RAM. I routinely compiled gcc itself on it. And even Mozilla, when it was still called Netscape and just open-sourced (took 128MB of extra swap and I had to leave it overnight but still..).
Compared to that, my N800 is a supercomputer. :)
lucky-luke
05-25-2007, 06:36 AM
I tried to find a lcc compiled to be used inside my 770, but no chance, and I have no idea how to compile a ... compiler inside 770 without the compiler ....
TA-t3
05-25-2007, 06:39 AM
Someone would have to build the compiler in the cross-compilation environment of scratchbox for the 770 (on a PC).
EDIT: Actually, I'll have to retract the whole idea about using lcc. I just checked, and it doesn't appear to have an ARM target, so I was mistaken. It can't be used, unfortunately (unless someone's implemented ARM support elsewhere, not included in official lcc sources)
lucky-luke
05-25-2007, 09:41 AM
So, there is anyway to use gcc now in maemo OS2006 nokia 770, last version of os?
penguinbait
05-25-2007, 09:47 AM
Yes. but the problems that I have are that I can't have a PC with linux and scratchbox, and I use my 770 as a main device, and a long time ago was a livecd to do this, but now there is only a wmware image with OS2007, and there is very large.
I was trying to install gcc but there are broken dependencies, there is any repo with all of them ok?
Thanks
That VMware image is a waste of time, as far as I am concerned. I downloaded it, and it would not run on my mobil pentium processor. So I downloaded ubuntu cd, which you can run from, used a 30GB usb drive for my /scratchbox filesystem and ran the install script. Worked great for me, and it worked on my laptop....
lucky-luke
05-29-2007, 09:49 AM
I had no chance, I tried to download:
http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/
witch seems to be for OS 2006-3
all packages but them seems to no install under my 770, so there is anyone with scratchbox that can create a .deb of gcc?
It would be great to make simple portings.
Please help us trying to do simple portages to our "OLD" N770...
Thanks
yerga
05-29-2007, 12:33 PM
You must add that repository to sources.list, and then install gcc-3.4 by means of 'apt-get', it should work.
Then to compile you are going to need some packages -dev since the majority of the header files (.h) don't come for default installed, though you can try it.
Cheers,
lucky-luke
06-04-2007, 05:59 AM
And, ¿where I can find these -dev packages?
Thanks
i believe he is refering to packages ending in "-dev", e,g, "libxau0-dev".
you can do a "$apt-cache search dev"
anyway, i have gcc-3.4-base installed, but i get command not found when i use gcc. g++ doesn't work too.
help will be greatly apprecated.
cmideiros
06-06-2007, 04:33 AM
Yes. but the problems that I have are that I can't have a PC with linux and scratchbox, and I use my 770 as a main device, and a long time ago was a livecd to do this, but now there is only a wmware image with OS2007, and there is very large.
I was trying to install gcc but there are broken dependencies, there is any repo with all of them ok?
Thanks
You can run scratchbox on Windows with the QEMU emulator.
http://box.mmapps.net/~keesj/qemu_maemo_gentoo/
lucky-luke
06-06-2007, 09:11 AM
My problem is the access to a PC, I can use my pc at work, but not install anything, and as a Personal device I use my N770...
Also, I know that some time ago, this was possible. But now, I can't find the way to run gcc and compile some easy to port applications.
Thanks in advance,
I finally figured this out.
But i did installed alot of redundant packages in the process.
I'll post the instructions how to do C/C++ compiling soon. It's kinda slow though, took me about 10 seconds to compile a hello world script.
edit:
alright here it is: http://www.internettablettalk.com/forums/showthread.php?p=51696#post51696
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.