summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Klauer <daniel.klauer@gin.de>2023-10-04 12:54:03 +0200
committerArmin Kuster <akuster808@gmail.com>2023-10-12 09:58:05 -0400
commitccbc4478f739267c29ce31e52c2f984d57f2c381 (patch)
tree213ce2c6a4e04f8c088fff2677f4bfa749488d4e
parent75b7d005acae7c87a370473af2d6bfe17bc81dfb (diff)
downloadmeta-openembedded-ccbc4478f739267c29ce31e52c2f984d57f2c381.tar.gz
graphviz: Fix build to not use $prefix as search dir
The graphviz configure script used $prefix/include and $prefix/lib search directories, thus bypassing the recipe sysroot, which could lead to build contamination or failures. The added patch (backported from graphviz 9.0.0) fixes this. Due to the $prefix != /usr check in the configure script, this issue only showed up for recipe build variants which use a different prefix value, such as nativesdk-graphviz (prefix = SDKPATHNATIVE/...) or graphviz-native (prefix = STAGING_DIR_NATIVE/...). Using STAGING_DIR_NATIVE is probably not a problem, since it is recipe-specific anyways, but using SDKPATHNATIVE may be a problem, if it happens to exist and contains headers/libraries. Even though this may be unlikely with the default SDKPATH = "/usr/local/oe-sdk-hardcoded-buildpath" value used in bitbake.conf, the problem can still be triggered, especially if the paths like prefix or SDKPATH are customized in a build. Link: https://gitlab.com/graphviz/graphviz/-/issues/2442 Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 883860c40c67544dfe3e2d72732e2d8ef46b6f30) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/graphviz/graphviz/0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch58
-rw-r--r--meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb1
2 files changed, 59 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/graphviz/graphviz/0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch b/meta-oe/recipes-graphics/graphviz/graphviz/0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch
new file mode 100644
index 0000000000..0d3f412706
--- /dev/null
+++ b/meta-oe/recipes-graphics/graphviz/graphviz/0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch
@@ -0,0 +1,58 @@
1From 671e0d091b40ef7deb4a9d43e0dbed2a44edbec8 Mon Sep 17 00:00:00 2001
2From: Matthew Fernandez <matthew.fernandez@gmail.com>
3Date: Sat, 9 Sep 2023 01:03:04 -0700
4Subject: [PATCH] Autotools: fix: do not put '$prefix' based paths in
5 compilation flags
6
7This was causing problems with cross-compilation with a dedicated sysroot,
8because compilation would incorrectly use headers and libraries from the
9`--prefix` path. The `--prefix` path is meant to indicate a target path to
10install to, not a path from which to source dependent libraries.
11
12Gitlab: fixes #2442
13Reported-by: Daniel Klauer
14Suggested-by: Daniel Klauer
15
16Upstream-Status: Backport [https://gitlab.com/graphviz/graphviz/-/commit/012d250a903e13114bce3ba40995fb957fed7848]
17Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
18---
19 CHANGELOG.md | 3 +++
20 configure.ac | 8 --------
21 2 files changed, 3 insertions(+), 8 deletions(-)
22
23diff --git a/CHANGELOG.md b/CHANGELOG.md
24index b9b7e8e08..3a15fd256 100644
25--- a/CHANGELOG.md
26+++ b/CHANGELOG.md
27@@ -39,6 +39,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28 longer fails due to missing PHP files. #2388
29 - Syntax for a loop in `gvmap.sh` has been corrected. This was a regression in
30 Graphviz 2.50.0. #2404
31+- The Autotools build system no longer uses headers and libraries from the
32+ `--prefix` path given on the command line. This previously caused
33+ cross-compilation to incorrectly pick up host headers and libraries. #2442
34
35 ## [8.0.5] – 2023-04-30
36
37diff --git a/configure.ac b/configure.ac
38index 573a3ee5d..7d53346de 100644
39--- a/configure.ac
40+++ b/configure.ac
41@@ -190,14 +190,6 @@ if test "x${prefix}" = "xNONE"; then
42 AC_SUBST([prefix])
43 fi
44
45-# automatically check for other dependencies in $prefix first
46-if test "x${prefix}" != "x/usr"; then
47- CPPFLAGS="$CPPFLAGS -I${prefix}/include"
48- LDFLAGS="$LDFLAGS -L${prefix}/lib"
49- PKG_CONFIG_PATH="$prefix/lib/pkgconfig$PATHSEPARATOR$PKG_CONFIG_PATH"
50- export PKG_CONFIG_PATH
51-fi
52-
53 dnl -----------------------------------
54 # Static/Shared binaries
55
56--
572.34.1
58
diff --git a/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb b/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb
index ccc114007c..4d40ee4dee 100644
--- a/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb
+++ b/meta-oe/recipes-graphics/graphviz/graphviz_8.1.0.bb
@@ -19,6 +19,7 @@ DEPENDS:append:class-nativesdk = " ${BPN}-native"
19inherit autotools-brokensep pkgconfig gettext qemu 19inherit autotools-brokensep pkgconfig gettext qemu
20 20
21SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \ 21SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \
22 file://0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch \
22 " 23 "
23# Use native mkdefs 24# Use native mkdefs
24SRC_URI:append:class-target = "\ 25SRC_URI:append:class-target = "\