Project

General

Profile

Actions

Bug #2276

closed

libpcre - specify directory

Added by sshore-iders about 14 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Low
Category:
build_autotools
Target version:
ASK QUESTIONS IN Forums:

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.


Files

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

Updated by Olaf-van-der-Spek about 14 years ago

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

Actions #2

Updated by sshore-iders about 14 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.

Actions #3

Updated by Olaf-van-der-Spek about 14 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.

Actions #4

Updated by sshore-iders about 14 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.

Actions #5

Updated by Olaf-van-der-Spek about 14 years ago

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

Actions #6

Updated by brad@comstyle.com about 14 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.

Actions #7

Updated by Olaf-van-der-Spek about 14 years ago

Is fixing pkg-config that hard?

Actions #8

Updated by ver almost 14 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.

Actions #9

Updated by gstrauss over 8 years ago

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

Updated by gstrauss over 8 years 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.

Actions #11

Updated by gstrauss over 8 years ago

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

Actions #12

Updated by gstrauss over 8 years ago

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

Also available in: Atom