Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570556 - app-admin/killproc - build failure on uclibc due to startproc.c including 'argz.h'
Summary: app-admin/killproc - build failure on uclibc due to startproc.c including 'ar...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2016-01-02 03:58 UTC by Joshua Kinard
Modified: 2016-01-02 06:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2016-01-02 03:58:16 UTC
Tried to merge sys-apps/sdparm into my uclibc root, but the dependencies changed since the last time I did so.  sdparm depends on sg3_utils, which depend on rescan-scsi-bus, which require 'usleep', which is provided by app-admin/killproc.

It looks like when compiling killproc under uclibc, the 'usleep' binary builds successfully, but the overall build fails because startproc.c includes the argz.h header, which isn't available under uclibc.  It's only provided by glibc.  I'm not sure of a good workaround for this w/o diving into the code, but I did discover that atftp copied glibc's argz.h definition for itself so that it can compile under BSD, uclibc, and other environments:
https://github.com/seveas/atftp/blob/master/argz.h

Not sure if the same approach is valid here (doubtful).  I can't find anything solid on Google that suggests a uclibc-alternative to argz.h, either.  Apparently, it's something that needs porting:
http://infobot.rikers.org/%23uclibc/20050815.html.gz

21:24.48	waiting4_0928	Hi, how do I get argz.h to build gettext
21:26.02	solar	you really do not want gettext. But I would look at the gentoo or buildroot patches/build systems for that pkg
21:26.32	waiting4_0928	solar, thx
21:36.13	andersee_sleep	bummer
21:36.44	andersee	last night's buildroot runs failed
21:42.23	nitinkg	solar, whats the story behind missing argz.h?
21:50.14	mjn3-work	what story?  we simply never included (glibc) argz support
21:51.59	nitinkg	oh ok, is this something work-in-progress?
21:52.48	mjn3-work	should be easy enough to port.  are you volunteering?
21:54.25	nitinkg	mjn3-work, I will take a look. I have to get a patch ready for gettext first
21:56.07	mjn3-work	what are you trying to do with gettext that requires a patch?
21:56.31	nitinkg	cleaner inclusion of argz.h


Build errors:
>>> Emerging (1 of 4) app-admin/killproc-2.13-r1::gentoo
 * killproc-2.13.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking killproc-2.13.tar.gz to /var/tmp/portage/app-admin/killproc-2.13-r1/work
>>> Source unpacked in /var/tmp/portage/app-admin/killproc-2.13-r1/work
>>> Preparing source in /var/tmp/portage/app-admin/killproc-2.13-r1/work/killproc-2.13 ...
 * Applying killproc-2.13-makefile.patch ...                                                                                                                  [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-admin/killproc-2.13-r1/work/killproc-2.13 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-admin/killproc-2.13-r1/work/killproc-2.13 ...
make -j3
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -DINITDIR=\"/etc/init.d\" -c libinit.c
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -Wl,-O1 -Wl,--as-needed -o usleep usleep.c
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -Wl,-O1 -Wl,--as-needed -o fsync fsync.c
libinit.c: In function 'check4nfs':
libinit.c:1556:15: warning: variable 'l' set but not used [-Wunused-but-set-variable]
  NFS *p, *n, *l;
               ^
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -Wl,-O1 -Wl,--as-needed -o killproc killproc.c libinit.o
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -Wl,-O1 -Wl,--as-needed -o startproc startproc.c libinit.o
mips-unknown-linux-uclibc-gcc  -Os -pipe -march=mips2 -mtune=mips2 -mplt   -D_GNU_SOURCE -Wall -Wl,-O1 -Wl,--as-needed -o checkproc checkproc.c libinit.o
startproc.c:28:18: fatal error: argz.h: No such file or directory
compilation terminated.
Makefile:66: recipe for target 'startproc' failed
make: *** [startproc] Error 1
make: *** Waiting for unfinished jobs....
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2016-01-02 06:03:02 UTC
We don't use argz.h there at all, so that was an easy fix.

Fixed without revision bump.