misc: cannot cross-compile due to nih-dbus-tool

Bug #426740 reported by Alberto Donato on 2009-09-09
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libnih
Low
Scott James Remnant (Canonical)
upstart
Low
Scott James Remnant (Canonical)
upstart (Ubuntu)
Low
Unassigned

Bug Description

The nih-dbus-tool executable is compiled for host architecture when cross-compiling, thus cannot be run when required during the later compilation stages, causing the upstart build to fail.

No idea how to fix this with Automake.

summary: - nih-dbus-tool is compiled for host and can't be run when cross-compiling
+ misc: cannot cross-compile due to nih-dbus-tool
Changed in upstart:
importance: Undecided → Low
status: New → Triaged
Paolo Bonzini (bonzini) wrote :

You should add to the configure script something like

if test "x$cross_compiling" = xyes; then
  NIH_DBUS_TOOL=nih-dbus-tool
else
  NIH_DBUS_TOOL='$top_builddir/qualcosa/nih-debus-tool'
fi
AC_SUBST([NIH_DBUS_TOOL])

change invocations to use $(NIH_DBUS_TOOL) and make sure you have the tool preinstalled on your build machine

I've gone with a variant of what Paolo suggested. If you're cross-compiling, it'll look for nih-dbus-tool in the $PATH. In any case, overriding is permitted by setting NIH_DBUS_TOOL as you would CC, etc.

If it's not in the PATH, and you've not set it, you get something like:

configure: WARNING: nih-dbus-tool not found, but you are cross-compiling. Using built copy, which is probably not what you want. Set NIH_DBUS_TOOL maybe?

Changed in libnih:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Scott James Remnant (scott)
Changed in upstart:
status: Triaged → Fix Committed
assignee: nobody → Scott James Remnant (scott)
milestone: none → 0.7.0
Changed in upstart (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 0.6.3-8

---------------
upstart (0.6.3-8) karmic; urgency=low

  * Rather than calling "telinit u" after upgrade, which will lose state,
    have the umountroot initscript take care of it for us by setting a
    flag. LP: #441796.
  * Don't lose the original default runlevel if /etc/inittab exists without
    an initdefault line. LP: #405847.
  * Fix "unhandled error" in shutdown when unable to change runlevel,
    e.g. due to previous Ubiquity bug. LP: #426332.
  * Merge change from trunk that makes it possible to build Upstart using
    a previously built copy of nih-dbus-tool, especially useful when
    cross-compiling. LP: #426740.
  * Merge change from libnih to store our assertion messages in the
    glibc __abort_msg symbol so apport can pick them up. LP: #429411.
  * Merge change from libnih to fix compilation issue with eglibc due
    to changed alphasort() prototype.

 -- Scott James Remnant <email address hidden> Wed, 14 Oct 2009 05:34:13 +0100

Changed in upstart (Ubuntu):
status: Triaged → Fix Released

Fixed in libnih 1.0.0, note that this fix will still need to be merged into software using libnih or the software updated to dynamically link to libnih instead.

Changed in libnih:
status: Fix Committed → Fix Released

Trunk uses the external libnih, and can use the installed nih-dbus-tool

Changed in upstart:
milestone: 0.7.0 → 0.6.5

0.6.5 2010-02-04 "Our last, best hope for victory"

 * Since libnih has been separated out into its own project, Upstart
   no longer includes its source and now uses the installed version by
   default.

 * The external nih-dbus-tool means that cross-compilation is trivial,
   the path to it may be overriden with NIH_DBUS_TOOL=... as an
   argument to configure. (Bug: #426740)

 * Developers may still build against a local libnih source tree by
   passing --with-local-libnih=/path/to/libnih to configure.

 * There is a new initctl "reload" command, with matching
   /sbin/reload symlink. This sends the SIGHUP signal to the running
   main process of the named job instance.

 * Event operator matches in jobs now support "!=" in addition to the
   usual "=", e.g.:

  start on net-device-added INTERFACE!=eth*

   (Bug: #513035)

 * Moved D-Bus system bus reconnection trigger from SIGHUP to SIGUSR1,
   since SIGHUP is already used for a forced configuration reload and
   causes Upstart to "forget" state.

 * Fixed bug where the default runlevel would be lost when an
   /etc/inittab file exists without an initdefault line. (Bug: #405847)

 * Fixed "Unhandled error" message from shutdown. (Bug: #426332)

 * Fixed "Unhandled error" assertion crash from Upstart child
   processes when failing to spawn a job. (Bug: #451917)

 * No longer holds /dev/console open, so the SAK SysRq key will not
   kill Upstart. (Bug: #486005)

 * Restored sync() call before reboot().

 * Added missing OPTIONS section to init(8) manpage. (Bug: #449883)

Changed in upstart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers