Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427798 - dev-libs/libpcre-8.31 - Doesn't build under uClibc due to missing posix_madvise
Summary: dev-libs/libpcre-8.31 - Doesn't build under uClibc due to missing posix_madvise
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL: http://git.uclibc.org/uClibc/commit/?...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 19:38 UTC by James Le Cuirot
Modified: 2012-08-18 05:53 UTC (History)
0 users

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


Attachments
Adds posix_madvise.c to uclibc (add-posix_madvise.patch,4.21 KB, patch)
2012-07-24 22:46 UTC, Anthony Basile
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2012-07-23 19:38:18 UTC
Building libpcre-8.31 under uClibc (0.9.33.2-r1) dies with...

./.libs/libpcre.so: undefined reference to `posix_madvise'

For some reason, both posix_madvise and POSIX_MADV_DONTNEED have been defined in the headers for ages but the actual implementation wasn't added to uClibc until very recently. See the commit at the given URL. This should probably be fixed on the uClibc side. Applying that commit seems easiest.
Comment 1 Anthony Basile gentoo-dev 2012-07-24 16:02:00 UTC
(In reply to comment #0)
> Building libpcre-8.31 under uClibc (0.9.33.2-r1) dies with...
> 
> ./.libs/libpcre.so: undefined reference to `posix_madvise'
> 
> For some reason, both posix_madvise and POSIX_MADV_DONTNEED have been
> defined in the headers for ages but the actual implementation wasn't added
> to uClibc until very recently. See the commit at the given URL. This should
> probably be fixed on the uClibc side. Applying that commit seems easiest.

Confirmed.  I hit this a few days ago on mips-uclibc.
Comment 2 SpanKY gentoo-dev 2012-07-24 17:39:10 UTC
since it's part of POSIX, we should update uClibc
Comment 3 Anthony Basile gentoo-dev 2012-07-24 22:46:36 UTC
Created attachment 319146 [details, diff]
Adds posix_madvise.c to uclibc

I grabed posix_madvise.c from glibc and included it in uclibc.  This fixes the libpcre problem.

@Mike: the only thing I'm not certain of is that I removed glibc's stub_warning which didn't seem appropriate here.  You would know better than I, is that okay?
Comment 4 Anthony Basile gentoo-dev 2012-07-24 22:57:47 UTC
(In reply to comment #3)
> Created attachment 319146 [details, diff] [details, diff]
> Adds posix_madvise.c to uclibc
> 
> I grabed posix_madvise.c from glibc and included it in uclibc.  This fixes
> the libpcre problem.
> 
> @Mike: the only thing I'm not certain of is that I removed glibc's
> stub_warning which didn't seem appropriate here.  You would know better than
> I, is that okay?

um ... scratch the above ....

http://git.uclibc.org/uClibc/commit/?id=9d101732ad0609f2f19ef20062a00cd26b01d859

@Mike you may want to backport that if they're not going to push out a new release soon.
Comment 5 SpanKY gentoo-dev 2012-08-18 05:53:08 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add posix_madvise support from upstream
http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.33.2-r2.ebuild?rev=1.1