public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* cross-compile gstreamer: can't find "glibconfig.h"
@ 2016-08-15 12:42 Ken Bass
  2016-08-15 15:08 ` ANDY KENNEDY
  2016-08-18  3:48 ` Ken Bass
  0 siblings, 2 replies; 3+ messages in thread
From: Ken Bass @ 2016-08-15 12:42 UTC (permalink / raw)
  To: crossgcc

Simply put: where are the glib(1 or 2) files for the host/target?

I am building on an x86_64, and target is an rpi-1
(armv6-rpi-linux-gnueabifh). I have the toolchain built and it works
for a simple progam, such as "Hello World".

Here is the configure command:

./configure --host=armv6-rpi-linux-gnueabihf --includedir=<toolchain
path>/x-tools/ib/glib2.0/include CFLAGS="-g -pg" CXXFLAGS="-g -pg"
--with-pkg-config-path=<toolchain
path>/x-tools/armv6-rpi-linux-gnueabihf/lib/pkgconfig
--with-sysroot=/<toolchain
path>x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot

This runs ok. When I run make, for the first CC I get an error like
"glibconfig.h: No such file or directory".

I have glib(1 and 2.0) installed on the build system. But if I use
that, the compiler thinks the host is also a 64 bit system (which it
isn't).

Any ideas? Any and all help greatly appreciated.

TIA

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: cross-compile gstreamer: can't find "glibconfig.h"
  2016-08-15 12:42 cross-compile gstreamer: can't find "glibconfig.h" Ken Bass
@ 2016-08-15 15:08 ` ANDY KENNEDY
  2016-08-18  3:48 ` Ken Bass
  1 sibling, 0 replies; 3+ messages in thread
From: ANDY KENNEDY @ 2016-08-15 15:08 UTC (permalink / raw)
  To: 'Ken Bass', crossgcc

> Here is the configure command:
> 
> ./configure --host=armv6-rpi-linux-gnueabihf --includedir=<toolchain
> path>/x-tools/ib/glib2.0/include CFLAGS="-g -pg" CXXFLAGS="-g -pg"
> --with-pkg-config-path=<toolchain
> path>/x-tools/armv6-rpi-linux-gnueabihf/lib/pkgconfig
> --with-sysroot=/<toolchain
> path>x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot
> 
> This runs ok. When I run make, for the first CC I get an error like
> "glibconfig.h: No such file or directory".

Ken,

Have you installed glib into your sysroot?  If not, then
you would need to provide the location of the glib for
building gstream.

Depending on your setup, you may wish to build many of the
external libraries into your toolchain (assuming that you
won't be the only one using your toolchain), so that you
can easily distribute the toolchain throughout your
organization.

If this sounds promising to you, send me private mail
and I'll send you a patch against BuildRoot that will
allow you to build external libraries into your toolchain.

HTH,
Andy

> 
> I have glib(1 and 2.0) installed on the build system. But if I use
> that, the compiler thinks the host is also a 64 bit system (which it
> isn't).
> 
> Any ideas? Any and all help greatly appreciated.
> 
> TIA
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cross-compile gstreamer: can't find "glibconfig.h"
  2016-08-15 12:42 cross-compile gstreamer: can't find "glibconfig.h" Ken Bass
  2016-08-15 15:08 ` ANDY KENNEDY
@ 2016-08-18  3:48 ` Ken Bass
  1 sibling, 0 replies; 3+ messages in thread
From: Ken Bass @ 2016-08-18  3:48 UTC (permalink / raw)
  To: crossgcc

Ok, I solved this problem.

After messing around for quite some, I finally looked at the
config.log in detail - as well as configure's help. Turns out that
glib needs its own set of compile flags, at least for cross compiling.
Adding a "--sysroot=<>", along with the target's glib includedirs to
the GLIB_CFLAGS variable fixed that problem.

One really good suggestion I got from another forum, was to mount the
rpi's SD card on the build machine, and - for the cross compiler -
point the target's sysroot at the SD card's mount point. Then, all
inlcudedirs,and libdirs can be referenced below that sysroot. This of
course assumes that all required rpms (for the app - gstreamer), are
already installed on the SD card. Actually worked out really well.

And when I get the "make install" to work, then gstreamer will be
installed on the SD card. So the rpi would have everything installed,
and ready to run (or at least debug). Unfortunately, the "make
install" craps out not finding the armv6 cross compiler when it
(libtool) wants to rebuild something. But that will be a matter of
another post, so as not to confuse these two problems.

ken


On Mon, Aug 15, 2016 at 7:42 AM, Ken Bass <daytooner@gmail.com> wrote:
> Simply put: where are the glib(1 or 2) files for the host/target?
>
> I am building on an x86_64, and target is an rpi-1
> (armv6-rpi-linux-gnueabifh). I have the toolchain built and it works
> for a simple progam, such as "Hello World".
>
> Here is the configure command:
>
> ./configure --host=armv6-rpi-linux-gnueabihf --includedir=<toolchain
> path>/x-tools/ib/glib2.0/include CFLAGS="-g -pg" CXXFLAGS="-g -pg"
> --with-pkg-config-path=<toolchain
> path>/x-tools/armv6-rpi-linux-gnueabihf/lib/pkgconfig
> --with-sysroot=/<toolchain
> path>x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot
>
> This runs ok. When I run make, for the first CC I get an error like
> "glibconfig.h: No such file or directory".
>
> I have glib(1 and 2.0) installed on the build system. But if I use
> that, the compiler thinks the host is also a 64 bit system (which it
> isn't).
>
> Any ideas? Any and all help greatly appreciated.
>
> TIA

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-18  3:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 12:42 cross-compile gstreamer: can't find "glibconfig.h" Ken Bass
2016-08-15 15:08 ` ANDY KENNEDY
2016-08-18  3:48 ` Ken Bass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).