Skip to contentSkip to conversation

package: add the poco C++ libraries collection

PATCH Superseded Baruch Siach 2 participants 8 messages Aug 31, 2011 – Oct 2, 2011

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Add the C++ Portable Components libraries.

The Data/ODBC components is disabled because its dependency (unixODBC) is not in Buildroot.

The Data/MySQL component is build tested only. It probably requires an additional RPATH to actually run, because libmysqlclient resides in a non-standard location under /usr/lib/mysql.

---

Changes from v1:
Rebase on version 2011.08
Update to version 1.4.2
Fix the changelog text

 package/Config.in                                  |    1 +
 package/poco/Config.in                             |   56 +++++++++++++
 .../poco/poco-1.4.2-add-cross-build-config.patch   |   82 ++++++++++++++++++++
 .../poco/poco-1.4.2-add-staging-search-path.patch  |   22 +++++
 .../poco/poco-1.4.2-dont-build-debug-libs.patch    |   19 +++++
 package/poco/poco.mk                               |   52 ++++++++++++
 6 files changed, 232 insertions(+), 0 deletions(-)
 create mode 100644 package/poco/Config.in
 create mode 100644 package/poco/poco-1.4.2-add-cross-build-config.patch
 create mode 100644 package/poco/poco-1.4.2-add-staging-search-path.patch
 create mode 100644 package/poco/poco-1.4.2-dont-build-debug-libs.patch
 create mode 100644 package/poco/poco.mk
package/Config.in +1 -0
index 7112e05..7f709ca 100644
@@ -347,6 +347,7 @@ source "package/libnspr/Config.in"
 source "package/liboil/Config.in"
 source "package/libsigc/Config.in"
 source "package/orc/Config.in"
+source "package/poco/Config.in"
 source "package/startup-notification/Config.in"
 endmenu
 
package/poco/Config.in new file +56 -0

56 lines not on this page · raw message

package/poco/poco-1.4.2-add-cross-build-config.patch new file +82 -0

82 lines not on this page · raw message

package/poco/poco-1.4.2-add-staging-search-path.patch new file +22 -0
new file mode 100644
index 0000000..18ee076
@@ -0,0 +1,22 @@
+From: Baruch Siach <[email protected]>
+Subject: [PATCH] poco: add the staging path to search path
+
+Add the mysql headers and client libraries to the search path of the
+preprocessor and the linker. The $MYSQL_LIBDIR variable must be set from the
+make command line.
+
+Signed-off-by: Baruch Siach <[email protected]>
+--- 
+--- poco-1.4.1p1-all-dist/Data/MySQL/Makefile	2011-02-09 11:13:00.000000000 +0200
++++ poco-1.4.1p1-all/Data/MySQL/Makefile	2011-08-07 09:03:37.106161274 +0300
+@@ -8,8 +8,8 @@
+ 
+ include $(POCO_BASE)/build/rules/global
+ 
+-SYSLIBS += -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/mysql/lib/mysql -L/usr/local/mysql/lib -lmysqlclient
+-INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql -I/usr/mysql/include/mysql -I/usr/local/mysql/include
++SYSLIBS += -L$(MYSQL_LIBDIR) -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/mysql/lib/mysql -L/usr/local/mysql/lib -lmysqlclient
++INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql -I/usr/mysql/include/mysql -I/usr/local/mysql/include -I=/mysql
+ SYSFLAGS += -DTHREADSAFE -DNO_TCL
+ 
+ objects = Binder Extractor SessionImpl Connector \
package/poco/poco-1.4.2-dont-build-debug-libs.patch new file +19 -0
new file mode 100644
index 0000000..7480963
@@ -0,0 +1,19 @@
+From: Baruch Siach <[email protected]>
+Subject: [PATCH] poco: don't build debug libraries
+
+Remove the debug libraries build dependency from the default target.
+
+Signed-off-by: Baruch Siach <[email protected]>
+---
+
+--- poco-1.4.1p1-dist/build/rules/compile	2011-02-09 11:12:24.000000000 +0200
++++ poco-1.4.1p1/build/rules/compile	2011-08-03 07:51:42.946044176 +0300
+@@ -14,7 +14,7 @@
+ 
+ all: $(DEFAULT_TARGET)
+ all_static: static_debug static_release
+-all_shared: shared_debug shared_release
++all_shared: shared_release
+ all_debug: static_debug shared_debug
+ all_release: static_release shared_release
+ 
package/poco/poco.mk new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#1 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Baruch> Add the C++ Portable Components libraries.

Baruch> The Data/ODBC components is disabled because its dependency Baruch> (unixODBC) is not in Buildroot.

Baruch> The Data/MySQL component is build tested only. It probably requires an Baruch> additional RPATH to actually run, because libmysqlclient resides in a Baruch> non-standard location under /usr/lib/mysql.

Thanks, a few comments:

Baruch> diff --git a/package/poco/Config.in b/package/poco/Config.in Baruch> new file mode 100644
Baruch> index 0000000..9de5328
Baruch> --- /dev/null
Baruch> +++ b/package/poco/Config.in
Baruch> @@ -0,0 +1,56 @@
Baruch> +config BR2_PACKAGE_POCO
Baruch> + bool "poco"
Baruch> + select BR2_PACKAGE_ZLIB
Baruch> + select BR2_PACKAGE_PCRE
Baruch> + depends on BR2_LARGEFILE

That's not enough. You (obviously) need C++ support, and WCHAR also seems to be needed for the unicode stuff - E.G.:

select BR2_INSTALL_LIBSTDCPP
select BR2_USE_WCHAR

Baruch> + help
Baruch> + The C++ Portable Components Libraries
Baruch> +
Baruch> + http://pocoproject.org
Baruch> +
Baruch> +comment "poco requires a toolchain with LARGEFILE support"
Baruch> + depends on !BR2_LARGEFILE

This should be extended to also cover C++ and WCHAR. This comment should move down to the bottom of the file so the remaining sub options gets properly indented.

With those changes it builds until it gets to the FPU stuff, which breaks on (atleast) ARM:

.. -c src/FPEnvironment.cpp -o /home/peko/source/buildroot/output/build/poco-1.4.2/Foundation/obj/Linux/arm/release_shared/FPEnvironment.o In file included from src/FPEnvironment_C99.cpp:37,
from src/FPEnvironment.cpp:48:
include/Poco/FPEnvironment_C99.h:56: error: 'FE_DOWNWARD' was not declared in this scope include/Poco/FPEnvironment_C99.h:57: error: 'FE_UPWARD' was not declared in this scope

The FE_* macros afaik only supposed to be defined if the arch can efficiently handle it, which isn't the case for ARM. fenv.h the supporting functions are only enabled on uClibc if UCLIBC_HAS_FENV is enabled in the .config, which it isn't for our uClibc defconfigs.

I'm not exactly sure how to fix this. Any ideas?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Hi Peter,

Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Baruch> Add the C++ Portable Components libraries.

Baruch> The Data/ODBC components is disabled because its dependency Baruch> (unixODBC) is not in Buildroot.

Baruch> The Data/MySQL component is build tested only. It probably requires an Baruch> additional RPATH to actually run, because libmysqlclient resides in a Baruch> non-standard location under /usr/lib/mysql.

Thanks, a few comments:

[snip]

Quoted 11 lines

With those changes it builds until it gets to the FPU stuff, which breaks on (atleast) ARM:

.. -c src/FPEnvironment.cpp -o /home/peko/source/buildroot/output/build/poco-1.4.2/Foundation/obj/Linux/arm/release_shared/FPEnvironment.o In file included from src/FPEnvironment_C99.cpp:37,
from src/FPEnvironment.cpp:48:
include/Poco/FPEnvironment_C99.h:56: error: 'FE_DOWNWARD' was not declared in this scope include/Poco/FPEnvironment_C99.h:57: error: 'FE_UPWARD' was not declared in this scope

The FE_* macros afaik only supposed to be defined if the arch can efficiently handle it, which isn't the case for ARM.

It builds here for ARM (BR2_ARM_TYPE="ARM926T") using the CodeSourcery toolchain (with a little toolchain support fix I'll send shortly).

Quoted 5 lines

fenv.h the
supporting functions are only enabled on uClibc if UCLIBC_HAS_FENV is enabled in the .config, which it isn't for our uClibc defconfigs.

I'm not exactly sure how to fix this. Any ideas?

Is there a way to depend on UCLIBC_HAS_FENV?
Is depending on glibc an option?

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The FE_* macros afaik only supposed to be defined if the arch can efficiently handle it, which isn't the case for ARM.

Baruch> It builds here for ARM (BR2_ARM_TYPE="ARM926T") using the CodeSourcery Baruch> toolchain (with a little toolchain support fix I'll send shortly).

Indeed. The codesourcery toolchain presumably uses glibc. The problem is with uClibc - But I don't want to add a package which doesn't work with the internal toolchain.

Quoted 5 lines
Quoted 5 lines

fenv.h the
supporting functions are only enabled on uClibc if UCLIBC_HAS_FENV is enabled in the .config, which it isn't for our uClibc defconfigs.

I'm not exactly sure how to fix this. Any ideas?

Baruch> Is there a way to depend on UCLIBC_HAS_FENV? Baruch> Is depending on glibc an option?

I would rather see a patch which uses the dummy fenv implementation on uClibc without UCLIBC_HAS_FENV.

You can detect that using something like

#include <fetures.h>
#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_FENV__) ..

But I haven't looked at the poco build system to see how easy that would be.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Hi Peter,

Quoted 24 lines · Peter Korsgaard
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The FE_* macros afaik only supposed to be defined if the arch can efficiently handle it, which isn't the case for ARM.

Baruch> It builds here for ARM (BR2_ARM_TYPE="ARM926T") using the CodeSourcery Baruch> toolchain (with a little toolchain support fix I'll send shortly).

Indeed. The codesourcery toolchain presumably uses glibc. The problem is with uClibc - But I don't want to add a package which doesn't work with the internal toolchain.

Quoted 5 lines
Quoted 5 lines

fenv.h the
supporting functions are only enabled on uClibc if UCLIBC_HAS_FENV is enabled in the .config, which it isn't for our uClibc defconfigs.

I'm not exactly sure how to fix this. Any ideas?

Baruch> Is there a way to depend on UCLIBC_HAS_FENV? Baruch> Is depending on glibc an option?

I would rather see a patch which uses the dummy fenv implementation on uClibc without UCLIBC_HAS_FENV.

Quoted 8 lines

You can detect that using something like

#include <fetures.h>
#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_FENV__) ..

But I haven't looked at the poco build system to see how easy that would be.

Well, it seems that the Poco configure script can do just that when told to. The --no-fpenvironment option replaces FPEnvironment_C99.h with FPEnvironment_DUMMY.h. You can even pass --no-wstring to disable std::wstring support. So the question is, is there a way to detect the 'defined(__UCLIBC__) && !defined (__UCLIBC_HAS_FENV__)' condition at configuration time? This seems to be much cleaner than patching the code for build time detection.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#5 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Hi,

Baruch> Well, it seems that the Poco configure script can do just that Baruch> when told to. The --no-fpenvironment option replaces Baruch> FPEnvironment_C99.h with FPEnvironment_DUMMY.h. You can even Baruch> pass --no-wstring to disable std::wstring support. So the Baruch> question is, is there a way to detect the 'defined(__UCLIBC__) Baruch> && !defined (__UCLIBC_HAS_FENV__)' condition at configuration Baruch> time? This seems to be much cleaner than patching the code for Baruch> build time detection.

Ahh ok, good. As far as I can see, the uClibc fenv support is not really extensive enough to ever work, so simply detecting uClibc should be enough. Remember we can use uClibc through internal/external/crosstool-ng toolchains, so you'll need to do something like

ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y) POCO_CONF_OPT += --no-fpenvironment
endif

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Hi Peter,

Quoted 16 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Baruch> Well, it seems that the Poco configure script can do just that Baruch> when told to. The --no-fpenvironment option replaces Baruch> FPEnvironment_C99.h with FPEnvironment_DUMMY.h. You can even Baruch> pass --no-wstring to disable std::wstring support. So the Baruch> question is, is there a way to detect the 'defined(__UCLIBC__) Baruch> && !defined (__UCLIBC_HAS_FENV__)' condition at configuration Baruch> time? This seems to be much cleaner than patching the code for Baruch> build time detection.

Ahh ok, good. As far as I can see, the uClibc fenv support is not really extensive enough to ever work, so simply detecting uClibc should be enough. Remember we can use uClibc through internal/external/crosstool-ng toolchains, so you'll need to do something like

Quoted 3 lines

ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y) POCO_CONF_OPT += --no-fpenvironment
endif

Can't we just use $(LIBC) that is set in package/Makefile.in? Hence:

ifeq ($(LIBC),uclibc)
POCO_CONF_OPT += --no-fpenvironment
endif

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#7 lore raw

PATCH v2 1/1 package: add the poco C++ libraries collection

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y) POCO_CONF_OPT += --no-fpenvironment
endif

Baruch> Can't we just use $(LIBC) that is set in package/Makefile.in? Hence:

Baruch> ifeq ($(LIBC),uclibc)
Baruch> POCO_CONF_OPT += --no-fpenvironment
Baruch> endif

Yes, that's fine as well - That one handles the 3 variants.

Signature · 1 line
Bye, Peter Korsgaard