All of lore.kernel.org
 help / color / mirror / Atom feed
* staging ABI changes and broken idium
@ 2008-03-12  7:27 Holger Freyther
  2008-03-12  7:54 ` Koen Kooi
  0 siblings, 1 reply; 8+ messages in thread
From: Holger Freyther @ 2008-03-12  7:27 UTC (permalink / raw)
  To: openembedded-devel

Hey,
I was a bit stupid and fought with this issue:

do_compile_prepend() {
	sed -i s,/usr/include,${STAGING_INCDIR},g Makefile
}


What is wrong with this? STAGING_INCDIR is now ending with /usr/include. I 
have grepped through our bb files and searched for this and found quite some 
files doing this.

How to tackle this issue:
	a) Fix the autotools/Makefile.am to not have $(includedir) there
	b) change the sed to be 'absolute' -I/usr/include


This is the command I use to search for it (many places are correct):
	find . -name '*.bb' -exec grep -H "sed " {} \; | grep "/usr/include"

A helping hand fixing these would be appreciated. Something like this might 
exist for other dirs (e.g. libdir) as well and need further checking.


z.



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

* Re: staging ABI changes and broken idium
  2008-03-12  7:27 staging ABI changes and broken idium Holger Freyther
@ 2008-03-12  7:54 ` Koen Kooi
  2008-03-12  7:59   ` Koen Kooi
  2008-03-12  8:24   ` Holger Freyther
  0 siblings, 2 replies; 8+ messages in thread
From: Koen Kooi @ 2008-03-12  7:54 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Holger Freyther schreef:
| Hey,
| I was a bit stupid and fought with this issue:
|
| do_compile_prepend() {
| 	sed -i s,/usr/include,${STAGING_INCDIR},g Makefile
| }
|
|
| What is wrong with this? STAGING_INCDIR is now ending with
/usr/include. I
| have grepped through our bb files and searched for this and found
quite some
| files doing this.
|
| How to tackle this issue:
| 	a) Fix the autotools/Makefile.am to not have $(includedir) there

If that was the case, the sed would have been:

(from gimp.inc)
do_configure_append() {
~    find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
}

AFAIK s,/usr/include,${STAGING_INCDIR},g is used for recipe using
binconfig based stuff.

| 	b) change the sed to be 'absolute' -I/usr/include

sed -i s,/usr/include,/usr/include,g Makefile or sed -i
s,${STAGING_INCDIR},/usr/include,g ?

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFH14xQMkyGM64RGpERArQaAKC9MsEXrAe3YNXpcfgdnf0+BdRMQACeKv5G
AkGFBZ675yCmWLocZvG2tTE=
=KGYe
-----END PGP SIGNATURE-----




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

* Re: staging ABI changes and broken idium
  2008-03-12  7:54 ` Koen Kooi
@ 2008-03-12  7:59   ` Koen Kooi
  2008-03-12  8:18     ` Holger Freyther
  2008-03-12  8:37     ` Holger Freyther
  2008-03-12  8:24   ` Holger Freyther
  1 sibling, 2 replies; 8+ messages in thread
From: Koen Kooi @ 2008-03-12  7:59 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Koen Kooi schreef:
| Holger Freyther schreef:
| | Hey,
| | I was a bit stupid and fought with this issue:
| |
| | do_compile_prepend() {
| | 	sed -i s,/usr/include,${STAGING_INCDIR},g Makefile
| | }
| |
| |
| | What is wrong with this? STAGING_INCDIR is now ending with
| /usr/include. I
| | have grepped through our bb files and searched for this and found
| quite some
| | files doing this.
| |
| | How to tackle this issue:
| | 	a) Fix the autotools/Makefile.am to not have $(includedir) there
|
| If that was the case, the sed would have been:
|
| (from gimp.inc)
| do_configure_append() {
| ~    find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
| }

Switching on my brain, the above isn't needed anymore, right?

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFH141zMkyGM64RGpERAsJyAJoCeDv9wn+e+CEEfDS/IluJeebXiACgvGac
Y7d//G8OIotQHTTcfTmVBSU=
=U397
-----END PGP SIGNATURE-----




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

* Re: staging ABI changes and broken idium
  2008-03-12  7:59   ` Koen Kooi
@ 2008-03-12  8:18     ` Holger Freyther
  2008-03-12  9:17       ` Richard Purdie
  2008-03-12  8:37     ` Holger Freyther
  1 sibling, 1 reply; 8+ messages in thread
From: Holger Freyther @ 2008-03-12  8:18 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 12 March 2008 08:59:47 Koen Kooi wrote:
> Koen Kooi schreef:

> | (from gimp.inc)
> | do_configure_append() {
> | ~    find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
> | }
>
> Switching on my brain, the above isn't needed anymore, right?

-I/usr/include is still bad (assuming it holds your system headers).





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

* Re: staging ABI changes and broken idium
  2008-03-12  7:54 ` Koen Kooi
  2008-03-12  7:59   ` Koen Kooi
@ 2008-03-12  8:24   ` Holger Freyther
  1 sibling, 0 replies; 8+ messages in thread
From: Holger Freyther @ 2008-03-12  8:24 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 12 March 2008 08:54:56 Koen Kooi wrote:
> Holger Freyther schreef:

Makefile's:
	with sed s,/usr/include,/stuff/tmp/staging/arm-linux/usr/include,

	the include path:
	-I/stuff/tmp/staging/arm-linux/usr/include  gets transformed to
	-I/stuff/tmp/staging/arm-linux/stuff/tmp/staging/arm-linux/usr/include

	The effect is: The first path is right the 2nd is wrong and no headers
	are found. We still need to remove -I/usr/include and -L/usr/lib from the
	compiler line.

	So either we change the sed -i s... to not change the path if it is already 
	${STAGING_INCDIR}, I would need some sed help here and move this sed
	string to base.bbclass (also for STAGING_LIBDIR), or go 
	for  -I/usr/include,-I${STAGING_INCDIR}

binconfig:
	yes the binconfig.bbclass should point to the absolute staging inc and libdir
	and there such a sed could make sense.


I see we patch: configure.in/configure, Makefile and once or twice some other 
files. let me follow up with fishy files.



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

* Re: staging ABI changes and broken idium
  2008-03-12  7:59   ` Koen Kooi
  2008-03-12  8:18     ` Holger Freyther
@ 2008-03-12  8:37     ` Holger Freyther
  1 sibling, 0 replies; 8+ messages in thread
From: Holger Freyther @ 2008-03-12  8:37 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 12 March 2008 08:59:47 Koen Kooi wrote:

Likely to be broken Makefile:
./packages/directfb/directfb-examples_1.0.0.bb:    find ${S} -type f | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
./packages/directfb/++dfb_1.0.0.bb:    find ${S} -type f | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
./packages/gphoto2/gphoto2_2.4.0.bb:        find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
./packages/fltk/efltk_2.0.7.bb: sed -i s,/usr/include,${STAGING_INCDIR}, makeinclude
./packages/fltk/efltk_2.0.7.bb: sed -i s,/usr/include/freetype2,, makeinclude
./packages/tcpdump/tcpdump_3.9.7.bb:        sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
./packages/php/php_5.1.4.bb:    find ${S} -type f | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' (php_5.2.0.bb is doing it better)

Likely to be broken configure but need investigation, e.g. other path's get patched too
./packages/xaos/xaos_3.2.3.bb:    sed -i 's~/usr/include~${STAGING_INCDIR}~' ${S}/configure.in
./packages/esound/esound_0.2.36.bb:     sed -i -e 's:/usr/include/mme:${STAGING_INCDIR}/mme:g' configure.ac
./packages/mplayer/mplayer_svn.bb:      sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
./packages/mplayer/mplayer_0.0+1.0rc1.bb:       sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
./packages/mplayer/mplayer_0.0+1.0rc2.bb:       sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure


Stupid:
./packages/smpeg/smpeg_0.4.4+0.4.5cvs20040311.bb:        cat smpeg-config | sed -e "s,-I/usr/include/SDL,-I${STAGING_INCDIR}/SDL," \
./packages/smpeg/smpeg_0.4.4+0.4.5cvs20040311.bb:                         | sed -e "s,-I/usr/include/smpeg, ," \
this looks like a case for binconfig?


./packages/opensync/libsyncml_svn.bb:        sed -i s:-I/usr/include/:-I/foo/:g Makefile 
./packages/opensync/libsyncml_svn.bb:        sed -i s:-I/usr/include/:-I/foo/:g */Makefile
./packages/opensync/libsyncml_svn.bb:   sed -i s:-I/usr/include/:-I/foo/:g */*/Makefile
./packages/opensync/libsyncml_0.4.0.bb:        sed -i s:-I/usr/include/:-I/foo/:g Makefile
./packages/opensync/libsyncml_0.4.0.bb:        sed -i s:-I/usr/include/:-I/foo/:g */Makefile
./packages/opensync/libsyncml_0.4.0.bb: sed -i s:-I/usr/include/:-I/foo/:g */*/Makefile

-I/foo? wy not :: as replacement?



Other but still broken:

./packages/perl/perl_5.8.8.bb:                sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
./packages/perl/perl_5.8.8.bb:            sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
./packages/perl/perl_5.8.7.bb:  sed -i -e "s%/usr/include/%${STAGING_INCDIR}/%g" config.sh-${TARGET_ARCH}-${TARGET_OS}
./packages/perl/perl_5.8.7.bb:          sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
./packages/gdal/gdal_1.3.2.bb:          sed -i s:/usr/include:${D}${includedir}: GDALmake.opt


now doing this for /usr/lib...




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

* Re: staging ABI changes and broken idium
  2008-03-12  8:18     ` Holger Freyther
@ 2008-03-12  9:17       ` Richard Purdie
  2008-03-12  9:42         ` Holger Freyther
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2008-03-12  9:17 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2008-03-12 at 09:18 +0100, Holger Freyther wrote:
> On Wednesday 12 March 2008 08:59:47 Koen Kooi wrote:
> > Koen Kooi schreef:
> 
> > | (from gimp.inc)
> > | do_configure_append() {
> > | ~    find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
> > | }
> >
> > Switching on my brain, the above isn't needed anymore, right?
> 
> -I/usr/include is still bad (assuming it holds your system headers).

We want the -I/usr/include removed since we must not use system headers
but we don't need any such include since sysroot or our standard CFLAGS
will pick up staging. s:'-I$(includedir)'::g should therefore be ok.

Cheers,

Richard






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

* Re: staging ABI changes and broken idium
  2008-03-12  9:17       ` Richard Purdie
@ 2008-03-12  9:42         ` Holger Freyther
  0 siblings, 0 replies; 8+ messages in thread
From: Holger Freyther @ 2008-03-12  9:42 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 12 March 2008 10:17:54 Richard Purdie wrote:

> > -I/usr/include is still bad (assuming it holds your system headers).
>
> We want the -I/usr/include removed since we must not use system headers
> but we don't need any such include since sysroot or our standard CFLAGS
> will pick up staging. s:'-I$(includedir)'::g should therefore be ok.

Right, the proper fix is go to the Makefile.am and exchange -I$(includedir) 
with an empty string. I think the majority of places that sed the Makefile 
have this in mind, sure they can hit other places as well... this is why I 
didn't blindly fixed the sed's. For the configure.ac this more looks like 
paths to search for header and such, we need more care there as well.

Rolf: This sounds like a perfect weekend project to do together and go through 
the list I'm compiling and fix these and verifying that they work.

z.



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

end of thread, other threads:[~2008-03-12  9:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12  7:27 staging ABI changes and broken idium Holger Freyther
2008-03-12  7:54 ` Koen Kooi
2008-03-12  7:59   ` Koen Kooi
2008-03-12  8:18     ` Holger Freyther
2008-03-12  9:17       ` Richard Purdie
2008-03-12  9:42         ` Holger Freyther
2008-03-12  8:37     ` Holger Freyther
2008-03-12  8:24   ` Holger Freyther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.