maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   HOWTO: C/C++ compiling on the unit itself. (https://talk.maemo.org/showthread.php?t=6737)

robmiller 2007-07-20 21:59

Re: HOWTO: C/C++ compiling on the unit itself.
 
can anyone supply a hint or fix for the binutils ld not finding shared libraries?

Code:

Nokia-N800-26:~# ldconfig -v | grep crypto
        libcrypto.so.0.9.7 -> libcrypto.so.0.9.7
Nokia-N800-26:~# ldconfig --print-cache | grep crypto
        libcrypto.so.0.9.7 (libc6) => /usr/lib/libcrypto.so.0.9.7
Nokia-N800-26:~# ld -lcrypto
ld: cannot find -lcrypto
Nokia-N800-26:~# ls /usr/lib/libcrypto*
/usr/lib/libcrypto.so.0.9.7
Nokia-N800-26:~# ls /usr/lib/libc.*
/usr/lib/libc.a  /usr/lib/libc.so
Nokia-N800-26:~# ld -lc
ld: BFD 2.16.91 20051213 assertion fail /home/ed/su18-2006se-armel-sandbox.gcc34qemu.distcc/work/binutils-2.16.91cs2005q3.2/bfd/elf32-arm.c:2320
ld: warning: cannot find entry symbol _start; defaulting to 00008100
Nokia-N800-26:~#

?

thanks,

rob.

edit:

the problem is with libs that do not end in .so :

Code:


Nokia-N800-26:~/code# ls /usr/lib/libcrypto*
/usr/lib/libcrypto.so.0.9.7
Nokia-N800-26:~/code# cd /usr/lib
Nokia-N800-26:/usr/lib# ld -lcrypto
ld: cannot find -lcrypto
Nokia-N800-26:/usr/lib# ln -s libcrypto.so.0.9.7 libcrypto.so
Nokia-N800-26:/usr/lib# ld -lcrypto
ld: BFD 2.16.91 20051213 assertion fail /home/ed/su18-2006se-armel-sandbox.gcc34qemu.distcc/work/binutils-2.16.91cs2005q3.2/bfd/elf32-arm.c:2320
ld: warning: cannot find entry symbol _start; defaulting to 00008248
Nokia-N800-26:/usr/lib#

rob.

i.rachita 2007-08-07 10:37

Re: HOWTO: C/C++ compiling on the unit itself.
 
I had some errors when i was trying to install g++. A file was missed in the wget step and another one that was downloaded wasn't installed.
Here is the modified script that worked for me.

Code:

wget http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/libstdc++6_3.4.4cs2005q3.2-5.osso3_armel.deb http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/gcc-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/libstdc++6-dev_3.4.4cs2005q3.2-5.osso3_armel.deb  http://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/g++-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb  http://repository.maemo.org/pool/maemo3.1/free/binary/libc6_2.3.5cs2005q3.2-5.osso12_armel.deb  http://repository.maemo.org/pool/maemo3.2/free/binary/libc6-dev_2.3.5cs2005q3.2-5.osso12_armel.debhttp://repository.maemo.org/pool/maemo3.1/free/binary/linux-kernel-headers_2.6.16.osso7_armel.deb  http://repository.maemo.org/pool/maemo2.2/free/b/binutils/binutils_2.16.91cs2005q3.2-5.osso1_armel.debhttp://repository.maemo.org/pool/maemo2.2/free/g/gcc-3.4/cpp-3.4_3.4.4cs2

dpkg -i binutils_2.16.91cs2005q3.2-5.osso1_armel.deb
dpkg -i linux-kernel-headers_2.6.16.osso7_armel.deb
dpkg -i libc6_2.3.5cs2005q3.2-5.osso12_armel.deb
dpkg -i libc6-dev_2.3.5cs2005q3.2-5.osso12_armel.deb
dpkg -i cpp-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb
dpkg -i gcc-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb

dpkg -i libstdc\+\+6-dev_3.4.4cs2005q3.2-5.osso3_armel.deb
dpkg -i g\+\+-3.4_3.4.4cs2005q3.2-5.osso3_armel.deb

apt-get -f install

I hope i haven't missed anything.

torx 2007-08-07 12:15

Re: HOWTO: C/C++ compiling on the unit itself.
 
Thanks rob and i.rachita for the update/fix!

Anyway rob, does that mean that libraries that end in .so will work now? Is it only libcrypto that is affected or are there other libraries that don't end in .so too?

gotanga 2007-08-07 15:54

Re: HOWTO: C/C++ compiling on the unit itself.
 
Hi,

This looks brilliant, and i'll try it out soon. Should i consider converting/creating a new partition (efs and jffs2 are mentioned) on my internal memory card for this?

torx 2007-08-08 06:56

Re: HOWTO: C/C++ compiling on the unit itself.
 
Quote:

Originally Posted by gotanga (Post 66226)
Hi,

This looks brilliant, and i'll try it out soon. Should i consider converting/creating a new partition (efs and jffs2 are mentioned) on my internal memory card for this?

That's really up to you, it takes up 50mb on my uncompressed filesystem. On a jffs2 partition, it should take up a lot lesser.

click170 2008-02-03 01:44

Re: HOWTO: C/C++ compiling on the unit itself.
 
Great post, thanks for the info!

Much appreciated.

codeMonkey 2008-02-22 21:45

Re: HOWTO: C/C++ compiling on the unit itself.
 
Agreed. Just followed a modified version to get gcc working on an N800 in OS2008 and it works a treat. Portable c++ development here I come.

Baranman 2008-02-27 16:03

Re: HOWTO: C/C++ compiling on the unit itself.
 
Hi,

Then, it's possible to compile a c or c++ app source like in any other linux dist?

I'm thinking that if we have the make utilitie and c/c++ libs, it's possible to make ./configure make make install/or buid package with dpkg utilitie, is it true?

sorry if this is an stupid question, i'm new with the IT, and escuse my poor english.

dont 2008-02-27 16:12

Re: HOWTO: C/C++ compiling on the unit itself.
 
I would love to see a complete replacement for Scratchbox that runs on the tablet. Plus Glade.

This is way beyond my capabilities to create but I would cheer heartily from the sidelines.;)

OSEmuTech 2008-03-09 02:47

Re: HOWTO: C/C++ compiling on the unit itself.
 
This is so cool. As I read a PDF about C++ using the Evince Document reader, I can try out the examples using SciTE.

http://fkwjcw.bay.livefilestore.com/...Q/sciteIDE.png


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

vBulletin® Version 3.8.8