Skip to contentSkip to conversation

package/postgresql: needs wchar

PATCH New Bernd Kuhls 5 participants 8 messages Oct 23, 2018 – Nov 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/postgresql: needs wchar

Upstream removed support for non-wchar toolchains:
https://github.com/postgres/postgres/commit/85feb77aa09cda9ff3e12cf95c757c499dc25343

Propagate the new dependency to other packages.

Fixes
http://autobuild.buildroot.net/results/b73/b73342a39167ed7f293224d4e3b23dde691b9abf/

---
 package/bandwidthd/Config.in      | 5 +++--
 package/collectd/Config.in        | 4 ++++
 package/postgresql/Config.in      | 5 +++--
 package/python-psycopg2/Config.in | 4 ++++
 4 files changed, 14 insertions(+), 4 deletions(-)
package/bandwidthd/Config.in +3 -2
index 8a19733c2c..5a3529e0c4 100644
@@ -35,6 +35,7 @@ if BR2_PACKAGE_BANDWIDTHD
 config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
 	bool "enable postgresql log target support"
 	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR # postgresql
 	select BR2_PACKAGE_POSTGRESQL
 	help
 	  Enable support for logging the bandwidthd data to a remote
@@ -42,8 +43,8 @@ config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
 	  through a php site. See README in the source code
 	  (github.com/nroach44/bandwidthd) for more information.
 
-comment "postgresql support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "postgresql support needs a toolchain w/ dynamic library, wchar"
+	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
 
 config BR2_PACKAGE_BANDWIDTHD_SQLITE3
 	bool "enable sqlite3 log storage"
package/collectd/Config.in +4 -0
index c9e61a5622..3222547b68 100644
@@ -383,6 +383,7 @@ config BR2_PACKAGE_COLLECTD_PING
 
 config BR2_PACKAGE_COLLECTD_POSTGRESQL
 	bool "postgresql"
+	depends on BR2_USE_WCHAR # postgresql
 	select BR2_PACKAGE_POSTGRESQL
 	help
 	  Connects to and executes SQL statements on a PostgreSQL
@@ -390,6 +391,9 @@ config BR2_PACKAGE_COLLECTD_POSTGRESQL
 	  configuration, the returned values are then converted into
 	  collectd ?value lists?.
 
+comment "postgresql support needs a toolchain w/ wchar"
+	depends on !BR2_USE_WCHAR
+
 config BR2_PACKAGE_COLLECTD_PROCESSES
 	bool "processes"
 	help
package/postgresql/Config.in +3 -2
index 9dda54bf9f..e548d3cb27 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_POSTGRESQL
 	bool "postgresql"
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_USE_WCHAR
 	# fails to build in a pure static linking scenario, and
 	# postgresql is unlikely to be used in a pure statically
 	# linked environment.
@@ -18,6 +19,6 @@ config BR2_PACKAGE_POSTGRESQL
 
 	  http://www.postgresql.org
 
-comment "postgresql needs a toolchain w/ dynamic library"
+comment "postgresql needs a toolchain w/ dynamic library, wchar"
 	depends on BR2_USE_MMU
-	depends on BR2_STATIC_LIBS
+	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/python-psycopg2/Config.in +4 -0
index ec852bb49e..ec27d706de 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_PSYCOPG2
 	bool "python-psycopg2"
+	depends on BR2_USE_WCHAR # postgresql
 	select BR2_PACKAGE_POSTGRESQL
 	help
 	  Psycopg is the most popular PostgreSQL database adapter for
@@ -20,3 +21,6 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2
 	  Psycopg 2 is both Unicode and Python 3 friendly.
 
 	  http://initd.org/psycopg/
+
+comment "python-psycopg2 needs a toolchain w/ wchar"
+	depends on !BR2_USE_WCHAR
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 package/postgresql: needs wchar

Hello;

Quoted 88 lines · Bernd Kuhls

Upstream removed support for non-wchar toolchains:
https://github.com/postgres/postgres/commit/85feb77aa09cda9ff3e12cf95c757c499dc25343

Propagate the new dependency to other packages.

Fixes
http://autobuild.buildroot.net/results/b73/b73342a39167ed7f293224d4e3b23dde691b9abf/

---
 package/bandwidthd/Config.in      | 5 +++--
 package/collectd/Config.in        | 4 ++++
 package/postgresql/Config.in      | 5 +++--
 package/python-psycopg2/Config.in | 4 ++++
 4 files changed, 14 insertions(+), 4 deletions(-)
package/bandwidthd/Config.in +3 -2
index 8a19733c2c..5a3529e0c4 100644
@@ -35,6 +35,7 @@ if BR2_PACKAGE_BANDWIDTHD
 config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
        bool "enable postgresql log target support"
        depends on !BR2_STATIC_LIBS
+       depends on BR2_USE_WCHAR # postgresql
        select BR2_PACKAGE_POSTGRESQL
        help
          Enable support for logging the bandwidthd data to a remote
@@ -42,8 +43,8 @@ config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
          through a php site. See README in the source code
          (github.com/nroach44/bandwidthd) for more information.
 
-comment "postgresql support needs a toolchain w/ dynamic library"
-       depends on BR2_STATIC_LIBS
+comment "postgresql support needs a toolchain w/ dynamic library, wchar"
+       depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
 
 config BR2_PACKAGE_BANDWIDTHD_SQLITE3
        bool "enable sqlite3 log storage"
package/collectd/Config.in +4 -0
index c9e61a5622..3222547b68 100644
@@ -383,6 +383,7 @@ config BR2_PACKAGE_COLLECTD_PING
 
 config BR2_PACKAGE_COLLECTD_POSTGRESQL
        bool "postgresql"
+       depends on BR2_USE_WCHAR # postgresql
        select BR2_PACKAGE_POSTGRESQL
        help
          Connects to and executes SQL statements on a PostgreSQL
@@ -390,6 +391,9 @@ config BR2_PACKAGE_COLLECTD_POSTGRESQL
          configuration, the returned values are then converted into
          collectd ?value lists?.
 
+comment "postgresql support needs a toolchain w/ wchar"
+       depends on !BR2_USE_WCHAR
+
 config BR2_PACKAGE_COLLECTD_PROCESSES
        bool "processes"
        help
package/postgresql/Config.in +3 -2
index 9dda54bf9f..e548d3cb27 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_POSTGRESQL
        bool "postgresql"
        depends on BR2_USE_MMU # fork()
+       depends on BR2_USE_WCHAR
        # fails to build in a pure static linking scenario, and
        # postgresql is unlikely to be used in a pure statically
        # linked environment.
@@ -18,6 +19,6 @@ config BR2_PACKAGE_POSTGRESQL
 
          http://www.postgresql.org
 
-comment "postgresql needs a toolchain w/ dynamic library"
+comment "postgresql needs a toolchain w/ dynamic library, wchar"
        depends on BR2_USE_MMU
-       depends on BR2_STATIC_LIBS
+       depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/python-psycopg2/Config.in +0 -0
index ec852bb49e..ec27d706de 100644

package/python-psycopg2/Config.in line 3

Quoted 3 lines
package/python-psycopg2/Config.in +1 -0
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PYTHON_PSYCOPG2
        bool "python-psycopg2"
+       depends on BR2_USE_WCHAR # postgresql

This isn't needed because python already requires wchar.

Quoted 11 lines
package/python-psycopg2/Config.in +3 -1
        select BR2_PACKAGE_POSTGRESQL
        help
          Psycopg is the most popular PostgreSQL database adapter for
@@ -20,3 +21,6 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2
          Psycopg 2 is both Unicode and Python 3 friendly.
 
          http://initd.org/psycopg/
+
+comment "python-psycopg2 needs a toolchain w/ wchar"
+       depends on !BR2_USE_WCHAR
--
Quoted 2 lines

2.19.1

Thanks!

Adam

#2 lore raw

PATCH 1/1 package/postgresql: needs wchar

Quoted 2 lines · Adam Duskett

Hello;
On Tue, Oct 23, 2018 at 12:09 PM Bernd Kuhls <[email protected]> wrote:

[snip]

Quoted 4 lines
Quoted 3 lines

config BR2_PACKAGE_PYTHON_PSYCOPG2
bool "python-psycopg2"
+ depends on BR2_USE_WCHAR # postgresql

This isn't needed because python already requires wchar.

It is not strictly needed, but it is still useful to have it because:

- python or python3 might loose its dependency on wchar at some point;

- its conventient to be able to mechanically patch something like this (even if not automatic, you can pretty much do propagation without thinking);

- it is convenient to have it there in case we ever add something like e.g. a script that detects when a reverse dependency is missing.

So we generally leave it up to the contributor to decide to add such a
redundant dependency.

Regards,
Arnout

#3 lore raw

PATCH 1/1 package/postgresql: needs wchar

Hello,

Quoted 1 line · Arnout Vandecappelle

It is not strictly needed, but it is still useful to have it because:

True. In this case:

- Bernd did not propagate the dependency to p?p, qt and qt5base, which all three are also directly selecting BR2_PACKAGE_POSTGRESQL

- A number of places where BR2_PACKAGE_POSTGRESQL is selected do not have the !BR2_STATIC_LIBS dependency.

I am really wondering what to do with those "useless" dependencies in general. On one hand, I agree with you that semantically, it is better to have them. On the other hand:

- It's an additional maintenance burden.

- It's never tested by the autobuilders, because such "useless" dependencies are well, useless, because they are hidden by another higher-level dependency. Because they are not tested, they are often wrong and not maintained.

Due to this, whether we propagate them or not is completely random currently through the Buildroot tree, and I'm not sure it's a very nice situation.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/postgresql: needs wchar

Thomas, All,

On 2018-11-01 22:30 +0100, Thomas Petazzoni spake thusly:

Quoted 2 lines · Arnout Vandecappelle
Quoted 1 line

It is not strictly needed, but it is still useful to have it because:

I agree with Arnout here.

However, from a purely pragmatic point of view, I see that it is totally useless in practice, so I would not mind we drop them.

And in retrospect, I think it *is* better that we do drop them. If the top-level option loses that dependency, then it is 'easy' to detect it has become mandatory for a sub-option, because the autobuilders will fail.

However, if we repeat the dependency and the top-level option lses it and we forget to remove it, we will never realise that the sub-option shouldalso lose it.

Quoted 14 lines

True. In this case:

- Bernd did not propagate the dependency to p?p, qt and qt5base, which all three are also directly selecting BR2_PACKAGE_POSTGRESQL

- A number of places where BR2_PACKAGE_POSTGRESQL is selected do not have the !BR2_STATIC_LIBS dependency.

I am really wondering what to do with those "useless" dependencies in general. On one hand, I agree with you that semantically, it is better to have them. On the other hand:

- It's an additional maintenance burden.

Quoted 8 lines

- It's never tested by the autobuilders, because such "useless" dependencies are well, useless, because they are hidden by another higher-level dependency. Because they are not tested, they are often wrong and not maintained.

Due to this, whether we propagate them or not is completely random currently through the Buildroot tree, and I'm not sure it's a very nice situation.

I agree with you. Whatever we choose, we should do it consistently.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/1 package/postgresql: needs wchar

Hello,

Quoted 5 lines · Yann E. MORIN

I agree with Arnout here.

However, from a purely pragmatic point of view, I see that it is totally useless in practice, so I would not mind we drop them.

Quoted 8 lines

And in retrospect, I think it *is* better that we do drop them. If the top-level option loses that dependency, then it is 'easy' to detect it has become mandatory for a sub-option, because the autobuilders will fail.

However, if we repeat the dependency and the top-level option lses it and we forget to remove it, we will never realise that the sub-option shouldalso lose it.

That is indeed a good argument. Should we settle on the idea that we should not uselessly replicate such dependencies ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/1 package/postgresql: needs wchar

Thomas, All,

On 2018-11-16 09:24 +0100, Thomas Petazzoni spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines

And in retrospect, I think it *is* better that we do drop them. If the top-level option loses that dependency, then it is 'easy' to detect it has become mandatory for a sub-option, because the autobuilders will fail.

Quoted 6 lines
Quoted 3 lines

However, if we repeat the dependency and the top-level option lses it and we forget to remove it, we will never realise that the sub-option shouldalso lose it.

That is indeed a good argument. Should we settle on the idea that we should not uselessly replicate such dependencies ?

Yes, let's not replicate them.

And accept patches that removes them.

And accept a patch that updates the manual accordnigly, of course! ;-) (I'll see what I can do...)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/1 package/postgresql: needs wchar

In reply to Bernd Kuhls

Hello,

Quoted 8 lines · Bernd Kuhls

Upstream removed support for non-wchar toolchains:
https://github.com/postgres/postgres/commit/85feb77aa09cda9ff3e12cf95c757c499dc25343

Propagate the new dependency to other packages.

Fixes
http://autobuild.buildroot.net/results/b73/b73342a39167ed7f293224d4e3b23dde691b9abf/

Quoted 7 lines
---
 package/bandwidthd/Config.in      | 5 +++--
 package/collectd/Config.in        | 4 ++++
 package/postgresql/Config.in      | 5 +++--
 package/python-psycopg2/Config.in | 4 ++++
 4 files changed, 14 insertions(+), 4 deletions(-)

I also propagated the dependency to php, qt and qt5base, and then applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com