New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gd version checking code is wrong #4696
Comments
|
The test is indeed wrong. Here is an untested patch to configure.in that should fix this: diff --git a/configure.in b/configure.in
index a8ffbcf..fff6b95 100755
--- a/configure.in
+++ b/configure.in
@@ -506,8 +506,9 @@ AC_DEFUN([MS_CHECK_GD],[
fi
-
- if test $GDMAJOR -lt 2 -o $GDMINOR -lt 0 -o $GDREV -lt 28 ; then
+ $GDVERSION_NUM=`expr $GDMAJOR \* 1000000 \+ $GDMINOR \* 1000 \+ $GDREV`
+ $GDVERSION_REQ=`expr 2 \* 1000000 \+ 0 \* 1000 \+ 28`
+ if test $GDVERSION_NUM -lt $GDVERSION_REQ ; then
AC_MSG_ERROR([GD version $GDVERSION too old. need at least 2.0.28])
fi
(Need to run autoconf after patching configure.in for the change to take effect) |
|
Almost! This works: --- a/configure.in
+++ b/configure.in
@@ -506,8 +506,9 @@ AC_DEFUN([MS_CHECK_GD],[
fi
-
- if test $GDMAJOR -lt 2 -o $GDMINOR -lt 0 -o $GDREV -lt 28 ; then
+ GDVERSION_NUM=`expr $GDMAJOR \* 1000000 \+ $GDMINOR \* 1000 \+ $GDREV`
+ GDVERSION_REQ=`expr 2 \* 1000000 \+ 0 \* 1000 \+ 28`
+ if test $GDVERSION_NUM -lt $GDVERSION_REQ ; then
AC_MSG_ERROR([GD version $GDVERSION too old. need at least 2.0.28])
fi |
|
mldonkey's configure script has a similar error, so I ported your solution to their code and submitted a bug report. They found that this method doesn't work when the gd version number isn't completely numeric. For example, the lastest development verison of gd2 reports its version as "2.1.1-dev", which leads |
|
I'll apply a working patch if someone wants to come up with one. (not high priority for me, given GD will be completely dropped soon) |
|
Oh I see. Well the developers of mldonkey committed what seems to be a working version to their project; I'm sure it could be easily adapted to mapserver. |
|
@ryandesign if you're interested in having this in 6.2.x or 6.4, the safest solution is to provide a hassle-free pull request I can apply. |
|
This does not apply to the 6.4 release, as it doesn't use autoconf anymore. Milestoning for 6.2.x for now, awaiting a working patch to move forward. |
|
Confirming that newer GD library versions are correctly detected with the cmake build |
|
Support for GD renderer removed in MS 7.0: http://mapserver.org/development/rfc/ms-rfc-99.html |
Configuring mapserver 6.2.1 with gd 2.1.0 leads to:
The text was updated successfully, but these errors were encountered: