LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 01-30-2012, 07:31 AM   #1
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Rep: Reputation: Disabled
where are gtk+-2.0 libraries in rhe codesourcery toolchain


Hi All,

I am using Ubuntu 11.10 and the Code Sourcery 2011.09 toolchain. Our target is a BeagleBoard (ARM). We can use the toolchain to compile for our target successfully, as long as we don't use gtk. When we try to include gtk/gtk we get this:

fatal error: gtk/gtk.h: No such file or directory

We cannot find gtk+-2.0 anywhere in the toolchain.

Can anyone tell us where to find it or do we have to install it and if so, where from?

Thanks for your help.

Last edited by Famwen; 01-30-2012 at 09:02 AM. Reason: spelling
 
Old 01-31-2012, 09:48 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.
Quote:
We can use the toolchain to compile for our target successfully,
as long as we don't use gtk.
I guess, you have just been lucky (until now) that no any extra
libraries were required. Usually nothing but the libs supplied by
*libc and gcc are part of a tool chain.

GTK2 and dependencies must be cross compiled before you can use it:
glib, atk, cairo, pango, gdk-pixbuf →
http://ftp.gnome.org/pub/gnome/sources/


Note : The "Report" button can be used to ask for this thread
to be moved to the 'Embedded Forum', where arm specialists
may answer your questions.
http://www.linuxquestions.org/questi...x-embedded-78/

.

Last edited by knudfl; 01-31-2012 at 09:50 PM.
 
Old 02-01-2012, 02:11 PM   #3
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for the response!

Thanks for answering our question.

One more thing. We are Linux noobs. Can you point us at a doc, or something, that will give us instructions on how to build this stuff?

Thanks again.
 
Old 02-01-2012, 05:36 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Say your other arm stuff has a location like /opt/arm/ .

Then start with glib http://ftp.gnome.org/pub/gnome/sources/glib/ ,
like : cd glib-2.24.2/ && ./configure --prefix=/opt/arm/ && make
&& sudo make install :
Then the libraries will have this location : /opt/arm/lib/

The following packages, atk etc. , something like :
export LD_LIBRARY_PATH=/opt/arm/lib
&& export PKG_CONFIG_LIBDIR=/opt/arm/lib/pkgconfig && <etc.>


And : Please use the Report button :
To get this thread moved to Embedded.

.

Last edited by knudfl; 02-01-2012 at 05:55 PM.
 
Old 02-01-2012, 08:00 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <EMBEDDED> and has been moved at OPs request.
 
Old 02-02-2012, 07:32 AM   #6
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks again, still another question.

One more question!

We did the following:

dennis@Ubuntu:~/glib-2.24.2$ ./configure --prefix=/home/dennis/arm-2011.09 && make && sudo make install

It worked fine, however, any compiling that was done was not done with our cross compiler whose name is "arm-none-linux-gnueabi-gcc" is there a way to tell configure to use this compiler?

Thanks again for the help.
 
Old 02-02-2012, 08:49 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
First : cd glib-2.24.2/ && sudo make uninstall
( sudo is only required in /home/dennis/
if sudo by mistake was used at install ).


The "install" commands can be like :

export CC=arm-none-linux-gnueabi-gcc &&
./configure --prefix=/home/dennis/arm-2011.09 && make
&& make install : No sudo !

.
 
Old 02-08-2012, 02:21 PM   #8
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
More problems

Hi,

we did this:

dennis@Ubuntu:~/glib-2.24.2$ ./configure --prefix=/home/dennis/arm-2011.09

and got this:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for the BeOS... no
checking for Win32... no
checking for Mac OS X Carbon support... checking for style of include used by make... GNU
checking for gcc... arm-none-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/dennis/glib-2.24.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

We do not know what ./config wants for the --host parameter. Can you help?
 
Old 02-08-2012, 03:33 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
This is a serious error :
Quote:
configure: error: cannot run C compiled programs.
./configure --prefix=/home/dennis/arm-2011.09 \
CC="arm-none-linux-gnueabi-gcc -I /<path-to-libc-headers>"



Quote:
If you meant to cross compile, use `--host'.
Probably add a configure option like --host=arm..

.

Last edited by knudfl; 02-08-2012 at 03:35 PM.
 
Old 02-08-2012, 03:45 PM   #10
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Another issue

Thanks again for all your help.

We did this:

dennis@Ubuntu:~/glib-2.24.2$ ./configure --prefix=/home/dennis/arm-2011.09 -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi --host=arm

and got this:

configure: error: unrecognized option: `-I'
Try `./configure --help' for more information.
dennis@Ubuntu:~/glib-2.24.2$
 
Old 02-08-2012, 03:57 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
-I and -L options must be inside double quotes with the used gcc* to work.
Example: ./configure CC="gcc -I/<folder> -I/<other-folder> -L/<??>"

Like :
./configure CC="arm-none-linux-gnueabi-gcc -I /<path-to-libc-headers>"

... Where <path-to-libc-headers> could be
/home/dennis//arm-2011.09/arm-none-linux-gnueabi/include/ ,
if that's the folder with the *libc files.h

.

Last edited by knudfl; 02-08-2012 at 03:59 PM.
 
Old 02-08-2012, 04:03 PM   #12
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
we did this:

dennis@Ubuntu:~/glib-2.24.2$ ./configure --prefix=/home/dennis/arm-2011.09 CC="arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi" --host=arm

got this:

configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-none
checking for the BeOS... no
checking for Win32... no
checking for Mac OS X Carbon support... checking for style of include used by make... GNU
checking for arm-gcc... arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi accepts -g... yes
checking for arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi option to accept ISO C89... none needed
checking dependency style of arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi... gcc3
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi -E
no
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for arm-gcc... (cached) arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi
checking whether we are using the GNU C compiler... (cached) yes
checking whether arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi accepts -g... (cached) yes
checking for arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi option to accept ISO C89... (cached) none needed
checking dependency style of arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi... (cached) gcc3
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi -E
checking for arm-c++... no
checking for arm-g++... no
checking for arm-gcc... no
checking for arm-CC... no
checking for arm-cxx... no
checking for arm-cc++... no
checking for arm-cl... no
checking for c++... c++
configure: WARNING: using cross tools not prefixed with host triplet
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for arm-gcc... (cached) arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi
checking whether we are using the GNU C compiler... (cached) yes
checking whether arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi accepts -g... (cached) yes
checking for arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi option to accept ISO C89... (cached) none needed
checking dependency style of arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi... (cached) gcc3
checking whether arm-none-linux-gnueabi-gcc -I /home/dennis/arm-2011.09/arm-none-linux-gnueabi and cc understand -c and -o together... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for pkg-config... /usr/bin/pkg-config
checking for gawk... (cached) mawk
checking for perl5... no
checking for perl... perl
checking for indent... no
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for iconv_open... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether we are using the GNU C Library 2.1 or newer... yes
checking Whether to cache iconv descriptors... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inflate in -lz... no
configure: error: *** Working zlib library and headers not found ***

thanks again!
 
Old 02-08-2012, 04:09 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
checking for arm-gcc... no
Please try this option instead of --host=arm :
--host=arm-none-linux-gnueabi



Quote:
configure: error: *** Working zlib library and headers not found ***
zlib must be cross compiled before glib-2.24.2

.
 
Old 02-14-2012, 09:30 AM   #14
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
If you were using Ubuntu with the Linaro toolchain, you would not need to cross-compile the libs for ARM, you should be able to use dpkg-cross / xapt instead.

Last edited by cnxsoft; 02-14-2012 at 09:31 AM. Reason: Forget to specify toolchain
 
Old 02-14-2012, 01:40 PM   #15
Famwen
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your help.

We are linux noobs. We have installed the Linaro toolchain, but do not know how "dpkg-cross / xapt" solves our problem. Can you explain pls?

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need installation disc to upgrade RHE 5 to RHE 6? phahn Linux - Enterprise 2 01-01-2012 03:31 PM
Difference between rhe advanced platform and rhe desktop? darsunt Red Hat 4 09-08-2007 12:04 PM
Having trouble using the gtk libraries. debiant Programming 1 09-06-2006 04:53 AM
GTK Libraries??? Kane635 Linux - Software 1 11-07-2004 09:23 PM
RHE, Ensim Basic for RHE, Plesk for RHE xbaez Linux - Software 0 09-21-2004 09:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration