* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
@ 2015-03-16 19:40 Peter Seiderer
2015-03-16 20:24 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2015-03-16 19:40 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On Sun, Mar 15, 2015 at 07:47:53PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
>
> On Tue, 10 Mar 2015 20:59:39 +0100, Peter Seiderer wrote:
>
> > +# unsupported platform, overwrite manually
> > +ifeq ($(BR2_bfin),y)
> > +POSTGRESQL_CONF_OPTS += --with-template=linux
> > +endif
>
> Do we really need to make this conditional? I believe
> --with-template=linux is fine in all cases since Buildroot only targets
> Linux.
>
Did take a look at postgresql-9.4.1/configure.in, the decision is made on
a variable called $host_os, but used for (what I would call) $target_os:
- for the bfin test case:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... bfin-buildroot-uclinux-uclibc
- for a buildroot toolchain:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-buildroot-linux-uclibcgnueabi
> So what about having --with-template=linux unconditionally in
> POSTGRESQL_CONF_OPTS instead?
>
Yes, I think this is save...
> If that's OK for you, I can adjust this when applying.
>
Yes, thats fine with me...
Regards,
Peter
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-16 19:40 [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
@ 2015-03-16 20:24 ` Thomas Petazzoni
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-16 20:24 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Mon, 16 Mar 2015 20:40:03 +0100, Peter Seiderer wrote:
> Did take a look at postgresql-9.4.1/configure.in, the decision is made on
> a variable called $host_os, but used for (what I would call) $target_os:
>
> - for the bfin test case:
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... bfin-buildroot-uclinux-uclibc
>
> - for a buildroot toolchain:
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... arm-buildroot-linux-uclibcgnueabi
Yes, the "linux" OS is recognized, but not "uclinux", I saw that. But
it means that passing --with-template=linux unconditionally is fine.
> > If that's OK for you, I can adjust this when applying.
>
> Yes, thats fine with me...
Ok, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
@ 2015-03-17 20:45 Peter Seiderer
2015-03-17 21:54 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2015-03-17 20:45 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On Tue, Mar 17, 2015 at 09:29:39PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
>
> On Tue, 17 Mar 2015 21:26:02 +0100, Peter Seiderer wrote:
>
> > The only minor purpose leftover is as gcc ICE exampel for 'bfin-uclinux-gcc (ADI-2014R1-RC2) 4.3.5' (see [1])...
>
> I don't understand, why do you say it's the "only minor purpose
> leftover" ?
>
> If PostgreSQL uses fork(), it *cannot* work on noMMU architecture, so
> there is no way to build PostgreSQL on Blackfin.
>
...should have added 'until Blackfin compile is disabled because of noMMU' as a footnote ;-)
But the remaining question: Revert the patch? Should I send a revert-patch?
Or can you revert/commit directly? Or leave as is?
Regards,
Peter
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-17 20:45 Peter Seiderer
@ 2015-03-17 21:54 ` Thomas Petazzoni
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-17 21:54 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 17 Mar 2015 21:45:48 +0100, Peter Seiderer wrote:
> ...should have added 'until Blackfin compile is disabled because of noMMU' as a footnote ;-)
>
> But the remaining question: Revert the patch? Should I send a revert-patch?
> Or can you revert/commit directly? Or leave as is?
Well, please send a patch that adds the BR2_USE_MMU dependency, and as
part of it, removes the attempts at supporting Blackfin.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
@ 2015-03-17 20:26 Peter Seiderer
2015-03-17 20:29 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2015-03-17 20:26 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On Tue, Mar 17, 2015 at 08:59:23PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
>
> On Tue, 17 Mar 2015 20:52:03 +0100, Peter Seiderer wrote:
>
> > Will provide a patch for postgresql to check for fork/BR2_USE_MMU, is there any special string
> > for the comment besides 'needs threads'?
>
> No there is no comment about a BR2_USE_MMU dependency, because it's not
> something the user can "fix" : if your architecture doesn't have a MMU,
> it's like this, there's nothing you can do about it.
>
> > No special point, had the build environment still from [1] around...
> >
> > In retrospect (in case bfin is disabled because of fork) the patch subject should
> > have been something different...
>
> Well, the patch by itself is then completely useless, because Blackfin
> is a noMMU architecture, so postgresql will never work on it.
>
You are right (did not know that the 'uclinux' in 'bfin-buildroot-uclinux-uclibc' stands
for microcontroller Linux/noMMU)...
The only minor purpose leftover is as gcc ICE exampel for 'bfin-uclinux-gcc (ADI-2014R1-RC2) 4.3.5' (see [1])...
Revert the patch or keep it?
Regards,
Peter
[1] http://lists.busybox.net/pipermail/buildroot/2015-March/121094.html
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-17 20:26 Peter Seiderer
@ 2015-03-17 20:29 ` Thomas Petazzoni
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-17 20:29 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 17 Mar 2015 21:26:02 +0100, Peter Seiderer wrote:
> The only minor purpose leftover is as gcc ICE exampel for 'bfin-uclinux-gcc (ADI-2014R1-RC2) 4.3.5' (see [1])...
I don't understand, why do you say it's the "only minor purpose
leftover" ?
If PostgreSQL uses fork(), it *cannot* work on noMMU architecture, so
there is no way to build PostgreSQL on Blackfin.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
@ 2015-03-17 19:52 Peter Seiderer
2015-03-17 19:59 ` Thomas Petazzoni
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2015-03-17 19:52 UTC (permalink / raw)
To: buildroot
Hello Thomas,
On Mon, Mar 16, 2015 at 11:07:25PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
>
> On Tue, 10 Mar 2015 20:59:39 +0100, Peter Seiderer wrote:
> > - overwrite platform support with linux template
> > - disable spinlock support
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>
> postgresql uses fork(), which is not available on Blackfin:
> http://autobuild.buildroot.org/results/c9c/c9c93156fe64e89f35627aa592c47d8c5181ed7d/build-end.log.
>
Will provide a patch for postgresql to check for fork/BR2_USE_MMU, is there any special string
for the comment besides 'needs threads'?
> So what was the point of enabling postgresql on Blackfin ?
No special point, had the build environment still from [1] around...
In retrospect (in case bfin is disabled because of fork) the patch subject should
have been something different...
Regards,
Peter
[1] http://git.buildroot.net/buildroot/commit/?id=fc2e91d5bd32047055a611ed0d62f050bc90377c
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-17 19:52 Peter Seiderer
@ 2015-03-17 19:59 ` Thomas Petazzoni
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-17 19:59 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 17 Mar 2015 20:52:03 +0100, Peter Seiderer wrote:
> Will provide a patch for postgresql to check for fork/BR2_USE_MMU, is there any special string
> for the comment besides 'needs threads'?
No there is no comment about a BR2_USE_MMU dependency, because it's not
something the user can "fix" : if your architecture doesn't have a MMU,
it's like this, there's nothing you can do about it.
> No special point, had the build environment still from [1] around...
>
> In retrospect (in case bfin is disabled because of fork) the patch subject should
> have been something different...
Well, the patch by itself is then completely useless, because Blackfin
is a noMMU architecture, so postgresql will never work on it.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/8] postgresql: enable uclibc build
@ 2015-03-10 19:59 Peter Seiderer
2015-03-10 19:59 ` [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2015-03-10 19:59 UTC (permalink / raw)
To: buildroot
Build with uclibc and locale support failes with the following error
message:
regc_pg_locale.c: In function ?pg_wc_isdigit?:
regc_pg_locale.c:312:6: error: dereferencing pointer to incomplete type
isdigit_l((unsigned char) c, pg_regex_locale));
This can be fixed by overwriting the HAVE_LOCALE_T detection (thanks
to Alex Potapenko <opotapenko@gmail.com> for the hint [1]).
[1] http://lists.busybox.net/pipermail/buildroot/2015-March/121088.html
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 --> v3:
- no changes
Tested with the following buildroot defonfig:
BR2_arm=y
BR2_arm1176jzf_s=y
BR2_JLEVEL=1
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="246530ff8a4f302b8666c6d9cf509407d8c1257a"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi/linux-3.18-rpi-dt.defconfig"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y
BR2_PACKAGE_POSTGRESQL=y
---
package/postgresql/Config.in | 7 -------
package/postgresql/postgresql.mk | 8 ++++++++
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/package/postgresql/Config.in b/package/postgresql/Config.in
index 3ef5e6c..519b2a1 100644
--- a/package/postgresql/Config.in
+++ b/package/postgresql/Config.in
@@ -1,9 +1,5 @@
config BR2_PACKAGE_POSTGRESQL
bool "postgresql"
- # PostgreSQL does not build against uClibc with locales
- # enabled, due to an uClibc bug, see
- # http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html.
- depends on BR2_TOOLCHAIN_USES_GLIBC
help
PostgreSQL is a powerful, open source object-relational
database system.
@@ -16,6 +12,3 @@ config BR2_PACKAGE_POSTGRESQL
archives with pg_dump and pg_restore.
http://www.postgresql.org
-
-comment "postgresql needs a toolchain w/ glibc"
- depends on !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 7dfef06..03154af 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -13,6 +13,14 @@ POSTGRESQL_LICENSE_FILES = COPYRIGHT
POSTGRESQL_INSTALL_STAGING = YES
POSTGRESQL_CONFIG_SCRIPTS = pg_config
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+# PostgreSQL does not build against uClibc with locales
+# enabled, due to an uClibc bug, see
+# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html
+# so overwrite automatic detection and disable locale support
+POSTGRESQL_CONF_ENV += pgac_cv_type_locale_t=no
+endif
+
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
POSTGRESQL_CONF_OPTS += --disable-thread-safety
endif
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-10 19:59 [Buildroot] [PATCH v3 1/8] postgresql: enable uclibc build Peter Seiderer
@ 2015-03-10 19:59 ` Peter Seiderer
2015-03-15 18:47 ` Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Peter Seiderer @ 2015-03-10 19:59 UTC (permalink / raw)
To: buildroot
- overwrite platform support with linux template
- disable spinlock support
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 --> v3:
- no changes
---
package/postgresql/postgresql.mk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 7ebf795..76b19d5 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -13,6 +13,11 @@ POSTGRESQL_LICENSE_FILES = COPYRIGHT
POSTGRESQL_INSTALL_STAGING = YES
POSTGRESQL_CONFIG_SCRIPTS = pg_config
+# unsupported platform, overwrite manually
+ifeq ($(BR2_bfin),y)
+POSTGRESQL_CONF_OPTS += --with-template=linux
+endif
+
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# overwrite IPV6 detection
ifeq ($(BR2_INET_IPV6),y)
@@ -31,7 +36,7 @@ ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
POSTGRESQL_CONF_OPTS += --disable-thread-safety
endif
-ifeq ($(BR2_microblazeel)$(BR2_microblazebe)$(BR2_nios2),y)
+ifeq ($(BR2_bfin)$(BR2_microblazebe)$(BR2_microblazeel)$(BR2_nios2),y)
POSTGRESQL_CONF_OPTS += --disable-spinlocks
endif
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-10 19:59 ` [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
@ 2015-03-15 18:47 ` Thomas Petazzoni
2015-03-16 21:07 ` Thomas Petazzoni
2015-03-16 22:07 ` Thomas Petazzoni
2 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-15 18:47 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 10 Mar 2015 20:59:39 +0100, Peter Seiderer wrote:
> +# unsupported platform, overwrite manually
> +ifeq ($(BR2_bfin),y)
> +POSTGRESQL_CONF_OPTS += --with-template=linux
> +endif
Do we really need to make this conditional? I believe
--with-template=linux is fine in all cases since Buildroot only targets
Linux.
So what about having --with-template=linux unconditionally in
POSTGRESQL_CONF_OPTS instead?
If that's OK for you, I can adjust this when applying.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-10 19:59 ` [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
2015-03-15 18:47 ` Thomas Petazzoni
@ 2015-03-16 21:07 ` Thomas Petazzoni
2015-03-16 22:07 ` Thomas Petazzoni
2 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-16 21:07 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 10 Mar 2015 20:59:39 +0100, Peter Seiderer wrote:
> - overwrite platform support with linux template
> - disable spinlock support
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Applied, after making --with-template=linux used unconditionally, as we
discussed.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile
2015-03-10 19:59 ` [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
2015-03-15 18:47 ` Thomas Petazzoni
2015-03-16 21:07 ` Thomas Petazzoni
@ 2015-03-16 22:07 ` Thomas Petazzoni
2 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-03-16 22:07 UTC (permalink / raw)
To: buildroot
Dear Peter Seiderer,
On Tue, 10 Mar 2015 20:59:39 +0100, Peter Seiderer wrote:
> - overwrite platform support with linux template
> - disable spinlock support
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
postgresql uses fork(), which is not available on Blackfin:
http://autobuild.buildroot.org/results/c9c/c9c93156fe64e89f35627aa592c47d8c5181ed7d/build-end.log.
So what was the point of enabling postgresql on Blackfin ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-17 21:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 19:40 [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
2015-03-16 20:24 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2015-03-17 20:45 Peter Seiderer
2015-03-17 21:54 ` Thomas Petazzoni
2015-03-17 20:26 Peter Seiderer
2015-03-17 20:29 ` Thomas Petazzoni
2015-03-17 19:52 Peter Seiderer
2015-03-17 19:59 ` Thomas Petazzoni
2015-03-10 19:59 [Buildroot] [PATCH v3 1/8] postgresql: enable uclibc build Peter Seiderer
2015-03-10 19:59 ` [Buildroot] [PATCH v3 3/8] postgresql: enable bfin compile Peter Seiderer
2015-03-15 18:47 ` Thomas Petazzoni
2015-03-16 21:07 ` Thomas Petazzoni
2015-03-16 22:07 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox