* Finding include directories in the sysroot
@ 2013-05-20 18:38 Stephen Kelly
2013-05-20 18:52 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Kelly @ 2013-05-20 18:38 UTC (permalink / raw)
To: crossgcc
Hi there,
I have a rootfs which has Qt installed in /usr. So for example, qobject.h
exists at /usr/include/QtCore/qobject.h.
My rootfs is at ~/rpi/rasp-pi-rootfs.
I invoke
arm-linux-gnueabihf-g++-4.7 --sysroot=/home/stephen/rpi/rasp-pi-rootfs \
-I/usr/include/QtCore -v -c myfile.cpp
and I see this:
ignoring nonexistent directory "/usr/include/QtCore"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/include
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/include-fixed
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-
gnueabihf/include
/home/stephen/rpi/rasp-pi-rootfs/usr/include/arm-linux-gnueabihf
/home/stephen/rpi/rasp-pi-rootfs/usr/include
End of search list.
So, it's not finding /usr/include/QtCore in my host root file system, and
it
is not looking in the sysroot I passed, as I expected. I also tried using
the -isysroot option, with a similar result.
Is my expectation incorrect? What can I really expect from the sysroot
option?
My goal is implementing proper sysroot handling for the cmake buildsystem
tool, so I need to understand how it is intended to work and what can be
expected of it.
Thanks,
Steve.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Finding include directories in the sysroot
2013-05-20 18:38 Finding include directories in the sysroot Stephen Kelly
@ 2013-05-20 18:52 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2013-05-20 18:52 UTC (permalink / raw)
To: Stephen Kelly; +Cc: crossgcc
Stephen, All,
On 2013-05-20 20:38 +0200, Stephen Kelly spake thusly:
> I have a rootfs which has Qt installed in /usr. So for example, qobject.h
> exists at /usr/include/QtCore/qobject.h.
>
> My rootfs is at ~/rpi/rasp-pi-rootfs.
>
> I invoke
>
> arm-linux-gnueabihf-g++-4.7 --sysroot=/home/stephen/rpi/rasp-pi-rootfs \
> -I/usr/include/QtCore -v -c myfile.cpp
From the gcc manpage for -I :
-I dir
Add the directory dir to the list of directories to be searched
for header files. Directories named by -I are searched before
the standard system include directories. If the directory dir
is a standard system include directory, the option is ignored
to ensure that the default search order for system directories
and the special treatment of system headers are not defeated.
If dir begins with "=", then the "=" will be replaced by the
sysroot prefix; see --sysroot and -isysroot.
So, absolute paths are just taken as-is. If you want it to be relative
to the sysroot, you have to prepend a '=' sign, as thus (untested):
arm-linux-gnueabihf-g++-4.7 --sysroot=/home/stephen/rpi/rasp-pi-rootfs \
-I=/usr/include/QtCore -v -c myfile.cpp
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-20 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-20 18:38 Finding include directories in the sysroot Stephen Kelly
2013-05-20 18:52 ` Yann E. MORIN
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).