* [Buildroot] xlib libXt build problem
@ 2009-07-27 17:30 Steve Bennett
2009-07-27 19:50 ` Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Steve Bennett @ 2009-07-27 17:30 UTC (permalink / raw)
To: buildroot
Hi!
I've been trying to setup a buildroot configuration (in this case an
x86 environment, although PPC is next...) and have run into a snag
getting an X11 environment included. I've done pretty much the
minimum configuration needed - setting the X Windows System server to
tinyx and turning on xorg-server.
But the build is hanging in the middle of the X11 build, in
particular when building the makestrs.c module in the xlib libXt
package. It fails with an error:
makestrs.c:33:21: error: X11/Xos.h: No such file or directory
I've put the full output at the end of this message. (The string
library function warnings bother me too, but they're at least just
warnings...) I've done quite a lot of searching and trying to figure
this out before coming here, and it looks to me like the compiler
command line is missing an include path to the staging directory's /
usr/include directory. That seems to be correctly referenced in the
packages xlib_libXt.mk file (in XLIB_LIBXT_CONF_ENV), but there is
also a patch (xlib_libXt-1.0.5-makestrs-nocc.patch) in the package
folder which sets it up to use gcc (the HOST_CC part of the patch)
and doesn't seem to take into account the staging directory.
I'm making an educated guess that the patch effectively overrides the
XLIB_LIBXT_CONF_ENV setting (or something else isn't including that
setting), but I'm not sure what the right fix for this is. A brute
force fix would be something like changing the patch to read:
HOST_CC=gcc -I$(STAGING_DIR)/usr/include
...but is that the correct approach here? And why hasn't anything
regarding this issue come up before? It seems odd that nobody else
is running into this.
-->Steve Bennett
----
>>> xlib_libXt 1.0.5 Building
PATH="/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/
toolchain_build_i486/bin:/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/host_dir/bin:/home/steveb/Documents/
CTBaseLinux/buildroot-2009.05/build_i486/host_dir/usr/bin:/home/
steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/staging_dir/
bin:/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/
staging_dir/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/
bin:/sbin:/bin:/usr/games" /usr/bin/make -j1 -C /home/steveb/
Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5/
make[1]: Entering directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5'
/usr/bin/make all-recursive
make[2]: Entering directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5'
Making all in util
make[3]: Entering directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5/util'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -MT makestrs-makestrs.o -MD -
MP -MF ".deps/makestrs-makestrs.Tpo" -c -o makestrs-makestrs.o `test -
f 'makestrs.c' || echo './'`makestrs.c; \
then mv -f ".deps/makestrs-makestrs.Tpo" ".deps/makestrs-
makestrs.Po"; else rm -f ".deps/makestrs-makestrs.Tpo"; exit 1; fi
makestrs.c:33:21: error: X11/Xos.h: No such file or directory
makestrs.c: In function ???ifopen???:
makestrs.c:106: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c:111: warning: incompatible implicit declaration of built-
in function ???strcpy???
makestrs.c:112: warning: incompatible implicit declaration of built-
in function ???strcat???
makestrs.c: In function ???CopyTmplProlog???:
makestrs.c:236: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c: In function ???WriteHeader???:
makestrs.c:280: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c:284: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c: In function ???DoLine???:
makestrs.c:479: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c:509: warning: incompatible implicit declaration of built-
in function ???strcpy???
makestrs.c:528: warning: incompatible implicit declaration of built-
in function ???strcpy???
makestrs.c:550: warning: incompatible implicit declaration of built-
in function ???strcpy???
makestrs.c:592: warning: incompatible implicit declaration of built-
in function ???index???
makestrs.c:598: warning: incompatible implicit declaration of built-
in function ???strcat???
makestrs.c: In function ???IntelABIIndexEntries???:
makestrs.c:633: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c: In function ???DefaultIndexEntries???:
makestrs.c:647: warning: incompatible implicit declaration of built-
in function ???strlen???
makestrs.c: In function ???DoComment???:
makestrs.c:675: warning: incompatible implicit declaration of built-
in function ???index???
makestrs.c:680: warning: incompatible implicit declaration of built-
in function ???strncpy???
makestrs.c: In function ???main???:
makestrs.c:742: warning: incompatible implicit declaration of built-
in function ???strlen???
make[3]: *** [makestrs-makestrs.o] Error 1
make[3]: Leaving directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5/util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/steveb/Documents/CTBaseLinux/
buildroot-2009.05/build_i486/xlib_libXt-1.0.5'
make: *** [/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/
build_i486/xlib_libXt-1.0.5/.stamp_built] Error 2
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] xlib libXt build problem 2009-07-27 17:30 [Buildroot] xlib libXt build problem Steve Bennett @ 2009-07-27 19:50 ` Thomas Petazzoni 2009-07-27 20:18 ` Steve Bennett 2009-07-27 20:09 ` Steve Bennett 2009-07-27 23:36 ` Dan Lykowski 2 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2009-07-27 19:50 UTC (permalink / raw) To: buildroot Le Mon, 27 Jul 2009 13:30:44 -0400, Steve Bennett <sablists@earthlink.net> a ?crit : > I'm making an educated guess that the patch effectively overrides > the XLIB_LIBXT_CONF_ENV setting (or something else isn't including > that setting), but I'm not sure what the right fix for this is. A > brute force fix would be something like changing the patch to read: > > HOST_CC=gcc -I$(STAGING_DIR)/usr/include > > ...but is that the correct approach here? And why hasn't anything > regarding this issue come up before? It seems odd that nobody else > is running into this. I'd say the issue is that makestrs is a program compiled for the host, and the way we compile it in Buildroot assumes that the development headers for X11 are installed on your host (through your distribution). On my Ubuntu system, X11/Xos.h is part of the x11proto-core-dev package. On my system, this package is installed, so when makestrs gets compiled, the host gcc compiler uses /usr/include/X11/Xos.h during the compilation. When building some packages requires things from the host, we have currently two different approaches in Buildroot: * for some dependencies, we rebuild it, and install it in $(HOST_DIR) * for some other dependencies, we assume that it is available on the host Sincerly, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] xlib libXt build problem 2009-07-27 19:50 ` Thomas Petazzoni @ 2009-07-27 20:18 ` Steve Bennett 0 siblings, 0 replies; 6+ messages in thread From: Steve Bennett @ 2009-07-27 20:18 UTC (permalink / raw) To: buildroot Thanks, our replies crossed. But using the actual package makes sense since I'm building on Ubuntu myself, so I've switched to that now. Is there any documentation of any other dependencies assumed to be on the host? I know some of the packages I needed just to get started (libncurses5-dev, g++, bison, flex, gettext, nasm...), but each one has been a research project, although none needed as much research as this one. -->Steve Bennett On Jul 27, 2009, at 3:50 PM, Thomas Petazzoni wrote: > Le Mon, 27 Jul 2009 13:30:44 -0400, > Steve Bennett <sablists@earthlink.net> a ?crit : > >> I'm making an educated guess that the patch effectively overrides >> the XLIB_LIBXT_CONF_ENV setting (or something else isn't including >> that setting), but I'm not sure what the right fix for this is. A >> brute force fix would be something like changing the patch to read: >> >> HOST_CC=gcc -I$(STAGING_DIR)/usr/include >> >> ...but is that the correct approach here? And why hasn't anything >> regarding this issue come up before? It seems odd that nobody else >> is running into this. > > I'd say the issue is that makestrs is a program compiled for the host, > and the way we compile it in Buildroot assumes that the development > headers for X11 are installed on your host (through your > distribution). > On my Ubuntu system, X11/Xos.h is part of the x11proto-core-dev > package. > > On my system, this package is installed, so when makestrs gets > compiled, the host gcc compiler uses /usr/include/X11/Xos.h during the > compilation. > > When building some packages requires things from the host, we have > currently two different approaches in Buildroot: > * for some dependencies, we rebuild it, and install it in $(HOST_DIR) > * for some other dependencies, we assume that it is available on the > host > > Sincerly, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers and embedded Linux development, > consulting, training and support. > http://free-electrons.com > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] xlib libXt build problem 2009-07-27 17:30 [Buildroot] xlib libXt build problem Steve Bennett 2009-07-27 19:50 ` Thomas Petazzoni @ 2009-07-27 20:09 ` Steve Bennett 2009-07-27 23:36 ` Dan Lykowski 2 siblings, 0 replies; 6+ messages in thread From: Steve Bennett @ 2009-07-27 20:09 UTC (permalink / raw) To: buildroot Okay... That change didn't work, but through a lot of experimentation, I discovered that makestrs is a build-time tool and it's depending on the full X11 development header set to be in your standard include path. I solved it through the quick hack of copying the header set from my staging directory to my /usr/include/ X11 folder. I'm mostly posting this so anyone else who has a similar problem can find the answer without having to spend hours trying to figure things out. Thanks, -->Steve Bennett On Jul 27, 2009, at 1:30 PM, Steve Bennett wrote: > Hi! > > I've been trying to setup a buildroot configuration (in this case > an x86 environment, although PPC is next...) and have run into a > snag getting an X11 environment included. I've done pretty much > the minimum configuration needed - setting the X Windows System > server to tinyx and turning on xorg-server. > > But the build is hanging in the middle of the X11 build, in > particular when building the makestrs.c module in the xlib libXt > package. It fails with an error: > > makestrs.c:33:21: error: X11/Xos.h: No such file or directory > > I've put the full output at the end of this message. (The string > library function warnings bother me too, but they're at least just > warnings...) I've done quite a lot of searching and trying to > figure this out before coming here, and it looks to me like the > compiler command line is missing an include path to the staging > directory's /usr/include directory. That seems to be correctly > referenced in the packages xlib_libXt.mk file (in > XLIB_LIBXT_CONF_ENV), but there is also a patch (xlib_libXt-1.0.5- > makestrs-nocc.patch) in the package folder which sets it up to use > gcc (the HOST_CC part of the patch) and doesn't seem to take into > account the staging directory. > > I'm making an educated guess that the patch effectively overrides > the XLIB_LIBXT_CONF_ENV setting (or something else isn't including > that setting), but I'm not sure what the right fix for this is. A > brute force fix would be something like changing the patch to read: > > HOST_CC=gcc -I$(STAGING_DIR)/usr/include > > ...but is that the correct approach here? And why hasn't anything > regarding this issue come up before? It seems odd that nobody else > is running into this. > > -->Steve Bennett > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] xlib libXt build problem 2009-07-27 17:30 [Buildroot] xlib libXt build problem Steve Bennett 2009-07-27 19:50 ` Thomas Petazzoni 2009-07-27 20:09 ` Steve Bennett @ 2009-07-27 23:36 ` Dan Lykowski 2009-07-28 8:03 ` Thomas Petazzoni 2 siblings, 1 reply; 6+ messages in thread From: Dan Lykowski @ 2009-07-27 23:36 UTC (permalink / raw) To: buildroot Steve, Try to replace the xlib_libXt-1.0.5-makestrs-nocc.patch with this one. I grabbed it from upstream a while back and haven't had time to submit it. It fixed the problem for me, but I don't know if it 'does the right thing(tm)'. Dan Lykowski On Mon, Jul 27, 2009 at 10:30 AM, Steve Bennett <sablists@earthlink.net>wrote: > Hi! > > I've been trying to setup a buildroot configuration (in this case an x86 > environment, although PPC is next...) and have run into a snag getting an > X11 environment included. I've done pretty much the minimum configuration > needed - setting the X Windows System server to tinyx and turning on > xorg-server. > > But the build is hanging in the middle of the X11 build, in particular when > building the makestrs.c module in the xlib libXt package. It fails with an > error: > > makestrs.c:33:21: error: X11/Xos.h: No such file or directory > > I've put the full output at the end of this message. (The string library > function warnings bother me too, but they're at least just warnings...) > I've done quite a lot of searching and trying to figure this out before > coming here, and it looks to me like the compiler command line is missing an > include path to the staging directory's /usr/include directory. That seems > to be correctly referenced in the packages xlib_libXt.mk file (in > XLIB_LIBXT_CONF_ENV), but there is also a patch > (xlib_libXt-1.0.5-makestrs-nocc.patch) in the package folder which sets it > up to use gcc (the HOST_CC part of the patch) and doesn't seem to take into > account the staging directory. > > I'm making an educated guess that the patch effectively overrides the > XLIB_LIBXT_CONF_ENV setting (or something else isn't including that > setting), but I'm not sure what the right fix for this is. A brute force > fix would be something like changing the patch to read: > > HOST_CC=gcc -I$(STAGING_DIR)/usr/include > > ...but is that the correct approach here? And why hasn't anything > regarding this issue come up before? It seems odd that nobody else is > running into this. > > -->Steve Bennett > > ---- > >>> xlib_libXt 1.0.5 Building > PATH="/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/toolchain_build_i486/bin:/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/host_dir/bin:/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/host_dir/usr/bin:/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/staging_dir/bin:/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/staging_dir/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" > /usr/bin/make -j1 -C > /home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5/ > make[1]: Entering directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5' > /usr/bin/make all-recursive > make[2]: Entering directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5' > Making all in util > make[3]: Entering directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5/util' > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -MT makestrs-makestrs.o -MD -MP > -MF ".deps/makestrs-makestrs.Tpo" -c -o makestrs-makestrs.o `test -f > 'makestrs.c' || echo './'`makestrs.c; \ > then mv -f ".deps/makestrs-makestrs.Tpo" > ".deps/makestrs-makestrs.Po"; else rm -f ".deps/makestrs-makestrs.Tpo"; exit > 1; fi > makestrs.c:33:21: error: X11/Xos.h: No such file or directory > makestrs.c: In function ???ifopen???: > makestrs.c:106: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c:111: warning: incompatible implicit declaration of built-in > function ???strcpy??? > makestrs.c:112: warning: incompatible implicit declaration of built-in > function ???strcat??? > makestrs.c: In function ???CopyTmplProlog???: > makestrs.c:236: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c: In function ???WriteHeader???: > makestrs.c:280: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c:284: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c: In function ???DoLine???: > makestrs.c:479: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c:509: warning: incompatible implicit declaration of built-in > function ???strcpy??? > makestrs.c:528: warning: incompatible implicit declaration of built-in > function ???strcpy??? > makestrs.c:550: warning: incompatible implicit declaration of built-in > function ???strcpy??? > makestrs.c:592: warning: incompatible implicit declaration of built-in > function ???index??? > makestrs.c:598: warning: incompatible implicit declaration of built-in > function ???strcat??? > makestrs.c: In function ???IntelABIIndexEntries???: > makestrs.c:633: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c: In function ???DefaultIndexEntries???: > makestrs.c:647: warning: incompatible implicit declaration of built-in > function ???strlen??? > makestrs.c: In function ???DoComment???: > makestrs.c:675: warning: incompatible implicit declaration of built-in > function ???index??? > makestrs.c:680: warning: incompatible implicit declaration of built-in > function ???strncpy??? > makestrs.c: In function ???main???: > makestrs.c:742: warning: incompatible implicit declaration of built-in > function ???strlen??? > make[3]: *** [makestrs-makestrs.o] Error 1 > make[3]: Leaving directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5/util' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5' > make[1]: *** [all] Error 2 > make[1]: Leaving directory > `/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5' > make: *** > [/home/steveb/Documents/CTBaseLinux/buildroot-2009.05/build_i486/xlib_libXt-1.0.5/.stamp_built] > Error 2 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20090727/a39f4316/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: xlib_libXt-1.0.5-cross_compile.patch Type: text/x-patch Size: 892 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20090727/a39f4316/attachment.bin> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] xlib libXt build problem 2009-07-27 23:36 ` Dan Lykowski @ 2009-07-28 8:03 ` Thomas Petazzoni 0 siblings, 0 replies; 6+ messages in thread From: Thomas Petazzoni @ 2009-07-28 8:03 UTC (permalink / raw) To: buildroot Le Mon, 27 Jul 2009 16:36:27 -0700, Dan Lykowski <lykowdk@gmail.com> a ?crit : > Steve, > Try to replace the xlib_libXt-1.0.5-makestrs-nocc.patch with this > one. > > I grabbed it from upstream a while back and haven't had time to > submit it. It fixed the problem for me, but I don't know if it 'does > the right thing(tm)'. This patch has been included in 1.0.6 of libXt. Therefore, I will bump the libXt package to 1.0.6. However, note that in the current development version of Buildroot, the compilation of libXt and libXaw is no longer required to compile the X.org server. These old (and ugly) toolkits are probably never used on embedded systems, so having them as a hard dependency of the X.org server was a bit too strong. It also ~1 Mb of space on the target filesystem, since these libraries were quite big. See http://git.buildroot.net/buildroot/commit/?id=ae8bbdf891c8343313cd2d3be2df079214576a4a If you don't want to use a development version of Buildroot, these improvements will be part of the 2009.08, that should be released neext month. Sincerly, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-28 8:03 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-27 17:30 [Buildroot] xlib libXt build problem Steve Bennett 2009-07-27 19:50 ` Thomas Petazzoni 2009-07-27 20:18 ` Steve Bennett 2009-07-27 20:09 ` Steve Bennett 2009-07-27 23:36 ` Dan Lykowski 2009-07-28 8:03 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox