Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269734 - sys-apps/grep: Fix pcre cross-compilation
Summary: sys-apps/grep: Fix pcre cross-compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-13 18:59 UTC by Bertrand Jacquin
Modified: 2010-03-23 21:11 UTC (History)
0 users

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


Attachments
2.5.1a: replace pcre-config with pkg-config (grep-2.5.1a-BJA-pcre-pkgconfig.diff,631 bytes, patch)
2009-05-13 19:01 UTC, Bertrand Jacquin
Details | Diff
sys-apps/grep-2.5.1a.ebuild.diff (grep-2.5.1a-r1.ebuild.diff,1015 bytes, patch)
2009-05-13 19:02 UTC, Bertrand Jacquin
Details | Diff
2.5.4: replace pcre-config with pkg-config (grep-2.5.4-BJA-pcre-pkgconfig.diff,639 bytes, patch)
2009-05-13 19:02 UTC, Bertrand Jacquin
Details | Diff
sys-apps/grep-2.5.4-r1.ebuild.diff (grep-2.5.4-r1.ebuild.diff,554 bytes, patch)
2009-05-13 19:07 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2009-05-13 18:59:40 UTC
Here is fix to replace configure.in attempt to exec host pcre-config by
a pkg-config method. "Previous" method was not really adapted if you try
to cross-compile grep. If host have pcre-config, it contain host cflags
and ldflags which make linker not happy :

i586-geode-linux-uclibc-gcc  -Os -pipe -march=k6-2 -fomit-frame-pointer
-I/usr/i586-geode-linux-uclibc/usr/include/
-I/usr/i586-geode-linux-uclibc/include/    -o grep  grep.o dfa.o kwset.o
search.o grepmat.o ../lib/libgreputils.a -L/usr/lib64 -Wl,-Bstatic
-lpcre -Wl,-Bdynamic
/usr/libexec/gcc/i586-geode-linux-uclibc/ld: skipping incompatible
/usr/lib64/libpcre.a when searching for -lpcre
/usr/libexec/gcc/i586-geode-linux-uclibc/ld: cannot find -lpcre
collect2: ld returned 1 exit status
make[2]: *** [grep] Error 1

The attached patch are for grep 2.5.1a and 2.5.4.

Reproducible: Always

Steps to Reproduce:
1. crossdev -t i586-geode-linux-uclibc
2. emerge-wrapper --init
3. USE=pcre i586-geode-linux-uclibc -vat grep





Report have been reported upstream: http://thread.gmane.org/gmane.comp.gnu.grep.bugs/1990
Comment 1 Bertrand Jacquin 2009-05-13 19:01:34 UTC
Created attachment 191185 [details, diff]
2.5.1a: replace pcre-config with pkg-config
Comment 2 Bertrand Jacquin 2009-05-13 19:02:14 UTC
Created attachment 191186 [details, diff]
sys-apps/grep-2.5.1a.ebuild.diff
Comment 3 Bertrand Jacquin 2009-05-13 19:02:33 UTC
Created attachment 191188 [details, diff]
2.5.4: replace pcre-config with pkg-config
Comment 4 Bertrand Jacquin 2009-05-13 19:07:51 UTC
Created attachment 191190 [details, diff]
sys-apps/grep-2.5.4-r1.ebuild.diff
Comment 5 SpanKY gentoo-dev 2010-03-23 21:11:10 UTC
grep-2.6 uses pkg-config now to find pcre