[Xastir] FreeBSD port for Xastir 2.1.4 submitted.

Tom Russo russo at bogodyn.org
Tue Jul 16 18:40:42 PDT 2019


Sorry for spamming BSD-Hams with this, but I've got more to report on the IM
issue.  And the original query about whether Xastir could use IM7 came 
through there.

I got the git version of Xastir so that it would at least *try* to build with
ImageMagick 7 and hit a showstopper:  got many, many compile failures, even
after having gotten rid of all the ImageMagick 6 deprecation warnings
(there were only a few).  That allowed me to close issue #150 (get rid
of the deprecation warnings), but I've got to leave #148 (support IM 7) 
for someone else to dig into later.

I believe that the real reason I couldn't build Xastir with ImageMagick 7 is
not that IM7 is incompatible with IM 6, but that FreeBSD's ImageMagick 7 port
has HDRI support on by default, and no other IM port in the past had that.

Xastir is absolutely, positively, and totally incompatible with any version 
of ImageMagick that has HDRI support turned on, and probably will never be 
compatible with that option.  All the map drawing code that uses
Magick would have to be completely rewritten, and it would be pointless to do 
so --- map images are almost never going to be high dynamic range images that 
would justify that effort.  IM's HDRI feature has bitten us before, and there 
is even a note in our FAQ about it.

There is a port option on BSD to build IM7 without that option, but odds
are good that if one is using pre-packaged IM7 rather than building from the
ports tree one would be stuck with it.  Not sure there's any way to make
the Xastir port depend on a specific build option of the IM7 port.

Bottom line for the BSD port:  either make the port explicitly depend on 
IM6, or go back to the original plan of just using GM and gcc, or
structure the port so that the user can choose which poison to swallow.  

Neither way is truly ideal, but given that IM7's port maintainer decided to 
make HDRI support the default and GM's port maintainer decided to depend on 
GOMP (and therefore gcc), it's the only way forward.

I just made a pull request to clear out all the remaining IM 6 deprecation
warnings, and in doing so added a configure test that checks ImageMagick's
version before deciding it's OK to use it --- if that version is greater
than 7.0.0, we refuse to try.

At some point in the future it might be worthwhile to explore whether this
check could be taken out and replaced with a check of whether IM was compiled
with HDRI.  It *might* be possible to build Xastir with IM7 that doesn't have
that option.  I've run out of time to play with it.  At least I've cleared
the path for someone else to experiment with it.  There's just a small block
of acinclude.m4 that could be taken out to let configure *try* to use IM7
(or simply modified to check the version against 0x0800 instead of 0x0700),
and if it builds without HDRI, hooray.  Then one would have to figure out
how to make a configure-time check of that feature, so we can reject it at 
configure time instead of via compile failures.

On Tue, Jul 16, 2019 at 11:24:33AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> Alas, and alack, while it was indeed simple to patch up configure to
> use MagickCore-config if it exists, the end result was a complete failure 
> when using ImageMagick7.  They apparently deprecated and removed the main
> header file we use to access the ImageMagick API, "magick/api.h".  They don't
> even mention *THAT* mess in their porting document.
> 
> This suggests that getting Xastir to build with ImageMagick7 may be a big
> effort.
> 
> https://github.com/Xastir/Xastir/issues/148
> 
> So there you have it.  Yes, Xastir only works with versions of IM up to 6,
> and that will probably stay the case for a while.
> 
> On Tue, Jul 16, 2019 at 11:06:02AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > Turns out Magick-config was deprecated in ImageMagick6, and they want us to
> > use MagickCore-config instead.
> > 
> > I confirmed that the flags returned by FreeBSD's Magick-config for IM6 
> > are identical to those returned by MagickCore-config.
> > 
> > Magick-config was removed in IM7.
> > 
> > This is probably a simple matter to fix in Xastir's configure script, just
> > a matter of searching for MagickCore-config and using it if it's found,
> > and only searching for and using Magick-config if the new one isn't (indicating
> > a really old IM install).
> > 
> > We won't do a quickie release to address *this* issue.  But it should be 
> > fairly simple to get going, and then it's a matter of figuring out if doing it
> > actually lets us work with IM7, too.
> > 
> > I've opened an issue on github for it:
> > 
> > https://github.com/Xastir/Xastir/issues/147
> > 
> > On Tue, Jul 16, 2019 at 10:07:44AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > > I lied.  I went ahead and deinstalled inkscape and IM6, then installed IM7
> > > to test if Xastir could work with it.
> > > 
> > > I can indeed confirm that at this time Xastir won't build against ImageMagick7
> > > just yet.  It's not clear exactly whether it COULD work, but at this point
> > > configure isn't even able to tell it exists.
> > > 
> > > Xastir's configure script uses the "Magick-config" script that
> > > ImageMagick6 installs to determine the CFLAGS, LDFLAGS, and LIBS needed to
> > > link against Magick libraries, and ImageMagick7 has replaced that script
> > > with three different ones, and it is not clear which one corresponds to what
> > > we need at this point.  In order to support Magick7 we'll have to figure
> > > out which of those three scripts actually gives the correct values for us
> > > to find the appropriate libraries and headers to get the "WriteImage" function
> > > linked in (which is what configure tests for), *AND* confirm whether anything 
> > > we're doing with Magick uses features they deprectated in 6 and removed in IM7.
> > > 
> > > The good news is that we had a little fire drill for the last release where
> > > we rooted out all the deprecation warnings, and that may save us here if
> > > we can get the right LIBS, LDFLAGS, and CFLAGS out of some Magick*-config
> > > script.
> > > 
> > > Hooray for IM.  It may be just a matter of adjusting configure to look
> > > for extra scripts (MagickWand-config?), or it may be a deeper problem.  At
> > > any rate, we'll certainly not get it solved today.
> > > 
> > > For now, you are probably best either forcing a dependency on IM6 for the BSD
> > > port (just as the Inkscape port does at the moment) *OR* go back to the old 
> > > plan of using GM and gcc.
> > > 
> > > As someone who has carefully avoided ever volunteering to maintain any ports, I
> > > don't know how difficult this will be, but I recommend that you craft your
> > > port so the user has the option of installing it with either IM6 or GM.  
> > > Naturally, the GM selection will force you to use gcc, but this is the only
> > > option available for getting a real, functional Xastir if IM7 is already 
> > > installed.
> > > 
> > > We'll have to dig a little to see if we can make IM7 work with Xastir, but 
> > > I wouldn't count on it happening fast enough to address your immediate concerns
> > > of getting the BSD port updated and unbroken.
> > > 
> > > On Tue, Jul 16, 2019 at 08:20:25AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > > > On Tue, Jul 16, 2019 at 06:21:50PM +1000, we recorded a bogon-computron collision of the <carl at stagecraft.cx> flavor, containing:
> > > > > Hi Tom,
> > > > > 
> > > > > > On 16 Jul 2019, at 12:14 pm, Tom Russo <russo at bogodyn.org> wrote:
> > > > > > 
> > > > > > Years ago, ImageMagick was so frequently breaking their API that we went to
> > > > > > preferring GraphicsMagick -- if configure detects both, it uses GraphicsMagick.
> > > > > > But if only IM is installed, or if both are installed and GM doesn't work,
> > > > > > we use IM.
> > > > > 
> > > > > FreeBSD now has both v6 and v7 of ImageMagick in ports.  it looks to me like Xastir only supports ImageMagick v6?  Can you confirm that?
> > > > 
> > > > I can't confirm at the moment.  My system has Magick6 installed to satisfy
> > > > the inkscape dependency, and I can't play around right now to test if Xastir
> > > > will build against Magick7, or dig into the differences between 6 and 7 to
> > > > see if Xastir is doing anything screwy with deprecated Magick6 features that
> > > > were removed in 7.
> > > > 
> > > > -- 
> > > > Tom Russo    KM5VY
> > > > Tijeras, NM  
> > > > 
> > > >  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
> > > 
> > > -- 
> > > Tom Russo    KM5VY
> > > Tijeras, NM  
> > > 
> > >  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
> > > 
> > > _______________________________________________
> > > Xastir mailing list
> > > Xastir at lists.xastir.org
> > > http://xastir.org/mailman/listinfo/xastir
> > 
> > -- 
> > Tom Russo    KM5VY
> > Tijeras, NM  
> > 
> >  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
> 
> -- 
> Tom Russo    KM5VY
> Tijeras, NM  
> 
>  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

-- 
Tom Russo    KM5VY
Tijeras, NM  

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir mailing list