Skip to contentSkip to conversation

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

PATCH Applied James Prestwood 3 participants 4 messages Feb 29, 2024 – May 14, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

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

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(+)
Makefile.am +1 -0
index 5ed6ab37..be287572 100644
@@ -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>" >> $@ ; \
Signature · 1 line
2.34.1
#1 lore raw
Quoted 53 lines · James Prestwood

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(+)
Makefile.am +1 -1
index 5ed6ab37..be287572 100644
@@ -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>" >> $@ ; \
--
Quoted 2 lines

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...

#2 lore raw
In reply to James Prestwood

Hi,

Quoted 44 lines · James Prestwood

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(+)
Makefile.am +0 -0
index 5ed6ab37..be287572 100644

Makefile.am ell/internal: Makefile · line 716

Quoted 7 lines
Makefile.am +1 -0
@@ -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

#3 lore raw
In reply to James Prestwood

Hi James,

Quoted 30 lines · James Prestwood

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 \
Quoted 9 lines
	--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