maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   gcc-4.6 and Fremantle, WIP (https://talk.maemo.org/showthread.php?t=81861)

AapoRantalainen 2012-02-24 06:33

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by szopin (Post 1168318)
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:11467

Assertation comes from ld, which comes from package binutils and source file is elf32-arm.c.
Comment above assert is
Quote:

If the output has no requirement about FP hardware, follow the requirement of the input.
FP=floating point
I don't know what are these requirements, what they should be, where or how they should be defined.
*when gcc is compiled?
*when binutils is compiled?
*when gcc and binutils are used?

--
Assertation is easily disabled, just remove mentioned line on mentioned file and recompile binutils. It will work same way after that, without nagging. But there might be good reason for that assertation failing and that should be fixed.

ivgalvez 2012-03-25 17:01

Re: gcc-4.6 and Fremantle, WIP
 
Could it be possible to, at least, upgrade the OBS and Scratchbox to gcc4.4?

That would be a point to start with. Rebuild CSSU, then start rebuildong some application in extras-devel, finally every new application pushed to extras could then be built with a newer version of the compiler.

marmistrz 2012-04-15 11:26

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by ivgalvez (Post 1183950)
Could it be possible to, at least, upgrade the OBS and Scratchbox to gcc4.4?

That would be a point to start with. Rebuild CSSU, then start rebuildong some application in extras-devel, finally every new application pushed to extras could then be built with a newer version of the compiler.

http://forum.meego.com/showpost.php?p=27649&postcount=2

Here is how to add the harmattan repository. Libstdc++6 v4.4 is out there.

I'm downloading Aapo's stuff, and will check it out.

EDIT: has anyone tried installing this directly on device?

marmistrz 2012-05-20 16:06

Re: gcc-4.6 and Fremantle, WIP
 
Has anyone tried to compile libc6 >= 2.10?
I managed to run lots of harmattan apps using meego binaries + Aapo's libstdc++6, but now newer libc6 is missing. Binary ver. from meego not working

AapoRantalainen 2012-05-22 10:39

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1209682)
Has anyone tried to compile libc6 >= 2.10?

I'm on it, namely on trunk of elibc (version > 2.15). I'm not fully tested results or checked steps, but here comes sketch how it should go (my vision).

(I have binutils2.22 installed, not sure is it needed. More info later)

You need newer gcc than 4.2.


Libc needs autoconf2.68.

Autoconf2.68 needs:
m4 1.4.13, but we have only 1.4.8-2.
pkg-config 0.26, but we have only 0.22


Compiling m4 1.4.13:
Based on ubuntu 12.04 package
lower dependency of texi2html
Code:

#this check is failing
rm ./checks/005.command_li
#this test is failing
rm ./tests/test-spawn-pipe.sh

Installing m4
Code:

fakeroot dpkg -i

Compiling pkg-config 0.26
Based on ubuntu 12.04 package
Fetch debian/rules from Fremantles version


installing pkg-config
Code:

fakeroot dpkg -i ../pkg-config_0.26-1ubuntu1_armel.deb
#outside of scratchbox
sudo rm /scratchbox/devkits/autotools-legacy/bin/pkg-config
sudo ln -s /scratchbox/users/`whoami`/targets/FREMANTLE_ARMEL/usr/bin/pkg-config /scratchbox/devkits/autotools-legacy/bin/pkg-config


Compiling autoconf2.68
Based on ubuntu 12.04 package
Code:

echo 5 > /debian/compat

Installing autoconf
Code:

fakeroot dpkg -i ../autoconf_2.68-1ubuntu2_all.deb
#outside of scratchbox
sudo rm /scratchbox/devkits/autotools-legacy/bin/autoconf
sudo ln -s /scratchbox/users/`whoami`/targets/FREMANTLE_ARMEL/usr/bin/autoconf /scratchbox/devkits/autotools-legacy/bin/autoconf


Compiling eglibc
Code:

svn co svn://svn.eglibc.org/branches/eglibc-2_14 eglibc
mkdir eglibc_build
cd eglibc_build
CC=gcc-4.6 ../eglibc/libc/configure --enable-add-ons=nptl,../eglibc/ports --prefix=/opt/
make


AapoRantalainen 2012-05-22 10:46

Re: gcc-4.6 and Fremantle, WIP
 
@marmistrz Four weeks ago you advised me how to get binutils2.22 to the repository, now I'm trying to achieve it (some issues with autobuilder).

Package name is binutils2.22 (no conflicts with existing package names). It's files goes to the /usr/binutils2.22/bin, /usr/binutils2.22/lib and ... (no conflicts with existing files). And name of binaries is still as expected, e.g. ld.

And it is used:
Code:

PATH=/usr/binutils2.22/bin:$PATH
LD_LIBRARY_PATH=/usr/binutils2.22/lib:$LD_LIBRARY_PATH


marmistrz 2012-05-22 11:22

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1210671)
I'm on it, namely on trunk of elibc (version > 2.15). I'm not fully tested results or checked steps, but here comes sketch how it should go (my vision).

(I have binutils2.22 installed, not sure is it needed. More info later)

You need newer gcc than 4.2.


Libc needs autoconf2.68.

Autoconf2.68 needs:
m4 1.4.13, but we have only 1.4.8-2.
pkg-config 0.26, but we have only 0.22


Compiling m4 1.4.13:
Based on ubuntu 12.04 package
lower dependency of texi2html
Code:

#this check is failing
rm ./checks/005.command_li
#this test is failing
rm ./tests/test-spawn-pipe.sh

Installing m4
Code:

fakeroot dpkg -i

Compiling pkg-config 0.26
Based on ubuntu 12.04 package
Fetch debian/rules from Fremantles version


installing pkg-config
Code:

fakeroot dpkg -i ../pkg-config_0.26-1ubuntu1_armel.deb
#outside of scratchbox
sudo rm /scratchbox/devkits/autotools-legacy/bin/pkg-config
sudo ln -s /scratchbox/users/`whoami`/targets/FREMANTLE_ARMEL/usr/bin/pkg-config /scratchbox/devkits/autotools-legacy/bin/pkg-config


Compiling autoconf2.68
Based on ubuntu 12.04 package
Code:

echo 5 > /debian/compat

Installing autoconf
Code:

fakeroot dpkg -i ../autoconf_2.68-1ubuntu2_all.deb
#outside of scratchbox
sudo rm /scratchbox/devkits/autotools-legacy/bin/autoconf
sudo ln -s /scratchbox/users/`whoami`/targets/FREMANTLE_ARMEL/usr/bin/autoconf /scratchbox/devkits/autotools-legacy/bin/autoconf


Compiling eglibc
Code:

svn co svn://svn.eglibc.org/branches/eglibc-2_14 eglibc
mkdir eglibc_build
cd eglibc_build
CC=gcc-4.6 ../eglibc/libc/configure --enable-add-ons=nptl,../eglibc/ports --prefix=/opt/
make


Could you upload some binaries as soon as you have 'em?
I could test whether it works with forum-tmo from meego.

AapoRantalainen 2012-05-22 14:04

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1210687)
Could you upload some binaries as soon as you have 'em?

eglibc-svn-r18520 (2012-05-12 18:44:41)
http://cc.oulu.fi/~rantalai/maemo/libc.so

It seems to work when used with LD_LIBRARY_PATH. I don't know how to overwrite system's libc (system reboots when I tried).

marmistrz 2012-05-22 14:20

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1210771)
eglibc-svn-r18520 (2012-05-12 18:44:41)
http://cc.oulu.fi/~rantalai/maemo/libc.so

It seems to work when used with LD_LIBRARY_PATH. I don't know how to overwrite system's libc (system reboots when I tried).

When put to /opt/meecolay/lib, named libc.so.6 (and set LD_LIBRARY_PATH to this)
this gives Segmentation fault.

Even running meecolay, which is just a modified /usr/bin/preenv script. (diff. vars & preloads) there is Segmentation fault

The same happens with MeeGo's libc6 (2.10 or 2.9 iirc)

is newer libstdc++ > 4.6 required or some other lib?

vetsin 2012-05-22 14:33

Re: gcc-4.6 and Fremantle, WIP
 
@AapoRantalainen
hope you don't mind this: http://talk.maemo.org/showthread.php?t=84322&page=7
:) though i don't think that's really the official nomination thread. just so you know that your effort's being appreciated.

sorry for being off-topic. :p

AapoRantalainen 2012-05-22 19:40

Re: gcc-4.6 and Fremantle, WIP
 
With harmattan target I fetch apt-get source libc6 and compiled it for fremantle target.

http://cc.oulu.fi/~rantalai/maemo/glibc_from_harmattan/
There are debs and raw libc.so.

marmistrz 2012-05-22 19:48

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1210930)
With harmattan target I fetch apt-get source libc6 and compiled it for fremantle target.

http://cc.oulu.fi/~rantalai/maemo/glibc_from_harmattan/
There are debs and raw libc.so.

Strange, these are still old 2.5 packages, as in fremantle.
I was talking about these packages.
Was it a typo or did you build eglibc v2.5?

note: if you want exact details about the harmattan repo, they're right there: http://forum.meego.com/showpost.php?p=27649&postcount=2

marmistrz

AapoRantalainen 2012-05-22 19:58

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1210933)
Strange, these are still old 2.5 packages, as in fremantle.

You are right, I messed with my targets. Yes, last one was fremantle packages for fremantle (not very excited).

AapoRantalainen 2012-05-22 20:45

Re: gcc-4.6 and Fremantle, WIP
 
Package binutils2.22 are in extras-devel. It doesn't conflict with any package (no names, no files).
Code:

/usr/binutils2.22/bin/ld is symlink to the ld.bfd
and
Code:

ldd /usr/binutils2.22/bin/ld.bfd
->  /usr/binutils2.22/lib/libbfd-2.22-system.so

So LD_LIBRARY_PATH might be useless.

At least this is working:
Code:

PATH=/usr/binutils2.22/bin:$PATH ld --version
-> 2.22


AapoRantalainen 2012-05-24 05:23

Re: gcc-4.6 and Fremantle, WIP
 
Compiling Harmattan's libc6 keeps qemu crashing. I decided to compile it straight on the phone. It could take days, 10 hours back already. (And I'm not still sure will it compile, and will result work as expected)

marmistrz 2012-05-24 12:20

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1211712)
Compiling Harmattan's libc6 keeps qemu crashing. I decided to compile it straight on the phone. It could take days, 10 hours back already. (And I'm not still sure will it compile, and will result work as expected)

Seems hard.
I'll fire up my maemo sdk, just to check whether it's a sb2-connected problem

N' I've got an idea, why the libc > 2.11 doesn't work. Harmattan's is eglibc. The ubuntu's/debian's/whatever's is normal glibc.

marmistrz 2012-05-24 13:02

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1210964)
Package binutils2.22 are in extras-devel. It doesn't conflict with any package (no names, no files).
Code:

/usr/binutils2.22/bin/ld is symlink to the ld.bfd
and
Code:

ldd /usr/binutils2.22/bin/ld.bfd
->  /usr/binutils2.22/lib/libbfd-2.22-system.so

So LD_LIBRARY_PATH might be useless.

At least this is working:
Code:

PATH=/usr/binutils2.22/bin:$PATH ld --version
-> 2.22


after apt-get update I'm getting this:
Code:

Ignoring Provides line with DepCompareOp for package binutils
Doesn't seem fatal, but just letting you know.

marmistrz 2012-05-25 18:19

Re: gcc-4.6 and Fremantle, WIP
 
My Scratchbox doesn't crash, but I'm getting this:


Code:

:1: sorry, unimplemented: -mfloat-abi=hard and VFP
On both gcc 4.2 and your 4.6

Here are the last lines from 4.6
http://pastebin.com/6vmEE8Uh

AapoRantalainen 2012-05-26 07:18

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1212478)
Code:

:1: sorry, unimplemented: -mfloat-abi=hard and VFP

pass --host=arm-unknown-linux-gnueabi --build=arm-unknown-linux-gnueabi to configure. (debian/rules uses that, and it starts compiling)

marmistrz 2012-05-26 10:08

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1212713)
pass --host=arm-unknown-linux-gnueabi --build=arm-unknown-linux-gnueabi to configure. (debian/rules uses that, and it starts compiling)

This is the modified debian/rules.d/build.mk
http://pastebin.com/USC6y5xq

Still gettin' this error.

marmistrz 2012-05-28 18:01

Re: gcc-4.6 and Fremantle, WIP
 
I think I'm nearly there,
I removed the line with -mfloat-abi=hard and VFP
from debian/sysdeps/armel.mk

And it seems to compile.
It requires debhelper7, as in sdk dh5 there's dh_lintian missing

marmistrz 2012-05-28 18:34

Re: gcc-4.6 and Fremantle, WIP
 
Yes!!!!!
I compiled it!!!!!!
I'll upload it 2moro!!

marmistrz 2012-05-29 10:01

Re: gcc-4.6 and Fremantle, WIP
 
OK, I copied the libc stuff to /opt/meecolay/* and still segmentation fault.
Seems that it's not as easy to tame as libstdc++6.

Do you have any idea why it causes seg fault?

I'm not @ home, so I'll upload only libc6 and libc-bin.
I'll upload the rest later.

It's here: http://marmistrz.net63.net/meecolay/libc6

AapoRantalainen 2012-05-30 07:02

Re: gcc-4.6 and Fremantle, WIP
 
I'm proceeding with gcc-4.6!

I dropped i386 version entirely
(
It tries to compile i386-version with 64bit multilib support, and that is very hard to turn off. It was easier to me to just drop i386 version. Do we need this?
)

Now extras-devel has gcc-4.6 package which contains working binary for gcc-4.6. It still has some dependencies for non-existing packages, so it can't be installed (but can be downloaded and extracted).
http://maemo.org/packages/package_in.../4.6.1-maemo5/
Next version is on builder already, but it takes some 48h to compile.

Packaging of gcc is tricky as it generates/modifies own packaging files during packeting.

marmistrz 2012-05-30 08:45

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1214776)
I'm proceeding with gcc-4.6!

I dropped i386 version entirely
(
It tries to compile i386-version with 64bit multilib support, and that is very hard to turn off. It was easier to me to just drop i386 version. Do we need this?
)

Now extras-devel has gcc-4.6 package which contains working binary for gcc-4.6. It still has some dependencies for non-existing packages, so it can't be installed (but can be downloaded and extracted).
http://maemo.org/packages/package_in.../4.6.1-maemo5/
Next version is on builder already, but it takes some 48h to compile.

Packaging of gcc is tricky as it generates/modifies own packaging files during packeting.


Is the new libstdc++ and libgcc1 safe enough to install it on device (upgrade)?

AapoRantalainen 2012-05-30 09:04

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1214833)
Is the new libstdc++ and libgcc1 safe enough to install it on device (upgrade)?

On developing/hacking device, yes. Maybe not on everyday device.

I upgraded my device and it is still booting (without RD-mode) and working. I have tested only couple of applications, but they worked as earlier.

marmistrz 2012-05-30 11:03

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1214837)
On developing/hacking device, yes. Maybe not on everyday device.

I upgraded my device and it is still booting (without RD-mode) and working. I have tested only couple of applications, but they worked as earlier.

So I'll wait until it's more sure that it's safe, as N900 is my main device

marmistrz 2012-05-30 14:51

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1214776)
I'm proceeding with gcc-4.6!

I dropped i386 version entirely
(
It tries to compile i386-version with 64bit multilib support, and that is very hard to turn off. It was easier to me to just drop i386 version. Do we need this?
)

Now extras-devel has gcc-4.6 package which contains working binary for gcc-4.6. It still has some dependencies for non-existing packages, so it can't be installed (but can be downloaded and extracted).
http://maemo.org/packages/package_in.../4.6.1-maemo5/
Next version is on builder already, but it takes some 48h to compile.

Packaging of gcc is tricky as it generates/modifies own packaging files during packeting.

I think we do for compiling: autobuilder compiles for armel & i386

marmistrz 2012-05-30 15:29

Re: gcc-4.6 and Fremantle, WIP
 
Has anyone tried to replace the stock libc6 with mine?
Maybe in other path it doesn't work but may work in normal path (/usr/*)

Btw. I uploaded the source I built. The depends have to be modified, as I used -d flag

It's the md5sum, as I had problems uploading

76d4e0b20b5573738604298c886a07fe eglibc_2.10-0maemo18.1+0m6.tar.gz

I'll upload the rest of built packages soon.

download it here: http://marmistrz.net63.net/meecolay/libc6

It runs OK on scratchbox

pablocrossa 2012-05-30 18:52

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1214995)
Has anyone tried to replace the stock libc6 with mine?
Maybe in other path it doesn't work but may work in normal path (/usr/*)

Btw. I uploaded the source I built. The depends have to be modified, as I used -d flag

It's the md5sum, as I had problems uploading

76d4e0b20b5573738604298c886a07fe eglibc_2.10-0maemo18.1+0m6.tar.gz

I'll upload the rest of built packages soon.

download it here: http://marmistrz.net63.net/meecolay/libc6

It runs OK on scratchbox

Mind attatching a compiled library?? :)

marmistrz 2012-05-30 18:55

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by pablocrossa (Post 1215108)
Mind attatching a compiled library?? :)

Sorry, I've got too slow net to do it :(
I barely uploaded eglibc source. And debs weren't uploaded @home
Here are the 2 libs needed.

http://marmistrz.net63.net/meecolay/libc6

it's libc6 and libc-bin

both the compiled version. I didn't test them on-device

pablocrossa 2012-05-30 21:11

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by marmistrz (Post 1215110)
Sorry, I've got too slow net to do it :(
I barely uploaded eglibc source. And debs weren't uploaded @home
Here are the 2 libs needed.

http://marmistrz.net63.net/meecolay/libc6

it's libc6 and libc-bin

both the compiled version. I didn't test them on-device

meecolay segfaults on me, cannot risk a flash right now, need my phone operational, sorry :(
anyone up for the test?? those of you with more than one N900 (or time to reflash ;) )

marmistrz 2012-05-31 05:00

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by pablocrossa (Post 1215191)
meecolay segfaults on me, cannot risk a flash right now, need my phone operational, sorry :(
anyone up for the test?? those of you with more than one N900 (or time to reflash ;) )

Seconding this. The same situation is about me :(

szopin 2012-05-31 11:11

Re: gcc-4.6 and Fremantle, WIP
 
Heh... I was wondering where did the 4.6 come from in apt-get. Sadly fighting to get a working automake/conf I forced a thing or two too many and my testing device no longer boots. Will test the libc6 as soon as I get it flashed (laptop also crashed, so unless I can flash with the second N900, might take a while... this has been a bad week for tech)

pablocrossa 2012-06-01 01:25

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by szopin (Post 1215432)
Heh... I was wondering where did the 4.6 come from in apt-get. Sadly fighting to get a working automake/conf I forced a thing or two too many and my testing device no longer boots. Will test the libc6 as soon as I get it flashed (laptop also crashed, so unless I can flash with the second N900, might take a while... this has been a bad week for tech)

This would be perfect as a 'vanilla' if you will N900 is a perfect test candidate (maybe kernel-power would be a good idea due to the vast amount of linux-features it provides).

[OT]
I have to say the idea of flashing an N900 with another N900 is pretty cool. So long as you have hostmode and a compiled version of flasher-3.5 it should be perfectly doable :)
[/OT]

Estel 2012-06-01 05:08

Re: gcc-4.6 and Fremantle, WIP
 
[OT] Or even better, Pali's FOSS flasher replacement. I also agree, that idea is cool. But do we have necessary modules in kernel? Shall we start another thread about it?[/OT]

/Estel

Estel 2012-06-01 05:09

Re: gcc-4.6 and Fremantle, WIP
 
[OT] Or even better, Pali's FOSS flasher replacement. I also agree, that idea is cool. But do we have necessary modules in kernel? Shall we start another thread about it?[/OT]

/Estel

AapoRantalainen 2012-06-01 06:49

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by pablocrossa (Post 1215191)
anyone up for the test?? those of you with more than one N900 (or time to reflash ;) )

My spare device is waiting for reflash (so many uninstalled packages. and so many experimental packages installed).
I made test:
Code:

wget http://marmistrz.net63.net/meecolay/libc6/libc6_2.10-0maemo18.1+0m6_armel.deb
wget http://marmistrz.net63.net/meecolay/libc6/libc-bin_2.10-0maemo18.1+0m6_armel.deb

md5sum *.deb
d2846a1d22ee6e24e45f684eadc2f633  libc-bin_2.10-0maemo18.1+0m6_armel.deb
1415865d66680726c56825b72688a1b3  libc6_2.10-0maemo18.1+0m6_armel.deb

dpkg -i libc6_2.10-0maemo18.1+0m6_armel.deb libc-bin_2.10-0maemo18.1+0m6_armel.deb

reboot

Device boots and seems to work.

marmistrz 2012-06-01 13:42

Re: gcc-4.6 and Fremantle, WIP
 
Quote:

Originally Posted by AapoRantalainen (Post 1215819)
My spare device is waiting for reflash (so many uninstalled packages. and so many experimental packages installed).
I made test:
Code:

wget http://marmistrz.net63.net/meecolay/libc6/libc6_2.10-0maemo18.1+0m6_armel.deb
wget http://marmistrz.net63.net/meecolay/libc6/libc-bin_2.10-0maemo18.1+0m6_armel.deb

md5sum *.deb
d2846a1d22ee6e24e45f684eadc2f633  libc-bin_2.10-0maemo18.1+0m6_armel.deb
1415865d66680726c56825b72688a1b3  libc6_2.10-0maemo18.1+0m6_armel.deb

dpkg -i libc6_2.10-0maemo18.1+0m6_armel.deb libc-bin_2.10-0maemo18.1+0m6_armel.deb

reboot

Device boots and seems to work.

Which have you got kernel-power or something installed, as for other user (laren0) this gave internal error for calendar and a bricked device?

bsd1101 2012-06-02 09:13

Re: gcc-4.6 and Fremantle, WIP
 
did apt-get gcc-4.6....bad idea in my case. Phone would not restart. Hung on the nokia logo. Repartitioned, reinstalling and will have about 2 hours of sleep before work FML.


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

vBulletin® Version 3.8.8