misc: fails to build with --with-local-libnih

Bug #530385 reported by Michael Biebl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Medium
Michael Biebl

Bug Description

Using --with-local-libnih, I get the following error message:

[michael@pluto upstart-0.6.5]$ make V=1
make all-recursive
make[1]: Entering directory `/home/michael/upstart/upstart-0.6.5'
Making all in intl
make[2]: Entering directory `/home/michael/upstart/upstart-0.6.5/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/michael/upstart/upstart-0.6.5/intl'
Making all in dbus
make[2]: Entering directory `/home/michael/upstart/upstart-0.6.5/dbus'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/michael/upstart/upstart-0.6.5/dbus'
Making all in init
make[2]: Entering directory `/home/michael/upstart/upstart-0.6.5/init'
make all-am
make[3]: Entering directory `/home/michael/upstart/upstart-0.6.5/init'
gcc -std=gnu99 -DHAVE_CONFIG_H -DLOCALEDIR="\"/usr/share/locale\"" -DCONFFILE="\"/etc/init.conf\"" -DCONFDIR="\"/etc/init\"" -DSBINDIR="\"//sbin\"" -I.. -I.. -iquote. -iquote. -I../intl -I"\"/home/michael/upstart/upstart-0.6.5/debian/libnih-1.0.1\"" -I"\"/home/michael/upstart/upstart-0.6.5/debian/libnih-1.0.1\"" -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -Wall -g -Os -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c:42:24: error: nih/macros.h: No such file or directory
main.c:43:23: error: nih/alloc.h: No such file or directory
main.c:44:22: error: nih/list.h: No such file or directory
main.c:45:23: error: nih/timer.h: No such file or directory
main.c:46:24: error: nih/signal.h: No such file or directory
main.c:47:23: error: nih/child.h: No such file or directory
main.c:48:24: error: nih/option.h: No such file or directory
main.c:49:22: error: nih/main.h: No such file or directory
main.c:50:23: error: nih/error.h: No such file or directory
main.c:51:25: error: nih/logging.h: No such file or directory
In file included from system.h:27,
                 from main.c:55:
job_class.h:32:22: error: nih/hash.h: No such file or directory
job_class.h:34:35: error: nih-dbus/dbus_message.h: No such file or directory
In file included from job_class.h:36,
                 from system.h:27,
                 from main.c:55:
process.h:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Process'
In file included from job_class.h:37,
                 from system.h:27,
                 from main.c:55:
event_operator.h:24:22: error: nih/tree.h: No such file or directory
In file included from event_operator.h:26,
                 from job_class.h:37,
                 from system.h:27,
                 from main.c:55:
event.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
event.h:62: error: expected specifier-qualifier-list before 'NihList'
event.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
event.h:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from job_class.h:37,
                 from system.h:27,
                 from main.c:55:
event_operator.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
event_operator.h:64: error: expected specifier-qualifier-list before 'NihTree'
event_operator.h:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EventOperator'
event_operator.h:99: error: expected declaration specifiers or '...' before 'NihList'
In file included from system.h:27,
                 from main.c:55:
job_class.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
job_class.h:108: error: expected specifier-qualifier-list before 'NihList'
job_class.h:155: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
job_class.h:178: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:183: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:188: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:193: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:197: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:201: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:206: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:210: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:214: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job_class.h:218: error: expected declaration specifiers or '...' before 'NihDBusMessage'
In file included from main.c:55:
system.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NIH_BEGIN_EXTERN'
In file included from com.ubuntu.Upstart.Instance.h:14,
                 from job.h:38,
                 from job_process.h:31,
                 from main.c:56:
/usr/include/stdint.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
In file included from job.h:38,
                 from job_process.h:31,
                 from main.c:56:
com.ubuntu.Upstart.Instance.h:18:37: error: nih-dbus/dbus_interface.h: No such file or directory
In file included from job.h:38,
                 from job_process.h:31,
                 from main.c:56:
com.ubuntu.Upstart.Instance.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
com.ubuntu.Upstart.Instance.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
com.ubuntu.Upstart.Instance.h:34: error: expected ')' before '*' token
com.ubuntu.Upstart.Instance.h:36: error: expected ')' before '*' token
com.ubuntu.Upstart.Instance.h:38: error: expected ')' before '*' token
In file included from job_process.h:31,
                 from main.c:56:
job.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
job.h:123: error: expected specifier-qualifier-list before 'NihList'
job.h:158: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Job'
job.h:162: error: expected declaration specifiers or '...' before 'JobGoal'
job.h:176: error: expected ')' before 'goal'
job.h:178: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'job_goal_from_name'
job.h:184: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:186: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:188: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:191: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:194: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:197: error: expected declaration specifiers or '...' before 'NihDBusMessage'
job.h:201: error: expected declaration specifiers or '...' before 'NihDBusMessage'
In file included from main.c:56:
job_process.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
job_process.h:71: error: expected specifier-qualifier-list before 'NihError'
job_process.h:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
job_process.h:89: error: expected declaration specifiers or '...' before 'NihChildEvents'
In file included from main.c:58:
conf.h:27:23: error: nih/watch.h: No such file or directory
In file included from main.c:58:
conf.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
conf.h:66: error: expected specifier-qualifier-list before 'NihList'
conf.h:93: error: expected specifier-qualifier-list before 'NihList'
conf.h:108: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
conf.h:114: error: expected declaration specifiers or '...' before 'ConfSourceType'
In file included from main.c:59:
control.h:27:38: error: nih-dbus/dbus_connection.h: No such file or directory
In file included from main.c:59:
control.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NIH_BEGIN_EXTERN'
control.h:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
control.h:49: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:52: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:55: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:59: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:64: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:68: error: expected declaration specifiers or '...' before 'NihDBusMessage'
control.h:71: error: expected declaration specifiers or '...' before 'NihDBusMessage'
main.c:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
main.c:65: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:66: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:67: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:68: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:69: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:95: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'options'
main.c: In function 'main':
main.c:113: warning: implicit declaration of function 'nih_main_init'
main.c:115: warning: implicit declaration of function 'nih_option_set_synopsis'
main.c:115: warning: implicit declaration of function '_'
main.c:116: warning: implicit declaration of function 'nih_option_set_help'
main.c:121: warning: implicit declaration of function 'nih_option_parser'
main.c:121: error: 'options' undeclared (first use in this function)
main.c:121: error: (Each undeclared identifier is reported only once
main.c:121: error: for each function it appears in.)
main.c:128: warning: implicit declaration of function 'nih_fatal'
main.c:175: warning: implicit declaration of function 'nih_free'
main.c:175: warning: implicit declaration of function 'nih_error_get'
main.c:187: warning: implicit declaration of function 'nih_warn'
main.c:199: warning: implicit declaration of function 'nih_signal_reset'
main.c:205: warning: implicit declaration of function 'nih_signal_set_handler'
main.c:205: error: 'crash_handler' undeclared (first use in this function)
main.c:213: error: 'nih_signal_handler' undeclared (first use in this function)
main.c:222: warning: implicit declaration of function 'NIH_MUST'
main.c:222: warning: implicit declaration of function 'nih_signal_add_handler'
main.c:248: warning: implicit declaration of function 'nih_child_add_watch'
main.c:248: error: 'NIH_CHILD_ALL' undeclared (first use in this function)
main.c:252: warning: implicit declaration of function 'nih_main_loop_add_func'
main.c:252: error: 'NihMainLoopCb' undeclared (first use in this function)
main.c:252: error: expected ')' before 'event_poll'
main.c:257: error: too many arguments to function 'conf_source_new'
main.c:258: error: too many arguments to function 'conf_source_new'
main.c:264: error: 'NihError' undeclared (first use in this function)
main.c:264: error: 'err' undeclared (first use in this function)
main.c:295: error: 'program_name' undeclared (first use in this function)
main.c:296: warning: implicit declaration of function 'nih_log_set_logger'
main.c:296: error: 'nih_logger_syslog' undeclared (first use in this function)
main.c:317: warning: implicit declaration of function 'nih_main_loop_interrupt'
main.c:318: warning: implicit declaration of function 'nih_main_loop'
main.c: In function 'crash_handler':
main.c:344: warning: implicit declaration of function 'nih_assert'
main.c: At top level:
main.c:410: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:426: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:442: error: expected declaration specifiers or '...' before 'NihSignal'
main.c:457: error: expected declaration specifiers or '...' before 'NihSignal'
main.c: In function 'hup_handler':
main.c:459: warning: implicit declaration of function 'nih_info'
main.c: At top level:
main.c:473: error: expected declaration specifiers or '...' before 'NihSignal'
main.c: In function 'usr1_handler':
main.c:479: error: 'NihError' undeclared (first use in this function)
main.c:479: error: 'err' undeclared (first use in this function)
make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/home/michael/upstart/upstart-0.6.5/init'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/michael/upstart/upstart-0.6.5/init'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/michael/upstart/upstart-0.6.5'
make: *** [all] Error 2

I'm using an up-to-date Debian unstsable system,
gcc 4.4.3
make 3.81

The attached patch removes the double quoting so it compiles successfully.

Revision history for this message
Michael Biebl (mbiebl) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The double-quoting is clearly wrong, but the weird thing is that I *don't* get that error!

Could you confirm which version of autoconf, automake & libtool you have. Also what configure arguments did you use?

Changed in upstart:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Michael Biebl (mbiebl) wrote :

I don't see, how the autoconf or automake versions are important, as I use
http://upstart.ubuntu.com/download/0.6/upstart-0.6.5.tar.gz
http://upstart.ubuntu.com/download/libnih/1.0/libnih-1.0.1.tar.gz

But for completeness sake:

autoconf 2.65
automake 1.11.1
libtool 2.2.6b

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :
Changed in upstart:
assignee: nobody → Michael Biebl (mbiebl)
milestone: none → 0.6.6
status: Triaged → Fix Committed
summary: - Fails to build with --with-local-libnih
+ misc: fails to build with --with-local-libnih
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This bug was fixed in Upstart 0.6.6

0.6.6 2010-04-27 "No, she's dead, this is her son"

        * Upstart will automatically mount /proc and /sys on boot if they
          have not already been mounted by the kernel or initramfs.
          (Bug: #426263)

        * Fixed double-quoting issue with the --with-local-libnih configure
          option. (Bug: #530385)

        * libnih 1.0.2 is now required.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.