Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes
@ 2014-10-19 15:23 Bernd Kuhls
  2014-10-19 15:23 ` [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc " Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bernd Kuhls @ 2014-10-19 15:23 UTC (permalink / raw)
  To: buildroot

Otherwise configure issues this error message:
configure: error: --enable-debug cannot be used in conjunction with --enable-expert-mode

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/beecrypt/beecrypt-0003-configure.patch |   30 ++++++++++++++++++++++++
 package/beecrypt/beecrypt.mk                   |    4 ++++
 2 files changed, 34 insertions(+)
 create mode 100644 package/beecrypt/beecrypt-0003-configure.patch

diff --git a/package/beecrypt/beecrypt-0003-configure.patch b/package/beecrypt/beecrypt-0003-configure.patch
new file mode 100644
index 0000000..bab94c9
--- /dev/null
+++ b/package/beecrypt/beecrypt-0003-configure.patch
@@ -0,0 +1,30 @@
+Fix build with debug enabled
+
+Otherwise configure issues this error message:
+configure: error: --enable-debug cannot be used in conjunction with --enable-expert-mode
+
+Downloaded from Gentoo:
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/beecrypt/files/beecrypt-4.2.1-build-system.patch?revision=1.2&view=markup
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- beecrypt-4.2.1/configure.ac
++++ beecrypt-4.2.1/configure.ac
+@@ -11,7 +11,7 @@
+ 
+ # Checks for package options
+ AC_ARG_ENABLE(expert-mode, [  --enable-expert-mode      follow user-defined CFLAGS settings [[default=no]]],[
+-  ac_enable_expert_mode=yes
++  ac_enable_expert_mode=$enableval
+   ],[
+   if test "X$CFLAGS" != "X"; then
+     echo "enabling expert mode"
+@@ -25,7 +25,7 @@
+   if test "$ac_enable_expert_mode" = yes; then
+     AC_MSG_ERROR([--enable-debug cannot be used in conjunction with --enable-expert-mode])
+   fi
+-  ac_enable_debug=yes
++  ac_enable_debug=$enableval
+   ],[
+   ac_enable_debug=no
+   ])
diff --git a/package/beecrypt/beecrypt.mk b/package/beecrypt/beecrypt.mk
index 7a2511d..f6a24d5 100644
--- a/package/beecrypt/beecrypt.mk
+++ b/package/beecrypt/beecrypt.mk
@@ -22,6 +22,10 @@ BEECRYPT_CONF_OPTS = \
 		--without-python \
 		--disable-openmp
 
+ifeq ($(BR2_ENABLE_DEBUG),y)
+BEECRYPT_CONF_OPTS += --disable-expert-mode
+endif
+
 ifeq ($(BR2_PACKAGE_BEECRYPT_CPP),y)
 BEECRYPT_DEPENDENCIES += icu
 else
-- 
1.7.10.4

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

* [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc build with BR2_ENABLE_DEBUG=yes
  2014-10-19 15:23 [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes Bernd Kuhls
@ 2014-10-19 15:23 ` Bernd Kuhls
  2014-10-19 15:32   ` Thomas Petazzoni
  2014-10-19 15:28 ` [Buildroot] [PATCH 1/1] package/beecrypt: Fix " Bernd Kuhls
  2014-10-19 15:31 ` Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Bernd Kuhls @ 2014-10-19 15:23 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/mesa3d-0002-execinfo_h.patch |   42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/mesa3d/mesa3d-0002-execinfo_h.patch

diff --git a/package/mesa3d/mesa3d-0002-execinfo_h.patch b/package/mesa3d/mesa3d-0002-execinfo_h.patch
new file mode 100644
index 0000000..9e3cdd8
--- /dev/null
+++ b/package/mesa3d/mesa3d-0002-execinfo_h.patch
@@ -0,0 +1,42 @@
+Fixes uclibc build as uclibc does not include backtrace functionality
+
+Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=85197
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr Mesa-10.3.1.org/src/mapi/glapi/gen/gl_gentable.py Mesa-10.3.1/src/mapi/glapi/gen/gl_gentable.py
+--- Mesa-10.3.1.org/src/mapi/glapi/gen/gl_gentable.py	2014-10-12 22:42:39.000000000 +0200
++++ Mesa-10.3.1/src/mapi/glapi/gen/gl_gentable.py	2014-10-19 13:52:19.517222947 +0200
+@@ -40,9 +40,10 @@
+ #ifdef HAVE_DIX_CONFIG_H
+ #include <dix-config.h>
+ #endif
++#include <features.h>
+ 
+ #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
+-	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
++	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__UCLIBC__))
+ #define USE_BACKTRACE
+ #endif
+ 
+diff -uNr Mesa-10.3.1.org/src/mesa/drivers/dri/i915/intel_regions.c Mesa-10.3.1/src/mesa/drivers/dri/i915/intel_regions.c
+--- Mesa-10.3.1.org/src/mesa/drivers/dri/i915/intel_regions.c	2014-05-06 00:45:23.000000000 +0200
++++ Mesa-10.3.1/src/mesa/drivers/dri/i915/intel_regions.c	2014-10-19 13:54:01.645226603 +0200
+@@ -41,6 +41,7 @@
+ 
+ #include <sys/ioctl.h>
+ #include <errno.h>
++#include <features.h>
+ 
+ #include "main/hash.h"
+ #include "intel_context.h"
+@@ -65,7 +66,9 @@
+ #define _DBG(...) {debug_backtrace(); DBG(__VA_ARGS__);}
+ 
+ /* Backtracing debug support */
++#if !defined(__UCLIBC__)
+ #include <execinfo.h>
++#endif
+ 
+ static void
+ debug_backtrace(void)
-- 
1.7.10.4

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

* [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes
  2014-10-19 15:23 [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes Bernd Kuhls
  2014-10-19 15:23 ` [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc " Bernd Kuhls
@ 2014-10-19 15:28 ` Bernd Kuhls
  2014-10-19 15:31 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2014-10-19 15:28 UTC (permalink / raw)
  To: buildroot

Bernd Kuhls <bernd.kuhls@t-online.de> wrote in 
news:1413732225-14832-1-git-send-email-bernd.kuhls at t-online.de:

> Otherwise configure issues this error message:
> configure: error: --enable-debug cannot be used in conjunction with --
enable-expert-mode

Hi,

two minutes later the autobuilder found the same error ;)
http://autobuild.buildroot.net/results/b35/b353696a01ae85ad0b0c379364aaa9224e
0bde42/

Regards, Bernd

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

* [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes
  2014-10-19 15:23 [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes Bernd Kuhls
  2014-10-19 15:23 ` [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc " Bernd Kuhls
  2014-10-19 15:28 ` [Buildroot] [PATCH 1/1] package/beecrypt: Fix " Bernd Kuhls
@ 2014-10-19 15:31 ` Thomas Petazzoni
  2014-10-19 16:37   ` Bernd Kuhls
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-19 15:31 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun, 19 Oct 2014 17:23:44 +0200, Bernd Kuhls wrote:
> Otherwise configure issues this error message:
> configure: error: --enable-debug cannot be used in conjunction with --enable-expert-mode
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/beecrypt/beecrypt-0003-configure.patch |   30 ++++++++++++++++++++++++
>  package/beecrypt/beecrypt.mk                   |    4 ++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 package/beecrypt/beecrypt-0003-configure.patch

I don't quite understand what's going on here. You need both a patch
*and* passing --disable-expert-mode to get --enable-debug to work? What
is the relation between the two?

In our case, I would expect to always use --enable-expert-mode, since
we do want beecrypt to use Buildroot CFLAGS, not its own CFLAGS.

Thanks,

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

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

* [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc build with BR2_ENABLE_DEBUG=yes
  2014-10-19 15:23 ` [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc " Bernd Kuhls
@ 2014-10-19 15:32   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-19 15:32 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun, 19 Oct 2014 17:23:45 +0200, Bernd Kuhls wrote:
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/mesa3d/mesa3d-0002-execinfo_h.patch |   42 +++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 package/mesa3d/mesa3d-0002-execinfo_h.patch
> 
> diff --git a/package/mesa3d/mesa3d-0002-execinfo_h.patch b/package/mesa3d/mesa3d-0002-execinfo_h.patch
> new file mode 100644
> index 0000000..9e3cdd8
> --- /dev/null
> +++ b/package/mesa3d/mesa3d-0002-execinfo_h.patch
> @@ -0,0 +1,42 @@
> +Fixes uclibc build as uclibc does not include backtrace functionality
> +
> +Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=85197
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Do you think it would be possible to have a better patch  that adds an
AC_CHECK_HEADER([execinfo.h]) to configure.ac, and then uses
HAVE_EXECINFO_H instead of __UCLIBC__ ? This is more correct, and would
make it compatible with potential future versions of uClibc that might
have backtrace support.

Thanks!

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

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

* [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes
  2014-10-19 15:31 ` Thomas Petazzoni
@ 2014-10-19 16:37   ` Bernd Kuhls
  0 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2014-10-19 16:37 UTC (permalink / raw)
  To: buildroot

[posted and mailed]

Hi,

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20141019173111.07415809 at free-
electrons.com:

> I don't quite understand what's going on here. You need both a patch
> *and* passing --disable-expert-mode to get --enable-debug to work? What
> is the relation between the two?

http://beecrypt.cvs.sourceforge.net/viewvc/beecrypt/beecrypt/configure.ac?
revision=1.85&view=markup

The source of the problem is in line 25:
configure fails when both expert-mode and debug are enabled.

When the test in line 16 is positive, that means $CFLAGS is not empty, 
expert mode is enabled, regardless of the options passed to configure.

So I needed a patch to have real control over expert mode and a configure 
option to disable it, which is a bad idea anyway...

> In our case, I would expect to always use --enable-expert-mode, since
> we do want beecrypt to use Buildroot CFLAGS, not its own CFLAGS.

Correct. I should have ported over all the Gentoo patches in the first 
place;)

Beecrypt has its own CFLAGS defined in acinclude.m4, Gentoo removes all of 
them:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-
libs/beecrypt/files/beecrypt-4.2.1-build-system.patch?revision=1.2
&view=markup

and builds the package with expert mode disabled. line 56:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-
libs/beecrypt/beecrypt-4.2.1-r1.ebuild?revision=1.2&view=markup

They also fixed the gcc-4.7 problem with a source code patch:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-
libs/beecrypt/files/beecrypt-4.2.1-gcc-4.7.patch?revision=1.1&view=markup

instead of adding a gcc option to CXXFLAGS like we do:
http://git.buildroot.net/buildroot/commit/package/beecrypt/beecrypt.mk?id=
74da2cca30852cc12c5f6e83be39e301aff74d62

Currently I am running a test compile with the complete backport from 
Gentoo, stay tuned ;)

Regards, Bernd

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

end of thread, other threads:[~2014-10-19 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 15:23 [Buildroot] [PATCH 1/1] package/beecrypt: Fix build with BR2_ENABLE_DEBUG=yes Bernd Kuhls
2014-10-19 15:23 ` [Buildroot] [PATCH 1/1] package/mesa3d: Fix uClibc " Bernd Kuhls
2014-10-19 15:32   ` Thomas Petazzoni
2014-10-19 15:28 ` [Buildroot] [PATCH 1/1] package/beecrypt: Fix " Bernd Kuhls
2014-10-19 15:31 ` Thomas Petazzoni
2014-10-19 16:37   ` Bernd Kuhls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox