<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Jeff, I appreciate your advice, but I solved the problem with a
hack, and to be honest, CMAKE error handling is above me. I am still
from the ./configure generation :-)<br>
<br>
I added these two lines to MapServer's CMAKE call:<br>
<br>
-DPHP_INCLUDE_PATH=$INSTALLBIN/include/php/main \<br>
-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829<br>
<br>
I also had to add these lines to GEOS's CMAKE, after
-DCMAKE_INSTALL_PREFIX=$INSTALLBIN -DCMAKE_PREFIX_PATH=$INSTALLBIN
\<br>
<br>
-DCMAKE_LIBRARY_PATH=$INSTALLBIN/lib \<br>
-DINCLUDE_DIRECTORIES=$INSTALLBIN/include \<br>
<br>
I guess CMAKE does not propagate its dependencies very well from the
general INSTALL_PREFIX.<br>
<br>
But this still didn't work. The php includes in other subdirectories
than main weren't found. Those subdirectories should have been added
to the include path, but weren't. So I copied the complete php
include directory to /usr/include (O horror! :-)) .<br>
<br>
Of course a Docker installation would be easier, as you can install
everything in standard locations. But I want to have a real
dedicated server with just the software I need and nothing more. I
have worked for a long time with the UbuntuGIS packages, but they
are not supported very well.<br>
<br>
Thanks for your advice!<br>
<br>
Jan <br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 18/10/2023 19:11, Jeff McKenna via
MapServer-users wrote:<br>
<br>
Hi Jan,
<br>
<br>
I understand that you won't listen to my advice here, no problem
at all. But I won't repeat myself here 🙂
<br>
<br>
Enjoy your afternoon,
<br>
<br>
-jeff</div>
<blockquote type="cite"
cite="mid:b0747fe6-65e6-4a91-8d9b-8419d46b0747@gatewaygeomatics.com">On
2023-10-18 1:39 p.m., Jan Hartmann wrote:
<br>
<blockquote type="cite" style="color: #007cff;">I compiled with:
<br>
<br>
-DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
<br>
-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829
<br>
<br>
and got lots of error messages about missing .h files (php.h,
zend.h etc). I bulk copied them all to the directory in the
build tree where the errors came from, and got a complete build,
including "php_mapscriptng.so"
<br>
<br>
So CMAKE is still missing the php include directories. What is
de correct DEFINE for that?
<br>
<br>
After I copied php_mapscriptng.so to the correct location and
filling in php.ini, I got a warning when starting PHP :
<br>
<br>
Startup: Unable to load dynamic library 'php_mapscriptng.so'
(tried:
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so
(libgeos.so.3.12.0: cannot open shared object file: No such file
or directory)
<br>
<br>
But it <b class="moz-txt-star"><span class="moz-txt-tag">*</span>is<span
class="moz-txt-tag">*</span></b> in that location. Any idea?
<br>
<br>
On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:
<br>
<blockquote type="cite" style="color: #007cff;">Hi Jan,
<br>
<br>
Unfortunately I have much experience tracking down CMake
errors now, ha.
<br>
<br>
Instead of the error log, scroll up and read the output from
your cmake command (as it does its checks and looks for
libraries), I find examining that output is crucial (and I
personally find the actual generated log file is filled of
fake/"red-herrings"). Focus instead on going line-by-line
through that cmake output, as it makes its way down to the
final "configuring incomplete" message. (for packaging, this
is what I do, line-by-line)
<br>
<br>
For example, if you are trying to enable the GEOS library, I
would go line-by-line of the output and find where it was
looking for GEOS initially, and read the messages in that
section, to confirm that there are no issues when enabling
GEOS. This is crucial.
<br>
<br>
It takes much time to do this for each library.
<br>
<br>
In my case, for PHPNG support, my CMake command includes:
"-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
<br>
<br>
In your case I am not sure, but, I would start by examining
line-by-line the CMake output before the words "Configuring
incomplete" (and totally ignoring the generated 'output'
file).
<br>
<br>
Maybe you can find the PHPNG section in your cmake command
output, and paste that here for the community to review.
<br>
<br>
-jeff
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________
<br>
MapServer-users mailing list
<br>
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:MapServer-users@lists.osgeo.org"
moz-do-not-send="true">MapServer-users@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext"
href="https://lists.osgeo.org/mailman/listinfo/mapserver-users"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote>
<br>
</body>
</html>