[MapServer-users] Swig Mapscript Still Fails to Build with PHP 8

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Sep 28 13:16:30 PDT 2022


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
> 
> ------------------------------------------------------------------------
> *From:* MapServer-users <mapserver-users-bounces at lists.osgeo.org> on 
> behalf of Jeff McKenna <jmckenna at gatewaygeomatics.com>
> *Sent:* Tuesday, September 27, 2022 6:11 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,
> 
> Thanks for starting this discussion here, as many other readers will
> help & learn from your situation; I first want to wish you a warm
> welcome from the MapServer community :)
> 
> As Seth mentioned, I spent a lot of effort setting up the automated PHP
> 8 + MapServer 8 builds "on the cloud", and some of those steps can be
> used by you directly.
> 
> But to step back a bit, first thing to mention is that PHP 8 with
> MapServer 8 is best handled through the SWIG library "master" branch,
> and this is likely one of your issues (the Homebrew formula you are
> using for SWIG is probably SWIG 4.0.x, and you need the upcoming 4.1.0
> release, or build its master branch from source).
> 
> Regarding the SWIG 4.1.0 upcoming release (and its heavy demand), see my
> call for help at
> https://lists.osgeo.org/pipermail/mapserver-dev/2022-September/016881.html <https://lists.osgeo.org/pipermail/mapserver-dev/2022-September/016881.html>
> 
> Regarding you possibly compiling SWIG 'master' branch, you can follow my
> exact steps to do this on these lines:
> https://github.com/MapServer/MapServer/blob/main/ci/travis/before_install.sh#L38-L47 <https://github.com/MapServer/MapServer/blob/main/ci/travis/before_install.sh#L38-L47>
> (maybe other Mac devs can update those steps here in this discussion
> thread for you)
> 
> I personally think all this will take some time before all packagers
> catch up to these changes, to make it smooth for their users.  In this
> case some time is required before the next SWIG can be released, and
> then propagated to all those FOSS4G packages that we love.
> 
> Its for this exact reason that I have put almost my entire career into
> MS4W, to prevent users from facing these same build challenges (and
> there are many challenges, ha).
> 
> I'm not sure that I've helped with this response, other than giving you
> some background info.
> 
> Don't be discouraged, you will indeed fall in love with MapServer :)
> 
> Thanks,
> 
> -jeff
>





More information about the MapServer-users mailing list