All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pdbg: bump version to latest
@ 2017-09-27  2:15 Joel Stanley
  2017-09-28 18:18 ` Alistair Francis
  2017-10-02 19:59 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Stanley @ 2017-09-27  2:15 UTC (permalink / raw)
  To: buildroot

I got this error when attempting to build:

 aclocal: error: couldn't open directory 'm4': No such file or directory

So we now have the post patch hook to ensure the m4 directory is
present.

In addition, the package now sets a variable with the Git SHA1 so that
the binary contians the expected output for --version.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 package/pdbg/pdbg.hash | 2 +-
 package/pdbg/pdbg.mk   | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/pdbg/pdbg.hash b/package/pdbg/pdbg.hash
index 16bf58024c61..2aec71817770 100644
--- a/package/pdbg/pdbg.hash
+++ b/package/pdbg/pdbg.hash
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 8edabb9ae98ce3b1892b768f2ee5e779a00476b63cdcc6f905e8464a0b7d96a3 pdbg-90a7370a11e727f1482dea6ff2bd6aec20c64805.tar.gz
+sha256 e0b81fc65eb83692c5c07d7ae109882cefebf663444b7ea804d0544451c1a72f pdbg-77158819158d1d7053a737ac090d04fdfbfe9265.tar.gz
diff --git a/package/pdbg/pdbg.mk b/package/pdbg/pdbg.mk
index 184de8650d37..0864a6de9cd8 100644
--- a/package/pdbg/pdbg.mk
+++ b/package/pdbg/pdbg.mk
@@ -4,10 +4,17 @@
 #
 ################################################################################
 
-PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_VERSION = 77158819158d1d7053a737ac090d04fdfbfe9265
 PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
 PDBG_LICENSE = Apache-2.0
 PDBG_LICENSE_FILES = COPYING
 PDBG_AUTORECONF = YES
 
+PDBG_MAKE_OPTS = "GIT_SHA1=\"${PDBG_VERSION}\""
+
+define PDBG_PATCH_M4
+	mkdir -p $(@D)/m4
+endef
+PDBG_POST_PATCH_HOOKS += PDBG_PATCH_M4
+
 $(eval $(autotools-package))
-- 
2.14.1

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

* [Buildroot] [PATCH] pdbg: bump version to latest
  2017-09-27  2:15 [Buildroot] [PATCH] pdbg: bump version to latest Joel Stanley
@ 2017-09-28 18:18 ` Alistair Francis
       [not found]   ` <4755311.maSrUhusWP@new-mexico>
  2017-10-02 19:59 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Alistair Francis @ 2017-09-28 18:18 UTC (permalink / raw)
  To: buildroot

On Tue, Sep 26, 2017 at 7:15 PM, Joel Stanley <joel@jms.id.au> wrote:
> I got this error when attempting to build:
>
>  aclocal: error: couldn't open directory 'm4': No such file or directory

When do you get this error?

>
> So we now have the post patch hook to ensure the m4 directory is
> present.

Why is this up to the builder to create this directory? Shouldn't it
be created by the packages make system?

>
> In addition, the package now sets a variable with the Git SHA1 so that
> the binary contians the expected output for --version.

Maybe that should be a separate patch?

Thanks,
Alistair

>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  package/pdbg/pdbg.hash | 2 +-
>  package/pdbg/pdbg.mk   | 9 ++++++++-
>  2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/package/pdbg/pdbg.hash b/package/pdbg/pdbg.hash
> index 16bf58024c61..2aec71817770 100644
> --- a/package/pdbg/pdbg.hash
> +++ b/package/pdbg/pdbg.hash
> @@ -1,2 +1,2 @@
>  # Locally calculated
> -sha256 8edabb9ae98ce3b1892b768f2ee5e779a00476b63cdcc6f905e8464a0b7d96a3 pdbg-90a7370a11e727f1482dea6ff2bd6aec20c64805.tar.gz
> +sha256 e0b81fc65eb83692c5c07d7ae109882cefebf663444b7ea804d0544451c1a72f pdbg-77158819158d1d7053a737ac090d04fdfbfe9265.tar.gz
> diff --git a/package/pdbg/pdbg.mk b/package/pdbg/pdbg.mk
> index 184de8650d37..0864a6de9cd8 100644
> --- a/package/pdbg/pdbg.mk
> +++ b/package/pdbg/pdbg.mk
> @@ -4,10 +4,17 @@
>  #
>  ################################################################################
>
> -PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
> +PDBG_VERSION = 77158819158d1d7053a737ac090d04fdfbfe9265
>  PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
>  PDBG_LICENSE = Apache-2.0
>  PDBG_LICENSE_FILES = COPYING
>  PDBG_AUTORECONF = YES
>
> +PDBG_MAKE_OPTS = "GIT_SHA1=\"${PDBG_VERSION}\""
> +
> +define PDBG_PATCH_M4
> +       mkdir -p $(@D)/m4
> +endef
> +PDBG_POST_PATCH_HOOKS += PDBG_PATCH_M4
> +
>  $(eval $(autotools-package))
> --
> 2.14.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] pdbg: bump version to latest
       [not found]   ` <4755311.maSrUhusWP@new-mexico>
@ 2017-09-29  1:04     ` Joel Stanley
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2017-09-29  1:04 UTC (permalink / raw)
  To: buildroot

On Fri, Sep 29, 2017 at 9:51 AM, Alistair Popple <alistair@popple.id.au> wrote:
> On Thu, 28 Sep 2017 11:18:51 AM Alistair Francis wrote:
>> On Tue, Sep 26, 2017 at 7:15 PM, Joel Stanley <joel@jms.id.au> wrote:
>> > I got this error when attempting to build:
>> >
>> >  aclocal: error: couldn't open directory 'm4': No such file or directory
>>
>> When do you get this error?
>>
>> >
>> > So we now have the post patch hook to ensure the m4 directory is
>> > present.
>>
>> Why is this up to the builder to create this directory? Shouldn't it
>> be created by the packages make system?
>
> I haven't hit this issue myself (although I haven't built the package with
> buildroot and it's a while since I bootstrapped), but it seems reasonable
> to me if it's a problem with the pdbg build process we should just fix it
> there (if there's a patch I've missed let me know).
>
> Any ideas why we only seem to hit this during a buildroot build? Is it just
> something broken on the pdbg side or is it a bit more subtle?

When I do an autoreconf on my Ubuntu system it has a warning, but the
build continues:

$ autoreconf  -i
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:5: installing './compile'
configure.ac:6: installing './config.guess'
configure.ac:6: installing './config.sub'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am: installing './depcomp'
$ autoreconf  --version
autoreconf (GNU Autoconf) 2.69

I spent some time searching for a solution, and it wasn't clear who's
fault it was. There are a bunch of packages in buildroot that do a
similar thing:

$ git grep 'mkdir\(.*\)m4' package/
package/atest/atest.mk: mkdir -p $(@D)/m4
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk:   mkdir -p $(@D)/m4
package/gutenprint/gutenprint.mk:       mkdir -p $(@D)/m4local
package/irqbalance/irqbalance.mk:       mkdir -p $(@D)/m4
package/jamvm/jamvm.mk: mkdir -p $(@D)/m4
package/janus-gateway/janus-gateway.mk: mkdir -p $(@D)/m4
package/lcdapi/lcdapi.mk:       mkdir -p $(@D)/m4
package/libedit/libedit.mk:     mkdir $(@D)/m4
package/libiscsi/libiscsi.mk:   mkdir -p $(@D)/m4
package/libseccomp/libseccomp.mk:       mkdir $(@D)/m4
package/libsoundtouch/libsoundtouch.mk: mkdir -p $(@D)/config/m4
package/ltrace/ltrace.mk:       mkdir -p $(@D)/config/m4
package/openpgm/openpgm.mk:     mkdir -p $(@D)/$(OPENPGM_SUBDIR)/m4
package/sysprof/sysprof.mk:     mkdir -p $(@D)/m4
package/tesseract-ocr/tesseract-ocr.mk: mkdir -p $(@D)/m4

So I copied this method for pdbg.

>> >
>> > In addition, the package now sets a variable with the Git SHA1 so that
>> > the binary contians the expected output for --version.
>>
>> Maybe that should be a separate patch?

I doubt that is useful. If we do it before bumping, it would do
nothing. If we do it afterwards, there will be a commit where the
version is not set.

Cheers,

Joel

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

* [Buildroot] [PATCH] pdbg: bump version to latest
  2017-09-27  2:15 [Buildroot] [PATCH] pdbg: bump version to latest Joel Stanley
  2017-09-28 18:18 ` Alistair Francis
@ 2017-10-02 19:59 ` Thomas Petazzoni
  2017-10-03 12:01   ` Joel Stanley
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2017-10-02 19:59 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 27 Sep 2017 11:45:47 +0930, Joel Stanley wrote:
> I got this error when attempting to build:
> 
>  aclocal: error: couldn't open directory 'm4': No such file or directory
> 
> So we now have the post patch hook to ensure the m4 directory is
> present.
> 
> In addition, the package now sets a variable with the Git SHA1 so that
> the binary contians the expected output for --version.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

It doesn't build here:

>>> pdbg 77158819158d1d7053a737ac090d04fdfbfe9265 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"  /usr/bin/make -j5 "GIT_SHA1=\"77158819158d1d7053a737ac090d04fdfbfe9265\"" -C /home/thomas/projets/buildroot/output/build/pdbg-77158819158d1d7053a737ac090d04fdfbfe9265/
/usr/bin/make  all-am
dtc -i./ -I dts fake.dts -O dtb > fake.dtb.o.tmp
m4 -I./ p8-fsi.dts.m4 > p8-fsi.dts
m4 -I./ p8-i2c.dts.m4 > p8-i2c.dts
dd if=fake.dtb.o.tmp of=fake.dtb.o ibs=16 conv=sync
m4 -I./ p9-fsi.dtsi.m4 > p9-fsi.dtsi
23+1 records in
0+1 records out
384 bytes copied, 5.8961e-05 s, 6.5 MB/s
rm fake.dtb.o.tmp
m4 -I./ p8-host.dts.m4 > p8-host.dts
/home/thomas/projets/buildroot/output/host/bin/arm-linux-objcopy -I binary -O elf32-littlearm -B arm  fake.dtb.o fake.dtb.o
m4 -I./ p9-kernel.dts.m4 > p9-kernel.dts
m4 -I./ p9-host.dts.m4 > p9-host.dts
  CC       libpdbg/libpdbg_la-host.lo
  CC       libpdbg/libpdbg_la-kernel.lo
  CC       libpdbg/libpdbg_la-fake.lo
  CC       libpdbg/libpdbg_la-chip.lo
  CC       libpdbg/libpdbg_la-p8chip.lo
In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/stdio.h:71:0,
                 from libpdbg/fake.c:17:
/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_stdio.h:149:16: error: expected identifier or ?(? before ?;? token
  void *__unused;    /* Placeholder for codeset binding. */
                ^
make[3]: *** [Makefile:784: libpdbg/libpdbg_la-fake.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
rm p8-host.dts p9-kernel.dts p8-i2c.dts p8-fsi.dts p9-host.dts
make[2]: *** [Makefile:431: all] Error 2
make[1]: *** [package/pkg-generic.mk:237: /home/thomas/projets/buildroot/output/build/pdbg-77158819158d1d7053a737ac090d04fdfbfe9265/.stamp_built] Error 2
make: *** [Makefile:79: _all] Error 2

Problematic defconfig:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.05-1078-g95b1dae.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_PDBG=y
# BR2_TARGET_ROOTFS_TAR is not set

The current version of pdbg in Buildroot builds fine.

> +PDBG_MAKE_OPTS = "GIT_SHA1=\"${PDBG_VERSION}\""

Please use $() and not ${} when referencing make variables.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] pdbg: bump version to latest
  2017-10-02 19:59 ` Thomas Petazzoni
@ 2017-10-03 12:01   ` Joel Stanley
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2017-10-03 12:01 UTC (permalink / raw)
  To: buildroot

On Tue, Oct 3, 2017 at 5:29 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 27 Sep 2017 11:45:47 +0930, Joel Stanley wrote:
>> I got this error when attempting to build:
>>
>>  aclocal: error: couldn't open directory 'm4': No such file or directory
>>
>> So we now have the post patch hook to ensure the m4 directory is
>> present.
>>
>> In addition, the package now sets a variable with the Git SHA1 so that
>> the binary contians the expected output for --version.
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>
> It doesn't build here:
>
>>>> pdbg 77158819158d1d7053a737ac090d04fdfbfe9265 Building
> PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"  /usr/bin/make -j5 "GIT_SHA1=\"77158819158d1d7053a737ac090d04fdfbfe9265\"" -C /home/thomas/projets/buildroot/output/build/pdbg-77158819158d1d7053a737ac090d04fdfbfe9265/
> /usr/bin/make  all-am
> dtc -i./ -I dts fake.dts -O dtb > fake.dtb.o.tmp
> m4 -I./ p8-fsi.dts.m4 > p8-fsi.dts
> m4 -I./ p8-i2c.dts.m4 > p8-i2c.dts
> dd if=fake.dtb.o.tmp of=fake.dtb.o ibs=16 conv=sync
> m4 -I./ p9-fsi.dtsi.m4 > p9-fsi.dtsi
> 23+1 records in
> 0+1 records out
> 384 bytes copied, 5.8961e-05 s, 6.5 MB/s
> rm fake.dtb.o.tmp
> m4 -I./ p8-host.dts.m4 > p8-host.dts
> /home/thomas/projets/buildroot/output/host/bin/arm-linux-objcopy -I binary -O elf32-littlearm -B arm  fake.dtb.o fake.dtb.o
> m4 -I./ p9-kernel.dts.m4 > p9-kernel.dts
> m4 -I./ p9-host.dts.m4 > p9-host.dts
>   CC       libpdbg/libpdbg_la-host.lo
>   CC       libpdbg/libpdbg_la-kernel.lo
>   CC       libpdbg/libpdbg_la-fake.lo
>   CC       libpdbg/libpdbg_la-chip.lo
>   CC       libpdbg/libpdbg_la-p8chip.lo
> In file included from /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/stdio.h:71:0,
>                  from libpdbg/fake.c:17:
> /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_stdio.h:149:16: error: expected identifier or ?(? before ?;? token
>   void *__unused;    /* Placeholder for codeset binding. */

Oops. I tested with uclibc, but it must have had a different
configuration. I think that symbol is defined when locale support is
enabled.

I created a patch to resolve the issue.

>> +PDBG_MAKE_OPTS = "GIT_SHA1=\"${PDBG_VERSION}\""
>
> Please use $() and not ${} when referencing make variables.

Fixed in v2.

Thanks for the review!

Cheers,

Joel

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

end of thread, other threads:[~2017-10-03 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27  2:15 [Buildroot] [PATCH] pdbg: bump version to latest Joel Stanley
2017-09-28 18:18 ` Alistair Francis
     [not found]   ` <4755311.maSrUhusWP@new-mexico>
2017-09-29  1:04     ` Joel Stanley
2017-10-02 19:59 ` Thomas Petazzoni
2017-10-03 12:01   ` Joel Stanley

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.