Ticket #66 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Librc fails to compile on uClibc

Reported by: Keven Tipping <bytelogix@shaw.ca> Owned by: roy
Priority: major Milestone:
Component: rc Version:
Keywords: Cc:

Description

Librc fails to compile on uClibc.

Build log as follows when running make in librc or in the root of the OpenRC directory:

make[2]: Entering directory `/var/tmp/portage/sys-apps/openrc-0.2.1-r2/work/openrc-0.2.1/src/librc'
sed -e 's:@PREFIX@::g' -e 's:@LIB@:lib:g' -e 's:@SYSCONFDIR@:/etc:g' -e 's:.*@PKG_PREFIX@.*:#undef RC_PKG_PREFIX:g' -e 's:@LOCAL_PREFIX@:/usr/local:g' rc.h.in > rc.h
i386-gentoo-linux-uclibc-gcc -Os -mtune=i386 -pipe -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -I../includes -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -std=c99 -pedantic -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wno-format-nonliteral -Wdeclaration-after-statement -Wsequence-point -Wextra -MM librc.c librc-daemon.c librc-depend.c librc-misc.c librc-stringlist.c > .depend
i386-gentoo-linux-uclibc-gcc -Os -mtune=i386 -pipe -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -I../includes -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -std=c99 -pedantic -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wno-format-nonliteral -Wdeclaration-after-statement -Wsequence-point -Wextra -c -o librc.o librc.c
i386-gentoo-linux-uclibc-gcc -Os -mtune=i386 -pipe -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -I../includes -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -std=c99 -pedantic -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wno-format-nonliteral -Wdeclaration-after-statement -Wsequence-point -Wextra -c -o librc-daemon.o librc-daemon.c
In file included from librc.h:67,
from librc.c:34:
rc.h:284: error: expected specifier-qualifier-list before 'STAILQ_ENTRY'
In file included from librc.h:67,
from librc-daemon.c:32:
rc.h:284: error: expected specifier-qualifier-list before 'STAILQ_ENTRY'
rc.h:293: error: expected specifier-qualifier-list before 'STAILQ_HEAD'
rc.h:298: error: expected declaration specifiers or '...' before ',' token
rc.h:298: error: expected declaration specifiers or '...' before 'rc_depinfo'
rc.h:298: error: function definition declared 'typedef'
rc.h:298: warning: return type defaults to 'int'
rc.h:298: warning: no previous declaration for 'STAILQ_HEAD'
rc.h: In function 'STAILQ_HEAD':
rc.h:298: error: expected declaration specifiers before 'RC_DEPTREE'
rc.h:324: error: expected declaration specifiers before 'RC_DEPTREE'
rc.h:331: warning: type defaults to 'int' in declaration of 'RC_DEPTREE'
rc.h:331: error: expected ';', ',' or ')' before '*' token
rc.h:340: warning: type defaults to 'int' in declaration of 'RC_DEPTREE'
rc.h:340: error: expected ';', ',' or ')' before '*' token
rc.h:350: warning: type defaults to 'int' in declaration of 'RC_DEPTREE'
rc.h:350: error: expected ';', ',' or ')' before '*' token
rc.h:354: error: expected ')' before '*' token
rc.h:386: error: storage class specified for parameter 'RC_HOOK'
rc.h:392: error: expected ')' before 'const'
rc.h:396: error: storage class specified for parameter 'rc_environ_fd'
rc.h:453: error: storage class specified for parameter 'RC_PID'
rc.h:454: error: storage class specified for parameter 'RC_PIDLIST'
rc.h:465: error: expected declaration specifiers before 'RC_PIDLIST'
In file included from librc.h:68,
from librc-daemon.c:32:
../includes/rc-misc.h:101: error: expected declaration specifiers before 'attribute'
../includes/rc-misc.h:112: error: expected declaration specifiers before 'attribute'
../includes/rc-misc.h:123: error: expected declaration specifiers before 'attribute'
../includes/rc-misc.h:141: error: expected declaration specifiers before 'attribute'
../includes/rc-misc.h:148: error: expected declaration specifiers before 'attribute'
../includes/rc-misc.h:168: error: expected declaration specifiers before 'attribute'
In file included from librc-daemon.c:32:
librc.h:76: error: storage class specified for parameter 'rc_config_list'
librc.h:76: warning: 'visibility' attribute ignored
librc.h:76: error: redefinition of parameter 'rc_config_list'

<snip a few hundred lines more of similar errors>

Change History

comment:293 Changed 2 years ago by roy

Use uclibc-0.9.29 or just the sys/queue.h header from that version.

comment:421 Changed 2 years ago by roy

  • Status changed from new to resolved
  • Resolution set to fixed

We now use TAILQ instead of STAILQ, so we should now work more easily with uclibc.
Re-open if this is still an issue.

Note: See TracTickets for help on using tickets.