First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 73855
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Embedded Gentoo Team <embedded@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Axel Dyks <XL@XLsigned.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
xfsprogs-2.6.25-new-ebuild.tar.gz The "configure/aclocal.m4-patch" and a modified ebuild that applies the patch application/x-gzip Axel Dyks 2004-12-08 17:39 0000 1.63 KB Details
test-fadvise.tar.gz Test-Case for fadvise on glibc/uclibc platforms application/x-gzip Axel Dyks 2004-12-21 18:14 0000 359 bytes Details
2.6.25-uclibc-fadvise.patch 2.6.25-uclibc-fadvise.patch patch solar 2005-01-29 06:31 0000 849 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 73855 depends on: Show dependency tree
Bug 73855 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-08 17:33 0000
Make/Linking fails in subdir "./io" on unresolved symbols "mincore" (mincore.o)
and "posix_fadvise64" (fadvise.o).

Availability of these (system) functions is checked by "./configure",
but not detected correctly (test-compile works, linking would fail).
I will attach a patch for "./configure" and "aclocal.m4" (in case
someone wants to run autoconf).

Don't know, if it's possible to fix this upstream (http://oss.sgi.com/bugzilla/,
http://www.uclibc.org), but I will try my very best.

ByTheWay: "xfsprogs" are obviously meant to run _also_ on systems 
  without "mincore"/"fadvise". Otherwise "./configure" would terminate
  with an error. 

-Axel

------- Comment #1 From Axel Dyks 2004-12-08 17:39:44 0000 -------
Created an attachment (id=45579) [edit]
The "configure/aclocal.m4-patch" and a modified ebuild that applies the patch

------- Comment #2 From solar 2004-12-09 06:15:12 0000 -------
In the ebuild you have.
-------------------------------------------------------------
        # "mincore" and "fadvise" are not available when building
        # with "uclibc", although "configure" detects them.
        use uclibc && \
                epatch ${FILESDIR}/${PV}-uclibc-mincore-fadvise.patch
-------------------------------------------------------------
We try to never conditionally patch.

------- Comment #3 From Axel Dyks 2004-12-09 07:33:42 0000 -------
Is something like adding "ifdef __UCLIBC__" to "io/Makefile"
and setting __UCLIBC__ (on "use uclibc") ok for you?

If so, I'd change the patch and the ebuild...

Don't know very much of your (internal) rules for creating
ebuilds, so please be forgiving. :-)

-Axel

------- Comment #4 From solar 2004-12-14 19:29:24 0000 -------
I can add mincore() to uClibc itself. As for the posix_fadvise/posix_fadvise64
part I think xfsprogs is probably handling it wrong. It should only be used
when __USE_XOPEN2K is defined. see /usr/include/fcntl.h

------- Comment #5 From Axel Dyks 2004-12-21 18:14:03 0000 -------
Created an attachment (id=46598) [edit]
Test-Case for fadvise on glibc/uclibc platforms

Hmm... I'm not sure, if I 've correctly understood.

I've found your discussion on "ibot.rikers.org/uclibc" about the missing
mincore() function and that somebody said "should be trivial to implement it in
uClibc". Don't know if it's really that simple but building xfsprogs on
uclibc without needing a patch would be great. :-)

I can't follow your statement on "fadvise/fadvise64".
After reading "fcntl.h" and some references about posix-defined
functions I wrote the small test-case that I have attached.

Compilation is successfull on uclibc- and glibc-platforms.
Linking is successfull on glibc but FAILS on uclibc.

Axel

------- Comment #6 From Axel Dyks 2004-12-21 19:10:43 0000 -------
I 've just inspected <fcntl.h> from my "original" uclibc-buildroot
and found the following...

-----------------------------------------------------------------------------
#if 0

/* FIXME -- uClibc should probably implement these... */

#ifdef __USE_XOPEN2K
/* Advice the system about the expected behaviour of the application with
   respect to the file associated with FD.  */
# ifndef __USE_FILE_OFFSET64
extern int posix_fadvise (int __fd, __off_t __offset, size_t __len,
			  int __advise) __THROW;
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fadvise, (int __fd, __off64_t __offset,
				       size_t __len, int __advise) __THROW,
		       posix_fadvise64);
# else
#  define posix_fadvise posix_fadvise64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fadvise64 (int __fd, __off64_t __offset, size_t __len,
			    int __advise) __THROW;
# endif

...

-----------------------------------------------------------------------------

I think the actual problem is that some header files of gentoo-embedded
do not correspond with the underlying "uclibc", i. e. an external function
is declared although it is not implemented.

For xfsprogs' (and other's?) "configure" only tries to _compile_
test code containing the functions in question (fadvise, mincore, ...)
it does not recognize that the implementation is missing from the library.

Axel

------- Comment #7 From SpanKY 2005-01-11 20:07:44 0000 -------
solar fixed this by implementing the needed functions in uclibc ;)

------- Comment #8 From solar 2005-01-11 21:48:06 0000 -------
SpanKY: only 50% fixed.  posix_fadvise64() does not exist.

------- Comment #9 From SpanKY 2005-01-11 21:51:49 0000 -------
what's the status of that function ?  do we just need a syscall wrapper in
uclibc ?

------- Comment #10 From Axel Dyks 2005-01-12 03:32:49 0000 -------
And what about "#if 0 ..." in "fcntl.h"?
At least until those functions (fadvise, ...) have been implemented.

--Axel

------- Comment #11 From SpanKY 2005-01-17 15:23:49 0000 -------
ive implemented the two functions in upsteam uclibc cvs, but i need to
implement _syscall6() for i386 ... then i can cut a patch from cvs and this
should be resolved for everyone

------- Comment #12 From solar 2005-01-28 19:07:02 0000 -------
in the mean time is xfsprogs not building for people? 
If so shall we disable the one module for now so people can build it again?

------- Comment #13 From Jory A. Pratt 2005-01-28 19:10:25 0000 -------
I think we should disable it as long as it isnt gonna cause problems with the
package, from what I have read doesnt appear it will!!

------- Comment #14 From solar 2005-01-29 06:31:40 0000 -------
Created an attachment (id=49828) [edit]
2.6.25-uclibc-fadvise.patch

slimmed down aclocal patch

------- Comment #15 From solar 2005-01-29 07:08:59 0000 -------
last patch is in cvs..

------- Comment #16 From Axel Dyks 2005-01-29 08:05:23 0000 -------
Thanks!
(also for providing mincore in uclibc)
--Axel

------- Comment #17 From solar 2005-01-30 11:18:03 0000 -------
Resolve bug as FIXED. Spanky will add syscall6 when he is in the mood and we
will revisit xfsprogs another day.

------- Comment #18 From SpanKY 2006-01-03 06:16:50 0000 -------
*** Bug 117559 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug