diff mbox series

build: Create ell directory for ell/ell.h target

Message ID 20240229195654.1579749-1-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series build: Create ell directory for ell/ell.h target | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint fail build: Create ell directory for ell/ell.h target 24: B3 Line contains hard tab characters (\t): " --prefix=/usr \" 25: B3 Line contains hard tab characters (\t): " --includedir=/usr/include \" 26: B3 Line contains hard tab characters (\t): " --mandir=/usr/share/man \" 27: B3 Line contains hard tab characters (\t): " --infodir=/usr/share/info \" 28: B3 Line contains hard tab characters (\t): " --sysconfdir=/etc \" 29: B3 Line contains hard tab characters (\t): " --localstatedir=/var \" 30: B3 Line contains hard tab characters (\t): " --disable-option-checking \" 31: B3 Line contains hard tab characters (\t): " --disable-silent-rules \" 32: B3 Line contains hard tab characters (\t): " --libdir=/usr/lib/x86_64-linux-gnu \" 33: B3 Line contains hard tab characters (\t): " --runstatedir=/run \" 34: B3 Line contains hard tab characters (\t): " --disable-maintainer-mode \" 35: B3 Line contains hard tab characters (\t): " --disable-dependency-tracking \" 36: B3 Line contains hard tab characters (\t): " --enable-tools \" 37: B3 Line contains hard tab characters (\t): " --enable-dbus-policy"
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Feb. 29, 2024, 7:56 p.m. UTC
Both ell/shared and ell/internal targets first create the ell/
directory within IWD. This apparently was just luck that one of
these always finished first in parallel builds. On my system at
least when building using dpkg-buildpackage IWD fails to build
due to the ell/ directory missing. From the logs it appears that
both the shared/internal targets were started but didn't complete
(or at least create the directory) before the ell/ell.h target:

make[1]: Entering directory '/home/jprestwood/tmp/iwd'
/usr/bin/mkdir -p ell
/usr/bin/mkdir -p ell
echo -n > ell/ell.h
/usr/bin/mkdir -p src
/bin/bash: line 1: ell/ell.h: No such file or directory
make[1]: *** [Makefile:4028: ell/ell.h] Error 1

Creating the ell/ directory within the ell/ell.h target solve
the issue. For reference this is the configure command dpkg
is using:

./configure --build=x86_64-linux-gnu \
	--prefix=/usr \
	--includedir=/usr/include \
	--mandir=/usr/share/man \
	--infodir=/usr/share/info \
	--sysconfdir=/etc \
	--localstatedir=/var \
	--disable-option-checking \
	--disable-silent-rules \
	--libdir=/usr/lib/x86_64-linux-gnu \
	--runstatedir=/run \
	--disable-maintainer-mode \
	--disable-dependency-tracking \
	--enable-tools \
	--enable-dbus-policy
---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

Comments

KeithG March 1, 2024, 3 p.m. UTC | #1
On Thu, Feb 29, 2024 at 2:03 PM James Prestwood <prestwoj@gmail.com> wrote:
>
> Both ell/shared and ell/internal targets first create the ell/
> directory within IWD. This apparently was just luck that one of
> these always finished first in parallel builds. On my system at
> least when building using dpkg-buildpackage IWD fails to build
> due to the ell/ directory missing. From the logs it appears that
> both the shared/internal targets were started but didn't complete
> (or at least create the directory) before the ell/ell.h target:
>
> make[1]: Entering directory '/home/jprestwood/tmp/iwd'
> /usr/bin/mkdir -p ell
> /usr/bin/mkdir -p ell
> echo -n > ell/ell.h
> /usr/bin/mkdir -p src
> /bin/bash: line 1: ell/ell.h: No such file or directory
> make[1]: *** [Makefile:4028: ell/ell.h] Error 1
>
> Creating the ell/ directory within the ell/ell.h target solve
> the issue. For reference this is the configure command dpkg
> is using:
>
> ./configure --build=x86_64-linux-gnu \
>         --prefix=/usr \
>         --includedir=/usr/include \
>         --mandir=/usr/share/man \
>         --infodir=/usr/share/info \
>         --sysconfdir=/etc \
>         --localstatedir=/var \
>         --disable-option-checking \
>         --disable-silent-rules \
>         --libdir=/usr/lib/x86_64-linux-gnu \
>         --runstatedir=/run \
>         --disable-maintainer-mode \
>         --disable-dependency-tracking \
>         --enable-tools \
>         --enable-dbus-policy
> ---
>  Makefile.am | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Makefile.am b/Makefile.am
> index 5ed6ab37..be287572 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -710,6 +710,7 @@ ell/internal: Makefile
>         done > $@
>
>  ell/ell.h: Makefile
> +       $(AM_V_at)$(MKDIR_P) ell
>         $(AM_V_at)echo -n > $@
>         $(AM_V_GEN)for f in $(ell_headers) ; do \
>                 echo "#include <$$f>" >> $@ ; \
> --
> 2.34.1
>
James,

Thanks. I think I ran into this when I built on RPiOS. I hacked my
PKGBUILD to copy the ell directory over to the
after configure. (I use makedeb to build *.deb packages) I would have
to do this when I would build iwd from git HEAD with external ell...

  dbus-run-session ./configure --prefix=/usr \
         --sysconfdir=/etc \
         --localstatedir=/var \
         --with-runstatedir=/run \
         --libexecdir=/usr/libexec \
         --enable-external-ell \
         --enable-wired \
         --enable-ofono \
         --disable-tools
# build for external ell
cp ../ell/ell/*.h ell/

to build it for external ell...
James Prestwood May 14, 2024, 12:25 p.m. UTC | #2
Hi,

On 2/29/24 11:56 AM, James Prestwood wrote:
> Both ell/shared and ell/internal targets first create the ell/
> directory within IWD. This apparently was just luck that one of
> these always finished first in parallel builds. On my system at
> least when building using dpkg-buildpackage IWD fails to build
> due to the ell/ directory missing. From the logs it appears that
> both the shared/internal targets were started but didn't complete
> (or at least create the directory) before the ell/ell.h target:
>
> make[1]: Entering directory '/home/jprestwood/tmp/iwd'
> /usr/bin/mkdir -p ell
> /usr/bin/mkdir -p ell
> echo -n > ell/ell.h
> /usr/bin/mkdir -p src
> /bin/bash: line 1: ell/ell.h: No such file or directory
> make[1]: *** [Makefile:4028: ell/ell.h] Error 1
>
> Creating the ell/ directory within the ell/ell.h target solve
> the issue. For reference this is the configure command dpkg
> is using:
>
> ./configure --build=x86_64-linux-gnu \
> 	--prefix=/usr \
> 	--includedir=/usr/include \
> 	--mandir=/usr/share/man \
> 	--infodir=/usr/share/info \
> 	--sysconfdir=/etc \
> 	--localstatedir=/var \
> 	--disable-option-checking \
> 	--disable-silent-rules \
> 	--libdir=/usr/lib/x86_64-linux-gnu \
> 	--runstatedir=/run \
> 	--disable-maintainer-mode \
> 	--disable-dependency-tracking \
> 	--enable-tools \
> 	--enable-dbus-policy
> ---
>   Makefile.am | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/Makefile.am b/Makefile.am
> index 5ed6ab37..be287572 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -710,6 +710,7 @@ ell/internal: Makefile
>   	done > $@
>   
>   ell/ell.h: Makefile
> +	$(AM_V_at)$(MKDIR_P) ell
>   	$(AM_V_at)echo -n > $@
>   	$(AM_V_GEN)for f in $(ell_headers) ; do \
>   		echo "#include <$$f>" >> $@ ; \

I noticed this patch was still in my private IWD tree and never got 
merged. Could we take a look at this? For me (and Keith) it appears to 
be required for debian builds. For whatever reason that build system 
triggers the timing just right that the ell/ directory doesn't exist 
when copying the ell source.

Thanks,

James
Denis Kenzior May 14, 2024, 3:25 p.m. UTC | #3
Hi James,

On 2/29/24 1:56 PM, James Prestwood wrote:
> Both ell/shared and ell/internal targets first create the ell/
> directory within IWD. This apparently was just luck that one of
> these always finished first in parallel builds. On my system at
> least when building using dpkg-buildpackage IWD fails to build
> due to the ell/ directory missing. From the logs it appears that
> both the shared/internal targets were started but didn't complete
> (or at least create the directory) before the ell/ell.h target:
> 
> make[1]: Entering directory '/home/jprestwood/tmp/iwd'
> /usr/bin/mkdir -p ell
> /usr/bin/mkdir -p ell
> echo -n > ell/ell.h
> /usr/bin/mkdir -p src
> /bin/bash: line 1: ell/ell.h: No such file or directory
> make[1]: *** [Makefile:4028: ell/ell.h] Error 1
> 
> Creating the ell/ directory within the ell/ell.h target solve
> the issue. For reference this is the configure command dpkg
> is using:
> 
> ./configure --build=x86_64-linux-gnu \
> 	--prefix=/usr \
> 	--includedir=/usr/include \
> 	--mandir=/usr/share/man \
> 	--infodir=/usr/share/info \
> 	--sysconfdir=/etc \
> 	--localstatedir=/var \
> 	--disable-option-checking \
> 	--disable-silent-rules \
> 	--libdir=/usr/lib/x86_64-linux-gnu \
> 	--runstatedir=/run \
> 	--disable-maintainer-mode \
> 	--disable-dependency-tracking \
> 	--enable-tools \
> 	--enable-dbus-policy
> ---
>   Makefile.am | 1 +
>   1 file changed, 1 insertion(+)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index 5ed6ab37..be287572 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -710,6 +710,7 @@  ell/internal: Makefile
 	done > $@
 
 ell/ell.h: Makefile
+	$(AM_V_at)$(MKDIR_P) ell
 	$(AM_V_at)echo -n > $@
 	$(AM_V_GEN)for f in $(ell_headers) ; do \
 		echo "#include <$$f>" >> $@ ; \