* [Buildroot] [PATCH v2] package/tvheadend: unbreak
@ 2013-12-03 22:15 Yann E. MORIN
2013-12-03 22:41 ` [Buildroot] Bug in the grub patches Matthew Weber
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2013-12-03 22:15 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
tvheadend tries to impersonate an autotools package, when it is not.
This breaks the build.
tvheadend's ./configure tries to run compiled code.
This breaks the build.
Switch tvheadend over to using the generic-package infrastructure,
and provide carefully-crafted _CMDS for each steps.
We still keep a post-install hook to install our "DB" since it is not
part of tvheadend, but an addition of our own packaging of tvheadend.
Fixes:
http://autobuild.buildroot.net/results/3ea/3eaa17b94975477263fe12e201eec9cbeeb2912c/
http://autobuild.buildroot.net/results/7c8/7c85db0dfab98808c97a5ef17dec9d1071dc0d49/
and a few others as well.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1->v2:
- add references to (some) autobuild failures
---
.../tvheadend-004-dont-run-compiled-code.patch | 21 +++++++++++++++++
package/tvheadend/tvheadend.mk | 27 ++++++++++++++++++----
2 files changed, 44 insertions(+), 4 deletions(-)
create mode 100644 package/tvheadend/tvheadend-004-dont-run-compiled-code.patch
diff --git a/package/tvheadend/tvheadend-004-dont-run-compiled-code.patch b/package/tvheadend/tvheadend-004-dont-run-compiled-code.patch
new file mode 100644
index 0000000..caa6e2a
--- /dev/null
+++ b/package/tvheadend/tvheadend-004-dont-run-compiled-code.patch
@@ -0,0 +1,21 @@
+support: don't try to run compiled code
+
+When cross-compiling, we can't run the compiled code.
+
+Consider the compiler besing successfull as an indication
+it is working.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN tvheadend.orig/support/configure.inc tvheadend-c7d0335eb10d02b780423bef8e7c740e422fff13/support/configure.inc
+--- tvheadend.orig/support/configure.inc 2013-12-01 01:24:26.000000000 +0100
++++ tvheadend-c7d0335eb10d02b780423bef8e7c740e422fff13/support/configure.inc 2013-12-03 22:34:57.547762178 +0100
+@@ -265,8 +265,6 @@
+ EOF
+ $CC $CFLAGS $LDFLAGS $TMPDIR/$$.c -o $TMPDIR/$$.bin $opt #&> /dev/null
+ RET=$?
+- [ $RET -eq 0 ] && $TMPDIR/$$.bin
+- RET=$?
+ rm -f $TMPDIR/$$.{c,bin}
+ return $RET
+ }
diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
index 1713d58..18da51d 100644
--- a/package/tvheadend/tvheadend.mk
+++ b/package/tvheadend/tvheadend.mk
@@ -22,6 +22,28 @@ endif
# scan files installed by the dvb-apps package
TVHEADEND_DEPENDENCIES += dvb-apps
+define TVHEADEND_CONFIGURE_CMDS
+ (cd $(@D); \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --prefix=/usr \
+ --cc="$(TARGET_CC)" \
+ --cflags="$(TARGET_CFLAGS)" \
+ --arch="$(ARCH)" \
+ --cpu="$(BR2_GCC_TARGET_CPU)" \
+ --python="$(HOST_DIR)/usr/bin/python" \
+ )
+endef
+
+define TVHEADEND_BUILD_CMDS
+ make -C $(@D)
+endef
+
+define TVHEADEND_INSTALL_TARGET_CMDS
+ make -C $(@D) DESTDIR="$(TARGET_DIR)" install
+endef
+
#----------------------------------------------------------------------------
# To run tvheadend, we need:
# - a startup script, and its config file
@@ -43,7 +65,4 @@ define TVHEADEND_USERS
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
endef
-#----------------------------------------------------------------------------
-# tvheadend is not an autotools-based package, but it is possible to
-# call its ./configure script as if it were an autotools one.
-$(eval $(autotools-package))
+$(eval $(generic-package))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] Bug in the grub patches
2013-12-03 22:15 [Buildroot] [PATCH v2] package/tvheadend: unbreak Yann E. MORIN
@ 2013-12-03 22:41 ` Matthew Weber
2013-12-04 8:11 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Weber @ 2013-12-03 22:41 UTC (permalink / raw)
To: buildroot
It looks like since (nov30) 9b3904543ca04c5d5fe5f6974539eed376de2290 the
grub pkg now fails when build on a x86_64 for a x86 target. While using
an external glibc codesourcery_x86 201209 toolchain.
stage2.c:941:7: warning: value computed is not used [-Wunused-value]
stage2.c:942:7: warning: passing argument 1 of 'grub_strcpy' from
incompatible pointer type [enabled by default]
In file included from stage2.c:20:0:
./shared.h:891:7: note: expected 'char *' but argument is of type 'char
**'
stage2.c:942:7: warning: passing argument 2 of 'grub_strcpy' from
incompatible pointer type [enabled by default]
In file included from stage2.c:20:0:
./shared.h:891:7: note: expected 'const char *' but argument is of type
'char **'
stage2.c:944:7: warning: passing argument 1 of 'grub_strcpy' from
incompatible pointer type [enabled by default]
In file included from stage2.c:20:0:
./shared.h:891:7: note: expected 'char *' but argument is of type 'char
**'
stage2.c:944:7: warning: passing argument 2 of 'grub_strcpy' from
incompatible pointer type [enabled by default]
In file included from stage2.c:20:0:
./shared.h:891:7: note: expected 'const char *' but argument is of type
'char **'
tparm.c: In function 'tparam_internal':
tparm.c:464:16: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
smp-imps.c:273:36: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
smp-imps.c:273:1: error: initializer element is not constant
smp-imps.c: In function 'get_checksum':
smp-imps.c:294:16: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
smp-imps.c: In function 'boot_cpu':
<snip>
disk_io.c: In function 'set_bootdev':
disk_io.c:1149:11: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c: In function 'grub_open':
disk_io.c:1587:7: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c:1598:7: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c: In function 'grub_read':
disk_io.c:1697:40: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c:1708:16: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c:1716:16: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
disk_io.c: Assembler messages:
disk_io.c:134: Error: incorrect register `%rax' used with `l' suffix
make[3]: *** [pre_stage2_exec-disk_io.o] Error 1
make[3]: Leaving directory
`/accts/mlweber1/proj/br-continuous/cfgs/30-fis-x86-glibc-ext/build/grub-0.97/stage2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/accts/mlweber1/proj/br-continuous/cfgs/30-fis-x86-glibc-ext/build/grub-0.97'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/accts/mlweber1/proj/br-continuous/cfgs/30-fis-x86-glibc-ext/build/grub-0.97'
make: ***
[/accts/mlweber1/proj/br-continuous/cfgs/30-fis-x86-glibc-ext/build/grub-0.97/.stamp_built]
Error 2
make: Leaving directory `/accts/mlweber1/proj/br-continuous/buildroot'
This last error looks like a 32 vs 64bit issue.
I'm guessing the build for x86 on a x86_64 patches introduced this, but I
haven't made it through all recent grub updates yet.
Thanks,
Matt Weber
mlweber1 at rockwellcollins.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Bug in the grub patches
2013-12-03 22:41 ` [Buildroot] Bug in the grub patches Matthew Weber
@ 2013-12-04 8:11 ` Thomas Petazzoni
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2013-12-04 8:11 UTC (permalink / raw)
To: buildroot
Dear Matthew Weber,
Please do not reply to an existing e-mail when you're starting a new
discussion. You're breaking discussion threads by doing so. When you
start a new discussion, simply create a new e-mail.
On Tue, 3 Dec 2013 16:41:22 -0600, Matthew Weber wrote:
> It looks like since (nov30) 9b3904543ca04c5d5fe5f6974539eed376de2290 the
> grub pkg now fails when build on a x86_64 for a x86 target. While using
> an external glibc codesourcery_x86 201209 toolchain.
> This last error looks like a 32 vs 64bit issue.
>
> I'm guessing the build for x86 on a x86_64 patches introduced this, but I
> haven't made it through all recent grub updates yet.
Thanks for this report! However, I have been unable to reproduce: I am
building on a 64 bits machine (uname -m reports x86_64), and grub
builds fine with the codesourcery x86 2012.09 toolchain. More
specifically, I've built the following configuration:
BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_GRUB=y
Can you give me your Buildroot .config, as well as the complete build
log of Grub, and the Grub config.log file?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-04 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03 22:15 [Buildroot] [PATCH v2] package/tvheadend: unbreak Yann E. MORIN
2013-12-03 22:41 ` [Buildroot] Bug in the grub patches Matthew Weber
2013-12-04 8:11 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox