Skip to contentSkip to conversation

waf.bbclass: explicitly pass libdir

PATCH In review Stefan Agner 4 participants 11 messages Dec 11, 2017 – Dec 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 waf.bbclass: explicitly pass libdir

From: Stefan Agner <[email protected]>

On some build hosts distros (e.g. Fedora 26) waf tries to be
smart about libdir detection and defaults to [EXEC_PREFIX/lib64].
This obviously is not what we want for 32-bit targets and usually
fails in the do_package phase:
WARNING: gstreamer1.0-plugins-imx-0.13.0-r0 do_package: QA Issue: gstreamer1.0-plugins-imx: Files/directories were installed but not shipped in any package:

    /usr/lib64/libgstimxcommon.so.0

Explicitly pass libdir to waf reliably resolves the issue.

---
 meta/classes/waf.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/waf.bbclass +1 -1
index c4698e910a..43b3f098ac 100644
@@ -26,7 +26,7 @@ def get_waf_parallel_make(d):
     return ""
 
 waf_do_configure() {
-	${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
+	${S}/waf configure --prefix=${prefix} --libdir=${libdir} ${EXTRA_OECONF}
 }
 
 waf_do_compile()  {
Signature · 1 line
2.13.6
#1 lore raw
Quoted 9 lines · Stefan Agner

From: Stefan Agner <[email protected]>

On some build hosts distros (e.g. Fedora 26) waf tries to be smart about libdir detection and defaults to [EXEC_PREFIX/lib64]. This obviously is not what we want for 32-bit targets and usually fails in the do_package phase:
WARNING: gstreamer1.0-plugins-imx-0.13.0-r0 do_package: QA Issue:
gstreamer1.0-plugins-imx: Files/directories were installed but not shipped in any package:

Quoted 4 lines
    /usr/lib64/libgstimxcommon.so.0

Explicitly pass libdir to waf reliably resolves the issue.

What happens if the wscript doesn't recognise --libdir, does it silently ignore it or throw an error?

If waf supports prefix and libdir and doesn't error on unknown options, does it also support datadir/sysconfdir and so on? We should pass as much as possible. The gnu_dirs module suggests yes, so you could copy what autotools passes.

Ross

#2 lore raw
Quoted 11 lines · Ross
Quoted 9 lines · Stefan Agner

From: Stefan Agner <[email protected]>

On some build hosts distros (e.g. Fedora 26) waf tries to be
smart about libdir detection and defaults to [EXEC_PREFIX/lib64].
This obviously is not what we want for 32-bit targets and usually
fails in the do_package phase:
WARNING: gstreamer1.0-plugins-imx-0.13.0-r0 do_package: QA Issue: gstreamer1.0-plugins-imx: Files/directories were installed but not shipped in any package:
/usr/lib64/libgstimxcommon.so.0

Quoted 3 lines
Quoted 1 line

Explicitly pass libdir to waf reliably resolves the issue.

What happens if the wscript doesn't recognise --libdir, does it silently ignore it or throw an error?

Hm, isn't this a "base" option which is always supported?

Quoted 3 lines

If waf supports prefix and libdir and doesn't error on unknown options, does it also support datadir/sysconfdir and so on? We should pass as much as possible. The gnu_dirs module suggests yes, so you could copy what autotools passes.

There are a bunch of others. But most seem to derive from PREFIX, which we set...

Installation prefix:

By default, "waf install" will put the files in "/usr/local/bin",
"/usr/local/lib" etc. An installation prefix other than
"/usr/local" can be given using "--prefix", for example
"--prefix=$HOME"

--prefix=PREFIX installation prefix [default: '/usr/local/']
--destdir=DESTDIR installation root [default: '']
--exec-prefix=EXEC_PREFIX
installation prefix for binaries [PREFIX]

Installation directories:
--bindir=BINDIR user commands [EXEC_PREFIX/bin]
--sbindir=SBINDIR system binaries [EXEC_PREFIX/sbin]
--libexecdir=LIBEXECDIR
program-specific binaries [EXEC_PREFIX/libexec]

--sysconfdir=SYSCONFDIR
host-specific configuration [PREFIX/etc]
--sharedstatedir=SHAREDSTATEDIR
architecture-independent variable data
[PREFIX/com]

--localstatedir=LOCALSTATEDIR
variable data [PREFIX/var]
--libdir=LIBDIR object code libraries [EXEC_PREFIX/lib64]
--includedir=INCLUDEDIR
header files [PREFIX/include]
--oldincludedir=OLDINCLUDEDIR
header files for non-GCC compilers
[/usr/include]

--datarootdir=DATAROOTDIR
architecture-independent data root
[PREFIX/share]

--datadir=DATADIR architecture-independent data [DATAROOTDIR]
--infodir=INFODIR GNU "info" documentation [DATAROOTDIR/info]
--localedir=LOCALEDIR
locale-dependent data [DATAROOTDIR/locale]
--mandir=MANDIR manual pages [DATAROOTDIR/man]
--docdir=DOCDIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=HTMLDIR HTML documentation [DOCDIR]
--dvidir=DVIDIR DVI documentation [DOCDIR]
--pdfdir=PDFDIR PDF documentation [DOCDIR]
--psdir=PSDIR PostScript documentation [DOCDIR]

--
Stefan

#3 lore raw
Quoted 1 line · Stefan Agner

Hm, isn't this a "base" option which is always supported?

No idea. :)

Quoted 42 lines

There are a bunch of others. But most seem to derive from PREFIX, which we set...

Installation prefix:

By default, "waf install" will put the files in "/usr/local/bin",
"/usr/local/lib" etc. An installation prefix other than
"/usr/local" can be given using "--prefix", for example
"--prefix=$HOME"

--prefix=PREFIX installation prefix [default: '/usr/local/']
--destdir=DESTDIR installation root [default: '']
--exec-prefix=EXEC_PREFIX
installation prefix for binaries [PREFIX]

Installation directories:
--bindir=BINDIR user commands [EXEC_PREFIX/bin]
--sbindir=SBINDIR system binaries [EXEC_PREFIX/sbin]
--libexecdir=LIBEXECDIR
program-specific binaries [EXEC_PREFIX/libexec]

--sysconfdir=SYSCONFDIR
host-specific configuration [PREFIX/etc]
--sharedstatedir=SHAREDSTATEDIR
architecture-independent variable data
[PREFIX/com]

--localstatedir=LOCALSTATEDIR
variable data [PREFIX/var]
--libdir=LIBDIR object code libraries [EXEC_PREFIX/lib64]
--includedir=INCLUDEDIR
header files [PREFIX/include]
--oldincludedir=OLDINCLUDEDIR
header files for non-GCC compilers
[/usr/include]

--datarootdir=DATAROOTDIR
architecture-independent data root
[PREFIX/share]

Quoted 11 lines

--datadir=DATADIR architecture-independent data [DATAROOTDIR]
--infodir=INFODIR GNU "info" documentation [DATAROOTDIR/info]
--localedir=LOCALEDIR
locale-dependent data [DATAROOTDIR/locale]
--mandir=MANDIR manual pages [DATAROOTDIR/man]
--docdir=DOCDIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=HTMLDIR HTML documentation [DOCDIR]
--dvidir=DVIDIR DVI documentation [DOCDIR]
--pdfdir=PDFDIR PDF documentation [DOCDIR]
--psdir=PSDIR PostScript documentation [DOCDIR]

But we do allow distros to override those, so passing the ones that we can is good. bitbake.conf has the canonical list of prefix variables that we expose.

Ross

#4 lore raw
Quoted 108 lines · Ross
Quoted 1 line · Stefan Agner

Hm, isn't this a "base" option which is always supported?

No idea. :)

Quoted 103 lines

There are a bunch of others. But most seem to derive from PREFIX, which

we set...

Installation prefix:

By default, "waf install" will put the files in
"/usr/local/bin",

"/usr/local/lib" etc. An installation prefix other than

"/usr/local" can be given using "--prefix", for example

"--prefix=$HOME"

--prefix=PREFIX installation prefix [default:
'/usr/local/']

--destdir=DESTDIR installation root [default: '']

--exec-prefix=EXEC_PREFIX

installation prefix for binaries [PREFIX]

Installation directories:

--bindir=BINDIR user commands [EXEC_PREFIX/bin]

--sbindir=SBINDIR system binaries [EXEC_PREFIX/sbin]

--libexecdir=LIBEXECDIR

program-specific binaries
[EXEC_PREFIX/libexec]

--sysconfdir=SYSCONFDIR

host-specific configuration [PREFIX/etc]

--sharedstatedir=SHAREDSTATEDIR

architecture-independent variable data

[PREFIX/com]

--localstatedir=LOCALSTATEDIR

variable data [PREFIX/var]

--libdir=LIBDIR object code libraries [EXEC_PREFIX/lib64]

--includedir=INCLUDEDIR

header files [PREFIX/include]

--oldincludedir=OLDINCLUDEDIR

header files for non-GCC compilers

[/usr/include]

--datarootdir=DATAROOTDIR

architecture-independent data root

[PREFIX/share]

--datadir=DATADIR architecture-independent data [DATAROOTDIR]

--infodir=INFODIR GNU "info" documentation [DATAROOTDIR/info]

--localedir=LOCALEDIR

locale-dependent data [DATAROOTDIR/locale]

--mandir=MANDIR manual pages [DATAROOTDIR/man]

--docdir=DOCDIR documentation root
[DATAROOTDIR/doc/PACKAGE]

--htmldir=HTMLDIR HTML documentation [DOCDIR]

Quoted 7 lines
Quoted 5 lines

--dvidir=DVIDIR DVI documentation [DOCDIR]

--pdfdir=PDFDIR PDF documentation [DOCDIR]

--psdir=PSDIR PostScript documentation [DOCDIR]

But we do allow distros to override those, so passing the on

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Quoted 5 lines

es that we can is good. bitbake.conf has the canonical list of prefix variables that we expose.

Ross

#5 lore raw
Quoted 116 lines · Joshua Watt
Quoted 115 lines · Ross
Quoted 1 line · Stefan Agner

Hm, isn't this a "base" option which is always supported?

No idea. :)

Quoted 110 lines

There are a bunch of others. But most seem to derive from PREFIX, which

we set...

Installation prefix:

By default, "waf install" will put the files in
"/usr/local/bin",

"/usr/local/lib" etc. An installation prefix other than

"/usr/local" can be given using "--prefix", for example

"--prefix=$HOME"

--prefix=PREFIX installation prefix [default:
'/usr/local/']

--destdir=DESTDIR installation root [default: '']

--exec-prefix=EXEC_PREFIX

installation prefix for binaries [PREFIX]

Installation directories:

--bindir=BINDIR user commands [EXEC_PREFIX/bin]

--sbindir=SBINDIR system binaries [EXEC_PREFIX/sbin]

--libexecdir=LIBEXECDIR

program-specific binaries
[EXEC_PREFIX/libexec]

--sysconfdir=SYSCONFDIR

host-specific configuration [PREFIX/etc]

--sharedstatedir=SHAREDSTATEDIR

architecture-independent variable data

[PREFIX/com]

--localstatedir=LOCALSTATEDIR

variable data [PREFIX/var]

--libdir=LIBDIR object code libraries [EXEC_PREFIX/lib64]

--includedir=INCLUDEDIR

header files [PREFIX/include]

--oldincludedir=OLDINCLUDEDIR

header files for non-GCC compilers

[/usr/include]

--datarootdir=DATAROOTDIR

architecture-independent data root

[PREFIX/share]

--datadir=DATADIR architecture-independent data
[DATAROOTDIR]

--infodir=INFODIR GNU "info" documentation
[DATAROOTDIR/info]

--localedir=LOCALEDIR

locale-dependent data
[DATAROOTDIR/locale]

--mandir=MANDIR manual pages [DATAROOTDIR/man]

--docdir=DOCDIR documentation root
[DATAROOTDIR/doc/PACKAGE]

--htmldir=HTMLDIR HTML documentation [DOCDIR]

--dvidir=DVIDIR DVI documentation [DOCDIR]

--pdfdir=PDFDIR PDF documentation [DOCDIR]

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

--psdir=PSDIR PostScript documentation [DOCDIR]

But we do allow distros to override those, so passing the on

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you know waf is loading gnu_dirs

Quoted 5 lines
Quoted 5 lines

es that we can is good. bitbake.conf has the canonical list of prefix variables that we expose.

Ross

#6 lore raw
Quoted 10 lines · Joshua Watt

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you know waf is loading gnu_dirs

One option would be for waf.bbclass to check if WAF_USES_GNU_DIRS is set (defaulting to 0) and pass the full set of path options automatically.

Ross

#7 lore raw
Quoted 7 lines · Ross
Quoted 6 lines · Joshua Watt

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Quoted 8 lines
Quoted 4 lines

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you know waf is loading gnu_dirs

One option would be for waf.bbclass to check if WAF_USES_GNU_DIRS is set (defaulting to 0) and pass the full set of path options automatically.

Possible. But passing the standard ones solve 99% of the issues.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#8 lore raw
Quoted 14 lines · Otavio Salvador
Quoted 13 lines · Ross
Quoted 10 lines · Joshua Watt

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you know waf is loading gnu_dirs

Quoted 5 lines
Quoted 2 lines

One option would be for waf.bbclass to check if WAF_USES_GNU_DIRS is set (defaulting to 0) and pass the full set of path options automatically.

Possible. But passing the standard ones solve 99% of the issues.

I am with Otavio here. Also, adding the standard ones and adding the additional GNU_DIRS would best be done in two independent patches anyway. For now I'd rather prefer to only add the standard ones.

--
Stefan

#9 lore raw
Quoted 21 lines · Stefan Agner
Quoted 1 line · Otavio Salvador

On Mon, Dec 11, 2017 at 3:09 PM, Burton, Ross <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · Joshua Watt
Quoted 2 lines

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything

else

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

is a result of loading the gnu_dirs tool, which not all projects are required to do.

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you

know

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

waf is loading gnu_dirs

One option would be for waf.bbclass to check if WAF_USES_GNU_DIRS is set (defaulting to 0) and pass the full set of path options automatically.

Quoted 7 lines
Quoted 2 lines

Possible. But passing the standard ones solve 99% of the issues.

I am with Otavio here. Also, adding the standard ones and adding the additional GNU_DIRS would best be done in two independent patches anyway. For now I'd rather prefer to only add the standard ones.

Fine by me. Will there be a v2 adding --bindir?

Ross

#10 lore raw
Quoted 20 lines · Ross
Quoted 18 lines · Stefan Agner
Quoted 17 lines · Otavio Salvador
Quoted 15 lines · Ross
Quoted 10 lines · Joshua Watt

Vanilla waf only supports --prefix, --libdir, and --bindir. Anything else is a result of loading the gnu_dirs tool, which not all projects are required to do.

Sorry, hit send too soo: waf (at least version 2.0) also errors out on unknown options. I think the three I listed are the only ones we can do generically. There might be some way to easily adding the rest if you know waf is loading gnu_dirs

One option would be for waf.bbclass to check if WAF_USES_GNU_DIRS is set (defaulting to 0) and pass the full set of path options automatically.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Possible. But passing the standard ones solve 99% of the issues.

I am with Otavio here. Also, adding the standard ones and adding the additional GNU_DIRS would best be done in two independent patches anyway. For now I'd rather prefer to only add the standard ones.

Fine by me. Will there be a v2 adding --bindir?

Yes, will send soon.

Signature · 1 line
Stefan