maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   gcc compiler on N9? (https://talk.maemo.org/showthread.php?t=82148)

mariusmssj 2012-02-06 22:53

gcc compiler on N9?
 
Hey guys,
i wanted to know if it's possible to get the gcc compiler? I got some c code i would like to try out. And for it to work i need a gcc compiler.

TheStatsMan 2012-02-07 02:14

Re: gcc compiler on N9?
 
apt-get install build-essential

mariusmssj 2012-02-07 08:08

Re: gcc compiler on N9?
 
"E: Couldn't find package build-essential"

derliebewolf 2012-02-07 10:51

Re: gcc compiler on N9?
 
gives me several dependency errors. should I try to install those on my own one by one?

TheStatsMan 2012-02-07 13:12

Re: gcc compiler on N9?
 
That is how I installed it on mine I thought. It still certainly comes up when I search for it using apt-cache. Try adding the extra repositories using n9 tweak perhaps then
apt-get update
Then try to install again.

rcolistete 2012-02-07 14:26

Re: gcc compiler on N9?
 
Now I am not with my N9 to test.

But i think gcc needs the Harmattan-dev Nokia repository, so install :
http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/h/harmattan-repository/harmattan-repository_0.4+0m6_all.deb
to enable this repository (if not enable before).

Then, as root (after 'devel-su' and 'rootme' as password) :
# apt-get update
# apt-get build-essential

derliebewolf 2012-02-07 14:30

Re: gcc compiler on N9?
 
thanks. I think that repo is allready enabled on my device.

The dependency error I was talking of basically says "Package xyz is needed but should not be installed". I gues I try to install all those packages manually via ssh later today and see what's happening :)

rcolistete 2012-02-07 16:07

Re: gcc compiler on N9?
 
Quote:

Originally Posted by derliebewolf (Post 1161697)
thanks. I think that repo is allready enabled on my device.

The dependency error I was talking of basically says "Package xyz is needed but should not be installed". I gues I try to install all those packages manually via ssh later today and see what's happening :)

Could you copy & paste the message ?

derliebewolf 2012-02-07 21:21

Re: gcc compiler on N9?
 
well, here you go:

Code:

The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or libc-dev
Depends: g++ (>= 3:3.3) but it is not going to be installed
Depends: dpkg-dev (>= 1.4.1.19) but it is not going to be installed
E: Broken packages

If go on in the process and try to apt-get install libc6-dev a similar message appears:

Code:

The following packages have unmet dependencies:
libc6-dev: Depends: libc6 (= 2.5.0-1osso10) but 2.10-0maemo18.1+0m6 is to be installed
E: Broken packages

I think I could go on for a little while now...

EDIT: On the other hand I might just build a deb file from the source. Any qick link to how this is done best?

hawaii 2012-02-08 16:00

Re: gcc compiler on N9?
 
It *might* be worth it to use a chroot to ensure dependencies don't get bungled up.

derliebewolf 2012-02-12 16:56

Re: gcc compiler on N9?
 
I succeded with that and build-essention is up and running. Anyway when I try to compile using make, is get
Code:


-sh: make: Operation not permitted

why?

YavkatA 2012-02-13 05:28

Re: gcc compiler on N9?
 
My guess would be Aegis... did you try running make as root?

derliebewolf 2012-02-13 08:21

Re: gcc compiler on N9?
 
yes, I logged in as root (via ssh).

zszabo 2012-02-13 11:16

Re: gcc compiler on N9?
 
Shouldn't have to log in as root. In fact, if you uncompressed an archive as user and try to make as root, it will return permission denied since the directory is owned by user.

rcolistete 2012-03-07 18:15

Re: gcc compiler on N9?
 
With PR1.2 of Nokia N9 :
- gcc/g++ were removed;
- I can't reinstall then by using "apt-get install build-essential" ou "apt-get install gcc g++", etc.
There are dependencies problems between Harmattan SDK beta 3 and MeeGo 1.2 Harmattan PR1.2.
I think we need to wait the release of Harmattan SDK beta 4 repository...

user/zero 2012-03-07 19:27

Re: gcc compiler on N9?
 
Quote:

Originally Posted by derliebewolf (Post 1164042)
why?

Because, apparently, in the new Nokia management's view, you shouldn't be able to do more things on this OS than in Windows Phone. Otherwise... I shall stop here. :)

TheStatsMan 2012-03-08 09:34

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1176051)
With PR1.2 of Nokia N9 :
- gcc/g++ were removed;
- I can't reinstall then by using "apt-get install build-essential" ou "apt-get install gcc g++", etc.
There are dependencies problems between Harmattan SDK beta 3 and MeeGo 1.2 Harmattan PR1.2.
I think we need to wait the release of Harmattan SDK beta 4 repository...

This is really annoying. I guess this expains, why I was having trouble installing python-dev. All the dependencies were stuffed up. Any idea when the repository will be fixed by?

rcolistete 2012-03-14 23:21

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1176051)
With PR1.2 of Nokia N9 :
- gcc/g++ were removed;
- I can't reinstall then by using "apt-get install build-essential" ou "apt-get install gcc g++", etc.
There are dependencies problems between Harmattan SDK beta 3 and MeeGo 1.2 Harmattan PR1.2.
I think we need to wait the release of Harmattan SDK beta 4 repository...

I have found a solution, but not simple...

Even with the stable Harmattan SDK (released today or yesterday), in :
http://harmattan-dev.nokia.com/pool/harmattan/
the dependencies problem remains to install gcc/g++ to Nokia N9 with PR1.2 (on PR1.1 it was trivial, just "apt-get install build-essential").

So, I have downloaded some .debs from the Harmattan SDK :
- binutils
- libc6-dev
- libc-dev-bin
- linux-kernel-headers
- libgmp3c2
- libmpfr1ldbl
- cpp-4.4
- gcc-4.4-base
- gcc-4.4-locales
- gcc-4.4
- fixincludes
- libgcc1
- libgomp1
- libstdc++6
- libstdc++6-4.4-dev
- g++-4.4
- cpp
- gcc
- g++
- make
and installed them (in the order above) with "dpkg -i" as root. Worse, two of them, "libc6-dev" and "libstdc++6-4.4-dev" needs "dpkg -i --force-all" to install.

The Harmattan SDK gcc-4.4 folder also has debs for docs, gfortran, etc, which can be installed.

Important : the Harmattan SDK should not be enabled, i.e., the "/etc/apt/sources.list" file should be removed, then "# apt-get update" so we can use "dpkg -i" without aegis errors.

Last hint : to run ".o" object files compiled by gcc/g++, use inception & opensh.

noog 2012-03-28 22:02

Re: gcc compiler on N9?
 
hello

i did that but i can't execute make ?
sh: make: not found

apt-get install binutils
dpkg -i --force-all libc6-dev_2.10-0maemo18.1\+0m6_armel.deb
dpkg -i libc-dev-bin_2.10-0maemo18.1\+0m6_armel.deb
dpkg -i linux-kernel-headers_2.6.32-20112910\+0m6_armel.deb
dpkg -i libmpfr1ldbl_2.4.1-0maemo4+0m6_armel.deb
dpkg -i fixincludes_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i cpp-4.4_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4-base_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4-locales_4.4.1-0maemo14\+0m6_all.deb
dpkg -i libgomp1_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4_4.4.1-0maemo14+0m6_armel.deb
dpkg -i libstdc\+\+6_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i g++-4.4_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i --force-all libstdc++6-4.4-dev_4.4.1-0maemo14\+0m6_armel.deb

rcolistete 2012-03-28 22:26

Re: gcc compiler on N9?
 
Quote:

Originally Posted by noog (Post 1185334)
hello
when i try to install "dpkg -i cpp-4.4_4.4.1-0maemo14\+0m6_armel.deb"
the system ask for "libmpfr1ldbl" package
where can i download it ?

It is here, in Harmattan SDK mpfr.

How to find it : enable Harmattan SDK, then "apt-cache show libmpfr1ldbl", the result has the line :
Filename: pool/harmattan/free/m/mpfr/libmpfr1ldbl_2.4.1-0maemo4+0m6_armel.deb
So, go to the Harmattan SDK repository site.

noog 2012-03-28 23:16

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1185342)
It is here, in Harmattan SDK mpfr.

How to find it : enable Harmattan SDK, then "apt-cache show libmpfr1ldbl", the result has the line :
Filename: pool/harmattan/free/m/mpfr/libmpfr1ldbl_2.4.1-0maemo4+0m6_armel.deb
So, go to the Harmattan SDK repository site.

ok i found it (i modified my first response) but i can't execute make : not found



apt-get install binutils
dpkg -i --force-all libc6-dev_2.10-0maemo18.1\+0m6_armel.deb
dpkg -i libc-dev-bin_2.10-0maemo18.1\+0m6_armel.deb
dpkg -i linux-kernel-headers_2.6.32-20112910\+0m6_armel.deb
dpkg -i libmpfr1ldbl_2.4.1-0maemo4+0m6_armel.deb
dpkg -i fixincludes_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i cpp-4.4_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4-base_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4-locales_4.4.1-0maemo14\+0m6_all.deb
dpkg -i libgomp1_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i gcc-4.4_4.4.1-0maemo14+0m6_armel.deb
dpkg -i libstdc\+\+6_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i g++-4.4_4.4.1-0maemo14\+0m6_armel.deb
dpkg -i --force-all libstdc++6-4.4-dev_4.4.1-0maemo14\+0m6_armel.deb

rcolistete 2012-03-28 23:39

Re: gcc compiler on N9?
 
Quote:

Originally Posted by noog (Post 1185334)
i did that but i can't execute make ?
sh: make: not found

Ok, I have added libgmp3c2 & libmpfr1ldbl & make & binutils to post #18 instructions. make now works on my N9.

noog 2012-03-29 10:40

Re: gcc compiler on N9?
 
Quote:

Originally Posted by hawaii (Post 1162208)
It *might* be worth it to use a chroot to ensure dependencies don't get bungled up.

i try a compilation but i have this response
and the solution was : ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

Code:

~/compile/lame-3.99 $ ./configure
checking build system type... armv7l-unknown-linux-gnu
checking host system type... armv7l-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/user/compile/lame-3.99':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details


noog 2012-03-29 12:44

Re: gcc compiler on N9?
 
Do you know, how can i make deb after the compilation ?

rcolistete 2012-03-30 18:30

Re: gcc compiler on N9?
 
Quote:

Originally Posted by noog (Post 1185567)
Do you know, how can i make deb after the compilation ?

I will try to make a Harmattan SDK image to mount & chroot @ N9 (using open mode kernel or Inception). So, in theory, everything (compile, create .deb, etc) would be possible.

rcolistete 2012-03-30 18:35

Re: gcc compiler on N9?
 
Quote:

Originally Posted by noog (Post 1185531)
i try a compilation but i have this response
and the solution was : ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

I've added cpp, gcc and g++ (deb's with links to the real compilers) to post #18.

m4r0v3r 2012-04-14 16:38

Re: gcc compiler on N9?
 
am having an issue in that the i've incepted properly, make works fine, but ./configure doesn't and provides an permission denied have i missed something?

rcolistete 2012-04-14 16:47

Re: gcc compiler on N9?
 
Quote:

Originally Posted by m4r0v3r (Post 1192089)
am having an issue in that the i've incepted properly, make works fine, but ./configure doesn't and provides an permission denied have i missed something?

Please show the output error, what are you trying to compile, etc.

m4r0v3r 2012-04-15 12:34

Re: gcc compiler on N9?
 
seems i didn't own the file so it was causing an error

awbcmu 2012-04-22 20:15

Re: gcc compiler on N9?
 
I got gcc to work -- at least for small programs.

The /tmp on the device is too small though for anything of size. The normal way to address this to set the environment variable TMPDIR to point to a larger directory. But this doesn't work. Has anybody else seen this problem?

thanks

Alan

noog 2012-04-28 21:21

Re: gcc compiler on N9?
 
hello i have the same problem did you find a solution ?

javispedro 2012-04-28 21:46

Re: gcc compiler on N9?
 
Quote:

Originally Posted by awbcmu (Post 1196022)
The /tmp on the device is too small though for anything of size. The normal way to address this to set the environment variable TMPDIR to point to a larger directory. But this doesn't work. Has anybody else seen this problem?

Have you tried gcc -pipe ?

noog 2012-04-28 21:54

Re: gcc compiler on N9?
 
i use a slackbuild script with this line

CWD=$(pwd)
TMP=${TMP:-/root/tmp/mypacket}
PKG=$TMP/package-mpd
OUTPUT=${OUTPUT:-/root/tmp}

my problem now is this one

checking for GLIB... configure: error: GLib 2.12 is required

ranbaxy 2012-08-03 10:04

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1161694)
Now I am not with my N9 to test.

But i think gcc needs the Harmattan-dev Nokia repository, so install :
http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/h/harmattan-repository/harmattan-repository_0.4+0m6_all.deb
to enable this repository (if not enable before).

Then, as root (after 'devel-su' and 'rootme' as password) :
# apt-get update
# apt-get build-essential

Sorry for bumping this old thread :o
I was trying to run the above commands, couldn't succeed as I am getting the following error for # apt-get update
Code:

# apt-get update
Get: 1 exec:////usr/bin/osa --packages
Err https://downloads.maemo.nokia.com ./ Release.gpg
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) Err https://downloads.maemo.nokia.com ./ Translation-en_GB
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) Err https://downloads.maemo.nokia.com ./ Release.gpg
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) Err https://downloads.maemo.nokia.com ./ Translation-en_GB
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) Err https://downloads.maemo.nokia.com ./ Release.gpg
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) Err https://downloads.maemo.nokia.com ./ Translation-en_GB
  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS servers) 0% [1 exec:////usr/bin/osa --packages 0B]QNetworkReplyImpl::_q_startOperation was called morethan once Fetched 104kB in 60s (1,716B/s) Updating desktop entries... Done Reading package lists... Done
W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/333/./Release.gpg  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS
servers)

W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/333/./en_GB.gz  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS
servers)

W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/apps/./Release.gpg  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS
servers)

W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/apps/./en_GB.gz  Could not resolve host: downloads.maemo.nokia.com (Could notcontact DNS servers)

W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/tools/./Release.gpg  Could notresolve host: downloads.maemo.nokia.com (Couldnot contact DNS
servers)

W: Failed to fetch
https://downloads.maemo.nokia.com/harmattan/tools/./en_GB.gz  Could not resolve host: downloads.maemo.nokia.com (Could not contact DNS
servers)

W: Some index files failed to download, they have been ignored, or old ones used instead.
~ # apt-get build-essential
E: Invalid operation build-essential
~ #

Is the path https://downloads.maemo.nokia.com/ obsolete? Could someone guide me to get gcc? :o

rcolistete 2012-08-03 15:00

Re: gcc compiler on N9?
 
Quote:

Originally Posted by ranbaxy (Post 1246865)
Sorry for bumping this old thread :o
I was trying to run the above commands, couldn't succeed as I am getting the following error for # apt-get update
...
Is the path https://downloads.maemo.nokia.com/ obsolete? Could someone guide me to get gcc? :o

Your "# apt-get update" failed due to some Internet problem. Try it again. Here in my N9 is works ok.

But to get gcc/g++ on (Harmattan) device :
- until PR1.1 (for Nokia N9) trivial, just "# apt-get install build-essential";
- the post #18 doesn't work anymore for PR1.3 ! It was ok for PR1.2;
- now on PR1.3, I've only succeeded by chrooting a Harmattan SDK image... I'll give more details on how-to-do it easily later today.

ranbaxy 2012-08-04 08:39

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1246981)
Your "# apt-get update" failed due to some Internet problem. Try it again. Here in my N9 is works ok.

But to get gcc/g++ on (Harmattan) device :
- until PR1.1 (for Nokia N9) trivial, just "# apt-get install build-essential";
- the post #18 doesn't work anymore for PR1.3 ! It was ok for PR1.2;
- now on PR1.3, I've only succeeded by chrooting a Harmattan SDK image...

Thanks. I am on PR 1.2. # apt-get install build-essential doesn't work. Does it mean that I have to download gcc separately and get it installed since I am getting an error which I had posted in my previous post when I try # apt-get update?

Quote:

Originally Posted by rcolistete (Post 1246981)
I'll give more details on how-to-do it easily later today.

Waiting :D

rcolistete 2012-08-06 09:42

Re: gcc compiler on N9?
 
Quote:

Originally Posted by ranbaxy (Post 1247228)
Thanks. I am on PR 1.2. # apt-get install build-essential doesn't work. Does it mean that I have to download gcc separately and get it installed since I am getting an error which I had posted in my previous post when I try # apt-get update?

Post #18 worked for PR1.2. It is a boring procedure, I know.

About my comment "I'll give more details on how-to-do it easily later today" :
- I am late because very busy with packaging and documenting Easy Debian Harmattan;
- a simple solution to have gcc/g++ on N9/N950 is chrooting a Maemo or Harmattan SDK image, by using Easy Chroot for Harmattan. I will post a topic about this solution, citing ready-to-use images.

ranbaxy 2012-08-06 09:59

Re: gcc compiler on N9?
 
Quote:

Originally Posted by rcolistete (Post 1248198)
Post #18 worked for PR1.2. It is a boring procedure, I know.

About my comment "I'll give more details on how-to-do it easily later today" :
- I am late because very busy with packaging and documenting Easy Debian Harmattan;
- a simple solution to have gcc/g++ on N9/N950 is chrooting a Maemo or Harmattan SDK image, by using Easy Chroot for Harmattan. I will post a topic about this solution, citing ready-to-use images.

You are awesome! :) Let me check your thread. Thanks brother :o

rcolistete 2012-08-16 23:14

Re: gcc compiler on N9?
 
As promised, new topic about "Compiling & packaging on MeeGo Harmattan device", listing many ways to compile (with gcc/g++, etc) & package softwares on MeeGo Harmattan devices.


All times are GMT. The time now is 05:14.

vBulletin® Version 3.8.8