Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198272 - sys-block/open-iscsi-2.0.865.12 fails to compile on uclibc due to unimplemented get/freeifaddrs
Summary: sys-block/open-iscsi-2.0.865.12 fails to compile on uclibc due to unimplement...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mike Doty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 15:11 UTC by Natanael Copa
Modified: 2008-12-04 19:30 UTC (History)
2 users (show)

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


Attachments
open-iscsi-2.0.865.15-uclibc.patch (open-iscsi-2.0.865.15-uclibc.patch,6.40 KB, patch)
2007-11-08 17:16 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2007-11-06 15:11:12 UTC
...
 * Building userspace
cc  -march=i386 -Os -pipe -fomit-frame-pointer -Wall -Wstrict-prototypes -I../include -DLinux -DNETLINK_ISCSI=8 -D_GNU_SOURCE   -c -o util.o util.c
cc  -march=i386 -Os -pipe -fomit-frame-pointer -Wall -Wstrict-prototypes -I../include -DLinux -DNETLINK_ISCSI=8 -D_GNU_SOURCE   -c -o io.o io.c
cc  -march=i386 -Os -pipe -fomit-frame-pointer -Wall -Wstrict-prototypes -I../include -DLinux -DNETLINK_ISCSI=8 -D_GNU_SOURCE   -c -o auth.o auth.c
io.c:27:21: ifaddrs.h: No such file or directory
io.c: In function `get_hwaddress_from_netdev':
io.c:95: warning: implicit declaration of function `getifaddrs'
io.c:108: error: dereferencing pointer to incomplete type
io.c:109: error: dereferencing pointer to incomplete type
io.c:112: error: dereferencing pointer to incomplete type
io.c:114: error: dereferencing pointer to incomplete type
io.c:115: error: dereferencing pointer to incomplete type
io.c:119: error: dereferencing pointer to incomplete type
io.c:122: error: dereferencing pointer to incomplete type
io.c:123: error: dereferencing pointer to incomplete type
io.c:126: error: dereferencing pointer to incomplete type
io.c:132: error: dereferencing pointer to incomplete type
io.c:135: error: dereferencing pointer to incomplete type
io.c:159: warning: implicit declaration of function `freeifaddrs'
io.c: In function `get_netdev_from_hwaddress':
io.c:190: error: dereferencing pointer to incomplete type
io.c:191: error: dereferencing pointer to incomplete type
io.c:194: error: dereferencing pointer to incomplete type
io.c:196: error: dereferencing pointer to incomplete type
io.c:197: error: dereferencing pointer to incomplete type
io.c:201: error: dereferencing pointer to incomplete type
io.c:204: error: dereferencing pointer to incomplete type
io.c:205: error: dereferencing pointer to incomplete type
io.c:208: error: dereferencing pointer to incomplete type
io.c:214: error: dereferencing pointer to incomplete type
io.c:234: error: dereferencing pointer to incomplete type
io.c:236: error: dereferencing pointer to incomplete type
io.c: At top level:
io.c:86: warning: 'get_hwaddress_from_netdev' defined but not used
make: *** [io.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.


Proper fix would be to implement getifaddrs/freeifaddrs in uclibc.
Comment 1 Natanael Copa 2007-11-06 20:13:58 UTC
needs also versionsort(3).

Comment 2 Natanael Copa 2007-11-07 12:42:48 UTC
I have patches to support versionsort and strverscmp in uclibc. I'm not sure we want that since its non-POSIX. alphasort could be used without problem. The only difference would be that it would parse eth10 before eth2 config files. I don't know if that matters or not. If it matters, it shouldn't be too hard to implement a simplified versionsort in the code itself.

The getifaddrs can easily be worked around by using ioctl(..., SIOCGIFCONF, ...).

I have reported upstream.

Comment 3 Natanael Copa 2007-11-07 16:46:02 UTC
(In reply to comment #2)

> 
> The getifaddrs can easily be worked around by using ioctl(..., SIOCGIFCONF,
> ...).

ioctl would kill ipv6 support so its probably not an option for upstream :-(

We can either just skip the check that hw addr and iface correspond or we can add getifaddrs support in uclibc. It seems like the preferred way to list configured interfaces in linux is getifaddrs (which should use netlink).

in other words, we probably need getifaddrs in uclibc.
Comment 4 Natanael Copa 2007-11-08 17:16:09 UTC
Created attachment 135501 [details, diff]
open-iscsi-2.0.865.15-uclibc.patch

uses if_nameindex instead of getifaddrs.
Also implemented a simplified versionsort. alphasort would probaly work just fine as well. (the difference is in which order the iscsi devices are managed)
Commented out a big hunk of unused code.
Comment 5 Natanael Copa 2007-11-08 17:42:27 UTC
patch is sent upstream.
Comment 6 Stefan de Konink 2007-11-09 00:45:20 UTC
(In reply to comment #5)
> patch is sent upstream.

If this is implemented I guess clvm will benefit too.
Comment 7 Stefan Behte (RETIRED) gentoo-dev Security 2008-03-09 22:54:21 UTC
Patch was integrated upstream, could anyone test the newest ebuild here (maintainer is currently in devaway status): http://bugs.gentoo.org/show_bug.cgi?id=196096
Comment 8 Stefan Behte (RETIRED) gentoo-dev Security 2008-03-14 21:49:51 UTC
*bump*
Comment 9 solar (RETIRED) gentoo-dev 2008-03-15 00:55:49 UTC
Mike,
Looks like a version bump would fix this.
Comment 10 Mike Doty (RETIRED) gentoo-dev 2008-03-15 02:20:05 UTC
(In reply to comment #9)
> Mike,
> Looks like a version bump would fix this.
> 

I'm on leave, so give me a hand.  bump to what version?  link me to upstream version? is it something more involved than a bump?  all my iscsi gear is in production, my one test target is out on RMA so no testing can be done....
Comment 11 solar (RETIRED) gentoo-dev 2008-03-15 03:25:22 UTC
Mike, Sorry for the trouble. Based on comment #7 I mis-interpreted the reporters use of the word *bump* to mean that a new upstream version was available.
Comment 12 Mike Doty (RETIRED) gentoo-dev 2008-03-15 04:03:43 UTC
bah, too bad we don't have a RESO:MERGED option or I'd merge it with the bug mentioned in comment #7.  I'll take a look at this when I have some iscsi gear to play with again.
Comment 13 Natanael Copa 2008-03-17 10:14:06 UTC
(In reply to comment #7)
> Patch was integrated upstream, could anyone test the newest ebuild here
> (maintainer is currently in devaway status):
> http://bugs.gentoo.org/show_bug.cgi?id=196096
> 

Yes, new version compiles just fine on uclibc. I add it as a depend so we get notified when its commited in portage and can close this bug.

Thanks!
Comment 14 Tobias Scherbaum (RETIRED) gentoo-dev 2008-11-17 21:00:44 UTC
2.0.870 is in CVS finally, closing this one, too.