All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path
@ 2020-02-13 17:46 Ryan Coe
  2020-04-12 20:22 ` Thomas Petazzoni
  2020-08-11 13:46 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Ryan Coe @ 2020-02-13 17:46 UTC (permalink / raw)
  To: buildroot

This patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it,
mariadb_config and mysql_config incorrectly returns host paths for
include paths and library paths.

Upstream report and status:
https://jira.mariadb.org/browse/CONC-454
https://github.com/mariadb-corporation/mariadb-connector-c/pull/127

Reported-by: Alexey Lukyanchuk <skif@skif-web.ru>
Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
---
Changes v3 -> v4:
  - add upstream status (suggested by Peter)
Changes v2 -> v3:
  - remove extra slash between CMAKE_SYSROOT and CMAKE_INSTALL_PREFIX
Changes v1 -> v2:
  - no change
---
 ...2-add-sysroot-path-to-mariadb_config.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/mariadb/0002-add-sysroot-path-to-mariadb_config.patch

diff --git a/package/mariadb/0002-add-sysroot-path-to-mariadb_config.patch b/package/mariadb/0002-add-sysroot-path-to-mariadb_config.patch
new file mode 100644
index 0000000000..e78434f930
--- /dev/null
+++ b/package/mariadb/0002-add-sysroot-path-to-mariadb_config.patch
@@ -0,0 +1,32 @@
+From 7e1b6aafeb9fe6558da7506b304c0efb5ea82281 Mon Sep 17 00:00:00 2001
+From: Ryan Coe <bluemrp9@gmail.com>
+Date: Fri, 13 Dec 2019 17:13:26 -0800
+Subject: [PATCH 1/1] add sysroot path to mariadb_config
+
+Upstream report and status:
+https://jira.mariadb.org/browse/CONC-454
+https://github.com/mariadb-corporation/mariadb-connector-c/pull/127
+
+Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
+---
+ libmariadb/mariadb_config/mariadb_config.c.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libmariadb/mariadb_config/mariadb_config.c.in b/libmariadb/mariadb_config/mariadb_config.c.in
+index 703c9466a1d9214a85f3638d2e3b4ecfef0c7bd6..f5513333e670373f060a3c2574d1d42facfd0337 100644
+--- a/libmariadb/mariadb_config/mariadb_config.c.in
++++ b/libmariadb/mariadb_config/mariadb_config.c.in
+@@ -5,8 +5,8 @@
+ 
+ static char *mariadb_progname;
+ 
+-#define INCLUDE "-I at CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I at CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
+-#define LIBS    "-L at CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb"
++#define INCLUDE "-I at CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I at CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
++#define LIBS    "-L at CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb"
+ #define LIBS_SYS "@extra_dynamic_LDFLAGS@"
+ #define CFLAGS  INCLUDE
+ #define VERSION "@MARIADB_CLIENT_VERSION@"
+-- 
+2.24.1
+
-- 
2.25.0

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

* [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path
  2020-02-13 17:46 [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path Ryan Coe
@ 2020-04-12 20:22 ` Thomas Petazzoni
  2020-08-11 13:46 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2020-04-12 20:22 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Feb 2020 09:46:55 -0800
Ryan Coe <bluemrp9@gmail.com> wrote:

> This patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it,
> mariadb_config and mysql_config incorrectly returns host paths for
> include paths and library paths.
> 
> Upstream report and status:
> https://jira.mariadb.org/browse/CONC-454
> https://github.com/mariadb-corporation/mariadb-connector-c/pull/127
> 
> Reported-by: Alexey Lukyanchuk <skif@skif-web.ru>
> Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
> ---
> Changes v3 -> v4:
>   - add upstream status (suggested by Peter)
> Changes v2 -> v3:
>   - remove extra slash between CMAKE_SYSROOT and CMAKE_INSTALL_PREFIX
> Changes v1 -> v2:
>   - no change
> ---
>  ...2-add-sysroot-path-to-mariadb_config.patch | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 package/mariadb/0002-add-sysroot-path-to-mariadb_config.patch

Applied to master, thanks. I have updated the upstream status, since
the patch has been accepted upstream. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path
  2020-02-13 17:46 [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path Ryan Coe
  2020-04-12 20:22 ` Thomas Petazzoni
@ 2020-08-11 13:46 ` Thomas Petazzoni
  2020-08-18 13:05   ` Ryan Coe
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-08-11 13:46 UTC (permalink / raw)
  To: buildroot

Hello Ryan,

On Thu, 13 Feb 2020 09:46:55 -0800
Ryan Coe <bluemrp9@gmail.com> wrote:

> This patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it,
> mariadb_config and mysql_config incorrectly returns host paths for
> include paths and library paths.
> 
> Upstream report and status:
> https://jira.mariadb.org/browse/CONC-454
> https://github.com/mariadb-corporation/mariadb-connector-c/pull/127
> 
> Reported-by: Alexey Lukyanchuk <skif@skif-web.ru>
> Signed-off-by: Ryan Coe <bluemrp9@gmail.com>

I am getting back to this older e-mail, because today I tried to use
mysql_config when MariaDB is the MySQL provider, and it doesn't work,
because it calls mariadb_config, which itself is a program compiled for
the target:

$ ./output/staging/usr/bin/mysql_config --cflags
/lib/ld-uClibc.so.0: No such file or directory
/lib/ld-uClibc.so.0: No such file or directory
/lib/ld-uClibc.so.0: No such file or directory
/lib/ld-uClibc.so.0: No such file or directory

And indeed:

$ file output/staging/usr/bin/mariadb_config 
output/staging/usr/bin/mariadb_config: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, with debug_info, not stripped

In other projects, the <something>_config program is a script, so it
works fine on the host.

How have you been using mariadb_config ?

Here, the issue is that we don't have a consistent behavior between
oracle-mysql (which installs a working
$(STAGING_DIR)/usr/bin/mysql_config) and mariadb (which doesn't install
a working $(STAGING_DIR)/usr/bin/mysql_config).

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path
  2020-08-11 13:46 ` Thomas Petazzoni
@ 2020-08-18 13:05   ` Ryan Coe
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Coe @ 2020-08-18 13:05 UTC (permalink / raw)
  To: buildroot

Thomas,


Good morning.


On 8/11/2020 6:46 AM, Thomas Petazzoni wrote:
> Hello Ryan,
>
> On Thu, 13 Feb 2020 09:46:55 -0800
> Ryan Coe <bluemrp9@gmail.com> wrote:
>
>> This patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it,
>> mariadb_config and mysql_config incorrectly returns host paths for
>> include paths and library paths.
>>
>> Upstream report and status:
>> https://jira.mariadb.org/browse/CONC-454
>> https://github.com/mariadb-corporation/mariadb-connector-c/pull/127
>>
>> Reported-by: Alexey Lukyanchuk <skif@skif-web.ru>
>> Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
> I am getting back to this older e-mail, because today I tried to use
> mysql_config when MariaDB is the MySQL provider, and it doesn't work,
> because it calls mariadb_config, which itself is a program compiled for
> the target:
>
> $ ./output/staging/usr/bin/mysql_config --cflags
> /lib/ld-uClibc.so.0: No such file or directory
> /lib/ld-uClibc.so.0: No such file or directory
> /lib/ld-uClibc.so.0: No such file or directory
> /lib/ld-uClibc.so.0: No such file or directory
>
> And indeed:
>
> $ file output/staging/usr/bin/mariadb_config
> output/staging/usr/bin/mariadb_config: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, with debug_info, not stripped
>
> In other projects, the <something>_config program is a script, so it
> works fine on the host.
>
> How have you been using mariadb_config ?
I actually haven't used mariadb_config for anything.? My typical usage 
would include MariaDB and PHP mysqlnd.
>
> Here, the issue is that we don't have a consistent behavior between
> oracle-mysql (which installs a working
> $(STAGING_DIR)/usr/bin/mysql_config) and mariadb (which doesn't install
> a working $(STAGING_DIR)/usr/bin/mysql_config).
Makes sense.? Do you have an opinion on how to proceed?? Thanks.
>
> Thanks!
>
> Thomas

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

end of thread, other threads:[~2020-08-18 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 17:46 [Buildroot] [PATCH v4 1/1] package/mariadb: patch mariadb_config to add sysroot path Ryan Coe
2020-04-12 20:22 ` Thomas Petazzoni
2020-08-11 13:46 ` Thomas Petazzoni
2020-08-18 13:05   ` Ryan Coe

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.