Skip to contentSkip to conversation

omniorb: new package

PATCH Superseded Matt Weber 3 participants 6 messages Sep 5, 2013 – Sep 11, 2013 1 message not in the archive

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 omniorb: new package

Target packages -> Libraries -> Networking -> OmniOrb

---
 package/Config.in          |    1 +
 package/omniorb/Config.in  |   16 ++++++++++
 package/omniorb/omniorb.mk |   68 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+), 0 deletions(-)
 create mode 100644 package/omniorb/Config.in
 create mode 100644 package/omniorb/omniorb.mk
package/Config.in +1 -0
index a94cb62..b4cc869 100644
@@ -600,6 +600,7 @@ source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
 source "package/libwebsockets/Config.in"
 source "package/nss-mdns/Config.in"
+source "package/omniorb/Config.in"
 source "package/openpgm/Config.in"
 source "package/ortp/Config.in"
 source "package/slirp/Config.in"
package/omniorb/Config.in new file +16 -0
new file mode 100644
index 0000000..4c8c3fc
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_OMNIORB
+	bool "omniorb"
+	help
+          omniORB is a robust high performance CORBA ORB for C++ and Python. 
+          omniORB is largely CORBA 2.6 compliant. omniORB is one of only three ORBs 
+          to have been awarded the Open Group's Open Brand for CORBA. This means that 
+          omniORB has been tested and certified CORBA compliant, to version 2.1 of the 
+          CORBA specification. You can find out more about the branding program at 
+          the Open Group.
+
+config BR2_OMNIORB_EXTRA_CONFIG_OPTIONS
+	string "Additional omniorb configuration options"
+	depends on BR2_PACKAGE_OMNIORB
+	default ""
+	help
+	  Any additional configure options you may want to include.
package/omniorb/omniorb.mk new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 omniorb: new package

Dear Matt Weber,

package/omniorb/Config.in line 4

Quoted 4 lines · Matt Weber
package/omniorb/Config.in new file +4 -0
+config BR2_PACKAGE_OMNIORB
+	bool "omniorb"
+	help
+          omniORB is a robust high performance CORBA ORB for C++ and Python. 

Indentation of those lines should be one tab + two spaces, not two tabs.

package/omniorb/Config.in line 9

Quoted 5 lines
package/omniorb/Config.in new file +5 -0
+          omniORB is largely CORBA 2.6 compliant. omniORB is one of only three ORBs 
+          to have been awarded the Open Group's Open Brand for CORBA. This means that 
+          omniORB has been tested and certified CORBA compliant, to version 2.1 of the 
+          CORBA specification. You can find out more about the branding program at 
+          the Open Group.

These lines looks slightly too long. They should fit in 72 columns if I remember correctly.

package/omniorb/Config.in line 16

Quoted 6 lines
package/omniorb/Config.in new file +6 -0
+config BR2_OMNIORB_EXTRA_CONFIG_OPTIONS
+	string "Additional omniorb configuration options"
+	depends on BR2_PACKAGE_OMNIORB
+	default ""
+	help
+	  Any additional configure options you may want to include.

We generally don't offer such 'free' options for packages, so I'd prefer not having it, unless there are good reasons for it.

Quoted 6 lines
package/omniorb/omniorb.mk new file +0 -0
new file mode 100644
index 0000000..ed2a7e7

package/omniorb/omniorb.mk line 8

Quoted 8 lines
package/omniorb/omniorb.mk new file +8 -0
@@ -0,0 +1,68 @@
+################################################################################
+#
+# omniorb 
+#
+################################################################################
+
+OMNIORB_VERSION = 4.1.6
+OMNIORB_SITE = http://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-${OMNIORB_VERSION}

Please use $(...) instead of ${...} everywhere.

package/omniorb/omniorb.mk line 11

Quoted 3 lines
package/omniorb/omniorb.mk new file +3 -0
+OMNIORB_SOURCE = omniORB-${OMNIORB_VERSION}.tar.bz2
+OMNIORB_INSTALL_STAGING = YES
+OMNIORB_INSTALL_TARGET = YES

This last line is not needed, that's the default.

package/omniorb/omniorb.mk line 12

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+OMNIORB_DEPENDENCIES = python 

Then this package either needs a depends on BR2_PACKAGE_PYTHON or a select BR2_PACKAGE_PYTHON. What is omniORB exactly? Is it just a set of Python modules? Something more than that?

package/omniorb/omniorb.mk line 13

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+OMNIORB_LICENSE = GPL2 LGPLv2.1

Can you check it's not GPLv2+ and LGPLv2.1+ by looking at the copyright headers in the source code.

package/omniorb/omniorb.mk line 18

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+OMNIORB_LICENSE_FILES = COPYING COPYING.LIB
+
+OMNIORB_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_OMNIORB_EXTRA_CONFIG_OPTIONS))
+
+OMNIORB_CONF_OPT = $(OMNIORB_EXTRA_CONFIG_OPTIONS)

As per the above comment, these two lines should probably be removed.

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+
+# The following is a space-separated list of files that need to have directory fixups
+OMNIORB_FIXUP_FILES = ${STAGING_DIR}/usr/bin/omniidl
+
+define OMNIORB_INSTALL_STAGING_CMDS

package/omniorb/omniorb.mk line 33

Quoted 10 lines
package/omniorb/omniorb.mk new file +10 -0
+	echo "Installing to staging dir: $(STAGING_DIR)"
+	$(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_INSTALL_STAGING_OPT) -C $($(PKG)_SRCDIR)
+	for i in $(OMNIORB_FIXUP_FILES); do \
+	$(SED) "s:$(HOST_DIR)/usr:/usr:g" $$i; \
+	done
+endef
+
+define OMNIORB_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_INSTALL_TARGET_OPT) -C $($(PKG)_SRCDIR)
+endef

For autotools packages, please don't overload the <pkg>_INSTALL_STAGING_CMDS and <pkg>_INSTALL_TARGET_COMMANDS.

If you need to do some tweaking after the staging installation, use a POST_INSTALL_STAGING_HOOKS (see the Buildroot manual for details).

package/omniorb/omniorb.mk line 36

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+# OMNIORB has some host tools integrated into it's build.  We first build those, then use
+# the host IDL2CPP/depend tools to generate code for the target compilation

Hum... I believe a post configure hook might be more appropriate here. Something like:

define OMNIORB_BUILD_HOST_TOOLS

	$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omkdepend
	cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
	$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omniidl/cxx/cccp
	$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/tool/omniidl/cxx

endef

Or, the alternative is to build a complete host variant of omniorb.

Quoted 19 lines
package/omniorb/omniorb.mk new file +19 -0
+define OMNIORB_BUILD_CMDS
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omkdepend
+	cp $($(PKG)_SRCDIR)src/tool/omkdepend/omkdepend $($(PKG)_SRCDIR)/bin
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omniidl/cxx/cccp
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omniidl/cxx
+	${TARGET_MAKE_ENV} ${MAKE} -C $($(PKG)_SRCDIR)
+endef
+
+define OMNIORB_CLEAN_CMDS
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omkdepend clean
+	$(RM) $($(PKG)_SRCDIR)/bin/omkdepend
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omniidl/cxx/cccp clean
+	${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($(PKG)_SRCDIR)src/tool/omniidl/cxx clean
+	${TARGET_MAKE_ENV} ${MAKE} -C $($(PKG)_SRCDIR) clean
+endef
+
+define OMNIORB_UNINSTALL_STAGING_CMDS
+	$(RM) -r ${STAGING_DIR}/usr/include/omniORB4 ${STAGING_DIR}/usr/include/omnithread
+	$(RM) ${STAGING_DIR}/usr/include/omniconfig.h ${STAGING_DIR}/usr/include/omnithread.h

package/omniorb/omniorb.mk line 65

Quoted 10 lines
package/omniorb/omniorb.mk new file +10 -0
+	$(RM) ${STAGING_DIR}/usr/lib/libomni*
+	$(RM) ${STAGING_DIR}/usr/bin/omni* ${STAGING_DIR}/usr/bin/omkdepend
+endef
+
+define OMNIORB_UNINSTALL_TARGET_CMDS
+	$(RM) -r ${TARGET_DIR}/usr/include/omniORB4 ${TARGET_DIR}/usr/include/omnithread
+	$(RM) ${TARGET_DIR}/usr/include/omniconfig.h ${TARGET_DIR}/usr/include/omnithread.h
+	$(RM) ${TARGET_DIR}/usr/lib/libomni*
+	$(RM) ${TARGET_DIR}/usr/bin/omni* ${TARGET_DIR}/usr/bin/omkdepend
+endef

We generally don't bother implementing uninstall and clean commands.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

A message that is not in the archive (sent off-list or not yet received): OF9C2B3BB5.42526667-ON86257BDE.00063112-86257BDE.004AF018@LocalDomain

#3 lore raw

PATCH 1/1 omniorb: new package

Dear Thomas Petazzoni,

Thank you for the feedback, I've included some comments below. Let me know what you think.

Thomas Petazzoni <[email protected]> wrote on 09/05/2013 05:17:06 PM:

Quoted 22 lines

From: Thomas Petazzoni <[email protected]>
To: Matt Weber <[email protected]>
Cc: buildroot at busybox.net
Date: 09/05/2013 05:17 PM
Subject: Re: [Buildroot] [PATCH 1/1] omniorb: new package

Dear Matt Weber,

package/omniorb/Config.in

Quoted 4 lines · Matt Weber
package/omniorb/Config.in new file +4 -0
+config BR2_PACKAGE_OMNIORB
+   bool "omniorb"
+   help
+          omniORB is a robust high performance CORBA ORB for C++ 

and Python.

Indentation of those lines should be one tab + two spaces, not two tabs.

Quoted 1 line

+ omniORB is largely CORBA 2.6 compliant. omniORB is one

of only three ORBs

Quoted 1 line

+ to have been awarded the Open Group's Open Brand for

CORBA. This means that

Quoted 8 lines
Quoted 1 line

+ omniORB has been tested and certified CORBA compliant,

to version 2.1 of the

Quoted 1 line

+ CORBA specification. You can find out more about the

branding program at

Quoted 1 line

+ the Open Group.

These lines looks slightly too long. They should fit in 72 columns if I remember correctly.

Agree

Quoted 10 lines

package/omniorb/Config.in line 16

Quoted 7 lines
package/omniorb/Config.in new file +6 -0
+config BR2_OMNIORB_EXTRA_CONFIG_OPTIONS
+   string "Additional omniorb configuration options"
+   depends on BR2_PACKAGE_OMNIORB
+   default ""
+   help
+     Any additional configure options you may want to include.

We generally don't offer such 'free' options for packages, so I'd prefer not having it, unless there are good reasons for it.

At this time there is not, so I'll remove.

Quoted 9 lines

package/omniorb/omniorb.mk

Quoted 8 lines
package/omniorb/omniorb.mk new file +0 -0
new file mode 100644
index 0000000..ed2a7e7
@@ -0,0 +1,68 @@

+################################################################################

Quoted 5 lines

package/omniorb/omniorb.mk line 4

Quoted 4 lines
package/omniorb/omniorb.mk new file +3 -0
+#
+# omniorb 
+#

+################################################################################

Quoted 6 lines

package/omniorb/omniorb.mk

Quoted 3 lines
package/omniorb/omniorb.mk new file +3 -0
+
+OMNIORB_VERSION = 4.1.6
+OMNIORB_SITE = http://downloads.sourceforge.net/project/omniorb/

omniORB/omniORB-${OMNIORB_VERSION}

Please use $(...) instead of ${...} everywhere.

Agree

Quoted 6 lines

package/omniorb/omniorb.mk line 11

Quoted 4 lines
package/omniorb/omniorb.mk new file +3 -0
+OMNIORB_SOURCE = omniORB-${OMNIORB_VERSION}.tar.bz2
+OMNIORB_INSTALL_STAGING = YES
+OMNIORB_INSTALL_TARGET = YES

This last line is not needed, that's the default.

Agree

Quoted 7 lines

package/omniorb/omniorb.mk line 12

Quoted 2 lines
package/omniorb/omniorb.mk new file +1 -0
+OMNIORB_DEPENDENCIES = python 

Then this package either needs a depends on BR2_PACKAGE_PYTHON or a select BR2_PACKAGE_PYTHON. What is omniORB exactly? Is it just a set of Python modules? Something more than that?

I'll add a select of python to the Config.in. omniORB is a inter-process transport abstraction, similar to DBUS. We use both the C/C++ and python bindings to the object broker server it provides.

Quoted 5 lines

package/omniorb/omniorb.mk line 13

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+OMNIORB_LICENSE = GPL2 LGPLv2.1

Can you check it's not GPLv2+ and LGPLv2.1+ by looking at the copyright headers in the source code.

I checked the headers and they are 2+ and 2.1+. I'll update.

Quoted 9 lines

package/omniorb/omniorb.mk

Quoted 3 lines
package/omniorb/omniorb.mk new file +3 -0
+OMNIORB_LICENSE_FILES = COPYING COPYING.LIB
+
+OMNIORB_EXTRA_CONFIG_OPTIONS = $(call qstrip,$

(BR2_OMNIORB_EXTRA_CONFIG_OPTIONS))

package/omniorb/omniorb.mk line 16

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+
+OMNIORB_CONF_OPT = $(OMNIORB_EXTRA_CONFIG_OPTIONS)

As per the above comment, these two lines should probably be removed.

Removed.

Quoted 17 lines

package/omniorb/omniorb.mk line 18

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+
+# The following is a space-separated list of files that need to 

have directory fixups

package/omniorb/omniorb.mk

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+OMNIORB_FIXUP_FILES = ${STAGING_DIR}/usr/bin/omniidl
+
+define OMNIORB_INSTALL_STAGING_CMDS
+   echo "Installing to staging dir: $(STAGING_DIR)"
+   $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)

_INSTALL_STAGING_OPT) -C $($(PKG)_SRCDIR)

package/omniorb/omniorb.mk

Quoted 7 lines
package/omniorb/omniorb.mk new file +7 -0
+   for i in $(OMNIORB_FIXUP_FILES); do \
+   $(SED) "s:$(HOST_DIR)/usr:/usr:g" $$i; \
+   done
+endef
+
+define OMNIORB_INSTALL_TARGET_CMDS
+   $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)

_INSTALL_TARGET_OPT) -C $($(PKG)_SRCDIR)

Quoted 8 lines

package/omniorb/omniorb.mk line 31

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+endef

For autotools packages, please don't overload the <pkg>_INSTALL_STAGING_CMDS and <pkg>_INSTALL_TARGET_COMMANDS.

If you need to do some tweaking after the staging installation, use a POST_INSTALL_STAGING_HOOKS (see the Buildroot manual for details).

It doesn't look like I can use POST install hooks for a autotools package (I double checked in the pkg-autotools.mk). However I think I can remove the overload of the INSTALL_TARGET_COMMANDS as that's just duplicated of what the build already does.

Quoted 3 lines

package/omniorb/omniorb.mk line 32

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+# OMNIORB has some host tools integrated into it's build.  We 

first build those, then use

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+# the host IDL2CPP/depend tools to generate code for the target 

compilation

Quoted 6 lines

Hum... I believe a post configure hook might be more appropriate here. Something like:

define OMNIORB_BUILD_HOST_TOOLS
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C

$(@D)/src/tool/omkdepend

Quoted 7 lines
   cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
   $(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/

tool/omniidl/cxx/cccp
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/
tool/omniidl/cxx
endef

It doesn't look like there are POST conf hooks available for autotools package.

I should have added a better comment about this build step. The package has some complicated dependencies that require the tools folders to be built with the host(within the target build) and then when the complete target package build occurs it ignores the tool folder (since it's already built) and builds the rest of the source. However as part of that source build it uses the applications in the tools folder to generate C code from IDL (interface definition language) for the build.
I think I had two options to make this work...
1)Patch the source to allow a host build of the complete package to place the right executable(s) into the sysroot. Then patch the source differently for the target build to look in the sysroot instead of it's tool's folder for those applications.
2)Overload the build command and insert a host build step manually for just those tools applications before the overall target cross compile. I went with the option that didn't create additional patches to complicate if/when the version bumps.

Quoted 6 lines

Or, the alternative is to build a complete host variant of omniorb.

package/omniorb/omniorb.mk line 35

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+define OMNIORB_BUILD_CMDS
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omkdepend

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   cp $($(PKG)_SRCDIR)src/tool/omkdepend/omkdepend 

$($(PKG)_SRCDIR)/bin

Quoted 15 lines

package/omniorb/omniorb.mk line 37

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omniidl/cxx/cccp

package/omniorb/omniorb.mk line 38

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omniidl/cxx

package/omniorb/omniorb.mk

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+   ${TARGET_MAKE_ENV} ${MAKE} -C $($(PKG)_SRCDIR)
+endef
+
+define OMNIORB_CLEAN_CMDS
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omkdepend clean

package/omniorb/omniorb.mk line 45

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+   $(RM) $($(PKG)_SRCDIR)/bin/omkdepend
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omniidl/cxx/cccp clean

package/omniorb/omniorb.mk line 46

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   ${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C $($

(PKG)_SRCDIR)src/tool/omniidl/cxx clean

Quoted 10 lines

package/omniorb/omniorb.mk

Quoted 5 lines
package/omniorb/omniorb.mk new file +5 -0
+   ${TARGET_MAKE_ENV} ${MAKE} -C $($(PKG)_SRCDIR) clean
+endef
+
+define OMNIORB_UNINSTALL_STAGING_CMDS
+   $(RM) -r ${STAGING_DIR}/usr/include/omniORB4 ${STAGING_DIR}/

usr/include/omnithread

package/omniorb/omniorb.mk line 52

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   $(RM) ${STAGING_DIR}/usr/include/omniconfig.h ${STAGING_DIR}/

usr/include/omnithread.h

Quoted 2 lines
package/omniorb/omniorb.mk new file +2 -0
+   $(RM) ${STAGING_DIR}/usr/lib/libomni*
+   $(RM) ${STAGING_DIR}/usr/bin/omni* 

${STAGING_DIR}/usr/bin/omkdepend

Quoted 5 lines

package/omniorb/omniorb.mk

Quoted 4 lines
package/omniorb/omniorb.mk new file +4 -0
+endef
+
+define OMNIORB_UNINSTALL_TARGET_CMDS
+   $(RM) -r ${TARGET_DIR}/usr/include/omniORB4 ${TARGET_DIR}/usr/

include/omnithread

Quoted 7 lines

package/omniorb/omniorb.mk line 59

Quoted 1 line
package/omniorb/omniorb.mk new file +1 -0
+   $(RM) ${TARGET_DIR}/usr/include/omniconfig.h ${TARGET_DIR}/

usr/include/omnithread.h

package/omniorb/omniorb.mk line 65

Quoted 3 lines
package/omniorb/omniorb.mk new file +3 -0
+   $(RM) ${TARGET_DIR}/usr/lib/libomni*
+   $(RM) ${TARGET_DIR}/usr/bin/omni* ${TARGET_DIR}/usr/bin/omkdepend
+endef

We generally don't bother implementing uninstall and clean commands.

I'll go ahead and remove these.

Quoted 9 lines

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Thanks!

Matthew L Weber / Sr Software Engineer / Platform SW MS 137-157, 855 35th Street NE, Cedar Rapids, IA, 52498, USA
Phone: 319-295-7349 / VPN: 295-7349
mlweber1 at rockwellcollins.com www.rockwellcollins.com

CONFIDENTIALITY NOTICE: This email message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by email and destroy all copies of the original message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130906/61d721a3/attachment.html>

#4 lore raw

PATCH 1/1 omniorb: new package

Quoted 18 lines · On 06/09/13 16:08, mlweber1 at rockwellcollins.com wrote:

Dear Thomas Petazzoni,

Thank you for the feedback, I've included some comments below. Let me know what you think.

Thomas Petazzoni <[email protected]> wrote on 09/05/2013 05:17:06 PM:

Quoted 10 lines

From: Thomas Petazzoni <[email protected]>
To: Matt Weber <[email protected]>
Cc: buildroot at busybox.net
Date: 09/05/2013 05:17 PM
Subject: Re: [Buildroot] [PATCH 1/1] omniorb: new package

Dear Matt Weber,

On Thu, 5 Sep 2013 17:03:04 -0500, Matt Weber wrote:

[snip]

Quoted 9 lines
Quoted 6 lines
Quoted 1 line

+OMNIORB_DEPENDENCIES = python

Then this package either needs a depends on BR2_PACKAGE_PYTHON or a select BR2_PACKAGE_PYTHON. What is omniORB exactly? Is it just a set of Python modules? Something more than that?

I'll add a select of python to the Config.in. omniORB is a inter-process transport abstraction, similar to DBUS. We use both the C/C++ and python bindings to the object broker server it provides.

I guess the python bindings are optional, right? Then you shouldn't
select python in Config.in. Instead, you should make the dependency in the .mk file optional. We also try to explicitly set the configure options. E.g.

ifeq ($(BR2_PACKAGE_PYTHON),y)
OMNIORB_DEPENDENCIES += python
OMNIORB_CONF_OPT += --enable-python-bindings
else
OMNIORB_CONF_OPT += --disable-python-bindings
endif

(I just inventend the --enable option, of course).

[snip]

Quoted 5 lines
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+define OMNIORB_INSTALL_TARGET_CMDS
+   $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)

_INSTALL_TARGET_OPT) -C $($(PKG)_SRCDIR)

Quoted 1 line

+endef

Quoted 8 lines
Quoted 6 lines

For autotools packages, please don't overload the <pkg>_INSTALL_STAGING_CMDS and <pkg>_INSTALL_TARGET_COMMANDS.

If you need to do some tweaking after the staging installation, use a POST_INSTALL_STAGING_HOOKS (see the Buildroot manual for details).

It doesn't look like I can use POST install hooks for a autotools package (I double checked in the pkg-autotools.mk).

Yes you can. If you look at the top of pkg-generic.mk, you'll see that
the POST_ hooks are called whatever the package build system is.

Quoted 22 lines

However I think I can remove
the overload of the INSTALL_TARGET_COMMANDS as that's just duplicated of what the build already does.

Quoted 3 lines
Quoted 1 line

+# OMNIORB has some host tools integrated into it's build. We

first build those, then use

Quoted 1 line

+# the host IDL2CPP/depend tools to generate code for the target

compilation

Quoted 6 lines

Hum... I believe a post configure hook might be more appropriate here. Something like:

define OMNIORB_BUILD_HOST_TOOLS
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C

$(@D)/src/tool/omkdepend

Quoted 7 lines
   cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
   $(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/

tool/omniidl/cxx/cccp
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/
tool/omniidl/cxx
endef

Quoted 2 lines

It doesn't look like there are POST conf hooks available for autotools package.

Same here.

Quoted 7 lines

I should have added a better comment about this build step. The package has some complicated dependencies that require the tools folders to be built with the host(within the target build) and then when the complete target package build occurs it ignores the tool folder (since it's already built) and builds the rest of the source. However as part of that source build it uses the applications in the tools folder to generate C code from IDL (interface definition language) for the build.

Does it actually require them to be installed? Generally, packages are
smart enough to use something like $(TOPDIR)/tools/omkdepend/omkdepend instead of relying on omkdepend to be in the path...

Quoted 3 lines

I think I had two options to make this work...
1)Patch the source to allow a host build of the complete package to place the right executable(s) into the sysroot.

That usually doesn't require patching the source. Just adding
$(eval $(host-autotools-package)) is probably enough. And of course you should add a dependency on host-omniorb.

Quoted 3 lines

Then patch the source
differently for the target build to look in the sysroot instead of it's tool's folder for those applications.

If it looks in the path, then no patching is necessary. You can

If it doesn't look in the path, then actually autotools has the
infrastructure to build host utilities during the cross-build. That is why CC_FOR_BUILD is passed to configure. So it would be sufficient to patch the Makefile.am in the tools directory to use CC_FOR_BUILD (and CPPFLAGS_FOR_BUILD and CFLAGS_FOR_BUILD). If you want an example, look at yasm or nettle.

If you patch the build system this way, the patch can be upstreamed and
we don't have to carry it for eternity.

Regards,
Arnout

Quoted 6 lines

2)Overload the build command and insert a host build step manually for just those tools applications before the overall target cross compile. I went with the option that didn't create additional patches to complicate if/when the version bumps.

Quoted 1 line

Or, the alternative is to build a complete host variant of omniorb.

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

PATCH 1/1 omniorb: new package

Arnout Vandecappelle <[email protected]> wrote on 09/09/2013 01:12:52 AM:

Quoted 21 lines

From: Arnout Vandecappelle <[email protected]>
To: mlweber1 at rockwellcollins.com
Cc: thomas.petazzoni at free-electrons.com, buildroot at busybox.net
Date: 09/09/2013 01:45 AM
Subject: Re: [Buildroot] [PATCH 1/1] omniorb: new package

Quoted 14 lines · On 06/09/13 16:08, mlweber1 at rockwellcollins.com wrote:

Dear Thomas Petazzoni,

Thank you for the feedback, I've included some comments below. Let me know what you think.

Thomas Petazzoni <[email protected]> wrote on 09/05/2013 05:17:06 PM:

Quoted 6 lines

From: Thomas Petazzoni <[email protected]>
To: Matt Weber <[email protected]>
Cc: buildroot at busybox.net
Date: 09/05/2013 05:17 PM
Subject: Re: [Buildroot] [PATCH 1/1] omniorb: new package

Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

Dear Matt Weber,

On Thu, 5 Sep 2013 17:03:04 -0500, Matt Weber wrote:

[snip]

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

+OMNIORB_DEPENDENCIES = python

Then this package either needs a depends on BR2_PACKAGE_PYTHON or a select BR2_PACKAGE_PYTHON. What is omniORB exactly? Is it just a

set of

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

Python modules? Something more than that?

I'll add a select of python to the Config.in. omniORB is a

inter-process

Quoted 1 line
Quoted 1 line

transport abstraction, similar to DBUS. We use both the C/C++ and

python

Quoted 7 lines
Quoted 1 line

bindings to the object broker server it provides.

I guess the python bindings are optional, right? Then you shouldn't
select python in Config.in. Instead, you should make the dependency in the .mk file optional. We also try to explicitly set the configure options. E.g.

Quoted 9 lines

ifeq ($(BR2_PACKAGE_PYTHON),y)
OMNIORB_DEPENDENCIES += python
OMNIORB_CONF_OPT += --enable-python-bindings
else
OMNIORB_CONF_OPT += --disable-python-bindings
endif

(I just inventend the --enable option, of course).

Agree

Quoted 10 lines

[snip]

Quoted 9 lines
Quoted 9 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+define OMNIORB_INSTALL_TARGET_CMDS
+   $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)

_INSTALL_TARGET_OPT) -C $($(PKG)_SRCDIR)

Quoted 1 line

+endef

For autotools packages, please don't overload the <pkg>_INSTALL_STAGING_CMDS and <pkg>_INSTALL_TARGET_COMMANDS.

If you need to do some tweaking after the staging installation, use

a

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

POST_INSTALL_STAGING_HOOKS (see the Buildroot manual for details).

It doesn't look like I can use POST install hooks for a autotools

package

Quoted 6 lines
Quoted 1 line

(I double checked in the pkg-autotools.mk).

Yes you can. If you look at the top of pkg-generic.mk, you'll see that

the POST_ hooks are called whatever the package build system is.

Ok, I'll take a look, I wonder if I possibly had a typo in my naming and they weren't getting called.

Quoted 3 lines
Quoted 3 lines

However I think I can remove
the overload of the INSTALL_TARGET_COMMANDS as that's just duplicated

of

Quoted 8 lines
Quoted 8 lines

what the build already does.

Quoted 3 lines
Quoted 1 line

+# OMNIORB has some host tools integrated into it's build. We

first build those, then use

Quoted 1 line

+# the host IDL2CPP/depend tools to generate code for the target

compilation

Quoted 2 lines

Hum... I believe a post configure hook might be more appropriate

here.

Quoted 12 lines
Quoted 12 lines
Quoted 4 lines

Something like:

define OMNIORB_BUILD_HOST_TOOLS
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C

$(@D)/src/tool/omkdepend

Quoted 7 lines
   cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/
   $(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/

tool/omniidl/cxx/cccp
$(HOST_MAKE_ENV) $(HOST) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/
tool/omniidl/cxx
endef

Quoted 5 lines
Quoted 2 lines

It doesn't look like there are POST conf hooks available for autotools package.

Same here.

Ok

Quoted 2 lines
Quoted 2 lines

I should have added a better comment about this build step. The

package

Quoted 2 lines
Quoted 2 lines

has some complicated dependencies that require the tools folders to be built with the host(within the target build) and then when the

complete

Quoted 4 lines
Quoted 4 lines

target package build occurs it ignores the tool folder (since it's already built) and builds the rest of the source. However as part of that source build it uses the applications in the tools folder to generate C code from IDL (interface definition language) for the

build.

Quoted 6 lines

Does it actually require them to be installed? Generally, packages are

smart enough to use something like $(TOPDIR)/tools/omkdepend/omkdepend instead of relying on omkdepend to be in the path...

The build doesn't require them to be in the path. It assumes they will build as part of the over all pkg build and are located in their respective
folders in the pkg source. Then they're used at a later point in the same build to
generate C code from a description language... It would take modification to
the package's pathing to get this fixed (support use of host approach).

Quoted 2 lines
Quoted 2 lines

I think I had two options to make this work...
1)Patch the source to allow a host build of the complete package to

place

Quoted 5 lines
Quoted 1 line

the right executable(s) into the sysroot.

That usually doesn't require patching the source. Just adding
$(eval $(host-autotools-package)) is probably enough. And of course you should add a dependency on host-omniorb.

The build currently isn't smart enough to look in the path, it is assuming

you're doing a build for the current host architecture and not cross building.
They assume the tools files are being built as part of the overall build and
used during the later half of the overall build. Would the following be acceptable
for now until the package improves it's infrastructure for cross builds?

# OMNIORB is currently not cross-compile friendly and has some assumptions where

# a couple host tools are built in place and then used during the build. 
The tools
# generate code from the IDL description language, which is then built 
into the.
# cross compiled OMNIORB application.
# So this hook first builds the tools required for the host side 
generation of code.
# It then leaves/places them in the locations where the existing build 
infrastructure expects.
define OMNIORB_BUILD_TOOLS_HOOK
Quoted 1 line

.......${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C

$(@D)/src/tool/omkdepend

Quoted 2 lines

.......cp $(@D)/src/tool/omkdepend/omkdepend $(@D)/bin/ .......${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C

$(@D)/src/tool/omniidl/cxx/cccp

Quoted 1 line

.......${HOST_MAKE_ENV} ${MAKE} CXX=${HOSTCXX} CC=${HOSTCC} -C

$(@D)/src/tool/omniidl/cxx
endef
OMNIORB_POST_CONFIGURE_HOOKS += OMNIORB_BUILD_TOOLS_HOOK

Quoted 3 lines
Quoted 3 lines

Then patch the source
differently for the target build to look in the sysroot instead of

it's

Quoted 3 lines
Quoted 1 line

tool's folder for those applications.

If it looks in the path, then no patching is necessary. You can

Ok

Quoted 6 lines

If it doesn't look in the path, then actually autotools has the
infrastructure to build host utilities during the cross-build. That is why CC_FOR_BUILD is passed to configure. So it would be sufficient to patch the Makefile.am in the tools directory to use CC_FOR_BUILD (and CPPFLAGS_FOR_BUILD and CFLAGS_FOR_BUILD). If you want an example, look

at

Quoted 3 lines

yasm or nettle.

If you patch the build system this way, the patch can be upstreamed

and

Quoted 1 line

we don't have to carry it for eternity.

It looks like the autotools version used for the package doesn't have CC_FOR_BUILD.
I wish I could do it this way, since the files I need it for just need to be build
for the host architecture and left in the tools/bin folder for use by the cross build.
It would be perfect to have a single package build satisfy this. I'll investigate
if there is any traction on improving the cross building of this package.

Quoted 5 lines

Regards,
Arnout

Quoted 15 lines
Quoted 6 lines

2)Overload the build command and insert a host build step manually for just those tools applications before the overall target cross compile. I went with the option that didn't create additional patches to complicate if/when the version bumps.

Quoted 1 line

Or, the alternative is to build a complete host variant of omniorb.

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

Matthew L Weber / Sr Software Engineer / Platform SW mlweber1 at rockwellcollins.com www.rockwellcollins.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130911/38c3058e/attachment-0001.html>

#6 lore raw

PATCH 1/1 omniorb: new package

Quoted 7 lines · On 11/09/13 16:04, mlweber1 at rockwellcollins.com wrote:

Arnout Vandecappelle <[email protected]> wrote on 09/09/2013 01:12:52 AM:

Quoted 5 lines

From: Arnout Vandecappelle <[email protected]>
To: mlweber1 at rockwellcollins.com
Cc: thomas.petazzoni at free-electrons.com, buildroot at busybox.net
Date: 09/09/2013 01:45 AM
Subject: Re: [Buildroot] [PATCH 1/1] omniorb: new package

[snip]

Quoted 10 lines
Quoted 9 lines

If it doesn't look in the path, then actually autotools has the
infrastructure to build host utilities during the cross-build. That is why CC_FOR_BUILD is passed to configure. So it would be sufficient to patch the Makefile.am in the tools directory to use CC_FOR_BUILD (and CPPFLAGS_FOR_BUILD and CFLAGS_FOR_BUILD). If you want an example, look at yasm or nettle.

If you patch the build system this way, the patch can be upstreamed and
we don't have to carry it for eternity.

Quoted 9 lines

It looks like the autotools version used for the package doesn't have CC_FOR_BUILD.
I wish I could do it this way, since the files I need it for just need to be build
for the host architecture and left in the tools/bin folder for use by the cross build.
It would be perfect to have a single package build satisfy this. I'll investigate
if there is any traction on improving the cross building of this package.

I've also taken a look, and the build system is indeed horribly broken.

Unfortunately, your solution still has an important shortcoming: it
will install the host binaries for those tools to the target. I think the solution is rather simple:

define OMNIORB_BUILD_TOOLS

	$(HOST_MAKE_ENV) $(MAKE) CXX=$(HOSTCXX) CC=$(HOSTCC) \
		-C $(@D)/src/tool export

endef

OMNIORB_POST_CONFIGURE_HOOKS += OMNIORB_BUILD_TOOLS

define OMNIORB_CLEAN_TOOLS

	$(HOST_MAKE_ENV) $(MAKE) CXX=$(HOSTCXX) CC=$(HOSTCC) \
		-C $(@D)/src/tool clean

endef

OMNIORB_POST_BUILD_HOOKS += OMNIORB_CLEAN_TOOLS

This will build the tools and install them locally in the build tree.
After building, the tools are cleaned again, so that the install target will re-build them. It's a huge hack so make sure to add some explanatory comments.

Note: I haven't tried this :-)

BTW Ideally the POST_CONFIGURE hook should be a PRE_BUILD hook but we
don't have that.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F