[MapServer-users] Swig Mapscript Still Fails to Build with PHP 8
b g
mapserverlearn at outlook.com
Wed Sep 28 13:34:23 PDT 2022
Jeff,
I think I figured out what I was missing earlier regarding the build. Those lines you provided me for the Swig setup provided a successful build for cmake to compile.
As of right now, I have:
mapserv -v
MapServer version 8.0.0
php -v
PHP 8.0.23
With a warning
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: /usr/local/lib/php/pecl/20190902/php_mapscriptng.so (dlopen(/usr/local/lib/php/pecl/20190902/php_mapscriptng.so, 9): image not found), /usr/local/lib/php/pecl/20190902/php_mapscriptng.so.so (dlopen(/usr/local/lib/php/pecl/20190902/php_mapscriptng.so.so, 9): image not found)) in Unknown on line 0
and
swig -version
SWIG Version 4.1.0
However, I think I'm still missing something (possibly related to the PHP warning above). The page is unable load due to -- I'm guessing the Swig Mapscript library being unable to be referenced. I looked in the README files provided within the MapServer directory and within the README.rst it says:
"The main MapScript SWIG interface file is ``mapscript/mapscript.i``. This
file includes specific class interface files from ``mapscript/swiginc`` and
language specific code from the language directories."
So I added that in an include statement at the top of the PHP index file but it still doesn't work. Is the mapscript.i file what is supposed to replace the mapscript.php file? I know you are on the Windows side of things so hopefully if you don't know the answer to this question then maybe someone else will.
And thank you for the link to the wiki page. I have a very detailed guide (that I have been polishing as I go along) that I will add to that page for other mac users.
Thanks,
bg
________________________________
From: MapServer-users <mapserver-users-bounces at lists.osgeo.org> on behalf of Jeff McKenna <jmckenna at gatewaygeomatics.com>
Sent: Wednesday, September 28, 2022 3:16 PM
To: mapserver-users at lists.osgeo.org <mapserver-users at lists.osgeo.org>
Subject: Re: [MapServer-users] Swig Mapscript Still Fails to Build with PHP 8
Hi BG,
I've added a wiki page for this, that includes macOS specific steps to
compile SWIG from source, at
https://github.com/MapServer/MapServer/wiki/Compiling-SWIG-from-source
I strongly encourage you to edit and enhance that page, make
corrections, and/or create new wiki pages and share them here, to record
your steps so that others can learn from your journey.
(you can then add your new pages to the "Tips, Tricks, Howtos" section
of https://github.com/MapServer/MapServer/wiki )
Thanks,
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/
On 2022-09-28 12:48 p.m., b g wrote:
> Hi Jeff,
>
> Thanks for your response. It was indeed helpful and gave me something to
> try out. However, when I try those lines of code, this is what it says:
>
> Looking for PCRE2 tarball...
>
> ls: pcre2-*.tar*: No such file or directory
>
> Could not find tarball matching pattern: pcre2-*.tar*
>
> admin at Administrators-Mac swig-git-master % ./autogen.sh
>
> + test -d Tools/config
>
> + aclocal -I Tools/config
>
> ./autogen.sh: line 11: aclocal: command not found
>
> admin at Administrators-Mac swig-git-master % ./configure --prefix=/usr
>
> zsh: no such file or directory: ./configure
>
> admin at Administrators-Mac swig-git-master % make
>
> make: *** No targets specified and no makefile found.Stop.
>
>
> Are there any other lines that I need to include with those? The first
> few run just fine (although I needed to replace 'wget' with 'curl'). And
> does this replace the use of the Github clone for MapServer 8.0? Or is
> this supposed to be setup in conjunction with MapServer 8.0?
>
> Thanks again for your help,
>
> bg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220928/639e321c/attachment.htm>
More information about the MapServer-users
mailing list