Project

General

Profile

Bug #2276

libpcre - specify directory

Added by sshore-iders almost 7 years ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
build_autotools
Target version:
Start date:
2010-11-29
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:
No

Description

When cross-compiling, pcre-config in the local path does not provide the correct directory.

The following patch allows the user to specify the location using --with-pcre=, similar to how --with-openssl is handled.

The patch modifies configure.ac, so a new configure script must be generated with autoconf after applying the patch.

lighttpd-pcre.patch (667 Bytes) lighttpd-pcre.patch configure.ac patchfile sshore-iders, 2010-11-29 21:46

Associated revisions

Revision 427acbf0 (diff)
Added by gstrauss over 1 year ago

[build] enhancements for cross-compiling (fixes #2276)

x-ref:
"libpcre - specify directory"
https://redmine.lighttpd.net/issues/2276

History

#1 Updated by Olaf-van-der-Spek almost 7 years ago

I'm curious, isn't it easier to ensure the path contains the right libs?

#2 Updated by sshore-iders almost 7 years ago

The current configure script doesn't look for the pcre libs or headers. It just looks for "pcre-config", and asks it where to find the libs and headers. When cross-compiling, these values are probably wrong.

One could create a "pcre-config" that returns the results you want, insert it in your path ahead of the pcre-config that's already on the system, and then call the configure script. However, I think this patch is more sensible than that.

#3 Updated by Olaf-van-der-Spek almost 7 years ago

sshore-iders wrote:

However, I think this patch is more sensible than that.

Why? Sure, it's an easy short-term work-around. But it doesn't make sense.

#4 Updated by sshore-iders almost 7 years ago

Olaf-van-der-Spek wrote:

Why? Sure, it's an easy short-term work-around. But it doesn't make sense.

Could you elaborate on what doesn't make sense?

It seems that this fixes a problem when compiling for a different arch without changing anything for regular users.

#5 Updated by Olaf-van-der-Spek almost 7 years ago

It's not too bad, but ideally you'd want this to work without manually specifying paths, even when cross-compiling.

#6 Updated by brad@comstyle.com almost 7 years ago

Olaf-van-der-Spek wrote:

It's not too bad, but ideally you'd want this to work without manually specifying paths, even when cross-compiling.

Too bad pkg-config was not designed for cross-compiling. Many projects have issues with cross-compiling due to the use of pkg-config and end up having to fallback to other means of finding the libraries because of this. There are some projects that do not use pkg-config at all because it does not work with cross-compiling.

#7 Updated by Olaf-van-der-Spek almost 7 years ago

Is fixing pkg-config that hard?

#8 Updated by ver over 6 years ago

Olaf-van-der-Spek wrote:

sshore-iders wrote:

However, I think this patch is more sensible than that.

Conventionally whenever I have cross-compiled, I've used a build root, which would make this patch unnecessary.

Why? Sure, it's an easy short-term work-around. But it doesn't make sense.

That said, I don't see a down-side to making specifiable search paths on --with-xxx args possible. I can't see it breaking any existing build systems with respect to relying on particular configure script behavior. It is certainly an enhancement.

That said, this updates for building only pcre. If applied, it would be best if the patch also updated the autoconf rules for fam, webdav, zlib, bzip2, and so on, to also allow for specifiable paths. In for a penny, in for a pound.

#9 Updated by gstrauss over 1 year ago

  • Status changed from New to Patch Pending
  • Target version set to 1.4.40

#10 Updated by gstrauss over 1 year ago

I have submitted a patch to allow specifying directories on more of the (optional) lighttpd dependencies, including pcre, zlib, bzip2, gdbm, memcached. Patches will be accepted for others, as people need them, but please file feature requests, not bugs. Don't worry. Feature requests -- especially those with patches -- will still be picked up.

#11 Updated by gstrauss over 1 year ago

I extended the patch to include sqlite3, libxml2, libuuid, FAM/gamin.

#12 Updated by gstrauss over 1 year ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom