Project

General

Profile

Actions

Bug #3190

closed

[PATCH] --with-pcre2 configured to incorrect path

Added by giliy almost 2 years ago. Updated almost 2 years ago.

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

Description

1. Using `./configure --with-zlib=<PATH>` fails to direct the GCC `-I` and `-L` flags to the correct sub-folders
2. Using `./configure --with-pcre2=<PATH>` wrongly points its GCC `-I` flag using `-I${WITH_PCRE}` instead of `-I${WITH_PCRE2}`

diff --git a/configure.ac b/configure.ac
index 8aa15dad..d3961c44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -890,7 +890,7 @@ AC_MSG_RESULT([$WITH_PCRE2])
 if test "$WITH_PCRE2" != no && test "$WITH_PCRE" = "no"; then
   if test "$WITH_PCRE2" != yes; then
     PCRE_LIB="-L$WITH_PCRE2/lib -lpcre2-8" 
-    CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include" 
+    CPPFLAGS="$CPPFLAGS -I$WITH_PCRE2/include" 
   else
     PKG_CHECK_MODULES([PCRE2],[libpcre2-8],[
       PCRE_LIB="$PCRE2_LIBS" 
@@ -949,8 +949,8 @@ AC_MSG_RESULT([$WITH_ZLIB])

 if test "$WITH_ZLIB" != no; then
   if test "$WITH_ZLIB" != yes; then
-    Z_LIB="-L$WITH_ZLIB -lz" 
-    CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB" 
+    Z_LIB="-L$WITH_ZLIB/lib -lz"                                                                                                                                                                         
+    CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB/include"                                                                                                                                                            
   else                                                                                                                                                                                                   
     AC_CHECK_HEADERS([zlib.h], [],                                                                                                                                                                       
       [AC_MSG_ERROR([zlib headers not found, install them or build without --with-zlib])]
Actions #1

Updated by gstrauss almost 2 years ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.xx to 1.4.69

Thank you. It appears the mistake with zlib is replicated to quite a few other packages, too, if --with-xxxx=/path/to/yyyy is specified.

Actions #2

Updated by gstrauss almost 2 years ago

The typo in the PCRE2 path is a bug and will be fixed.

I do not think that I should change the zlib or other paths.

You see, if I build zlib, but do not make install zlib, then --with-zlib=/path/to/zlib-1.2.13 points to the build area and I, the builder, am responsible for packaging up and distributing the libraries for use at runtime. The zlib headers and library are in the top level of the zlib source tree if I build zlib in-place.

Your proposed change is correct if I run make install from the zlib build, and then point lighttpd to --with-zlib=/path/to/install-prefix for /path/to/install-prefix/lib and /path/to/install-prefix/include

While I think your suggestion is a good approach, me making your proposed change may break other already-existing build build scripts out there.

Also, if you do build your dependencies and install them to an alternative location before building lighttpd, you can easily specify a single path to CPPFLAGS=-I/path/to/install-prefix/include LDFLAGS=-L/path/to/install-prefix/lib ./configure --with-zlib --with-... without needing to specify per-dependency --with-zlib=/path/to/zlib-install-prefix/lib ...

Therefore, I am going to pick up the PCRE2 misspelling change, but am going to leave the zlib path alone.

WDYT?

Actions #3

Updated by gstrauss almost 2 years ago

  • Subject changed from [PATCH] --with-zlib and --with-pcre2 configured to incorrect paths to [PATCH] --with-pcre2 configured to incorrect path
Actions #4

Updated by gstrauss almost 2 years ago

  • Status changed from Patch Pending to Fixed
Actions

Also available in: Atom