[GRASS-dev] Re: testing new svn

[I took liberty to cc grass-dev]

Michael,

2008/2/17, Michael Barton <michael.barton@asu.edu>:

>> When I included --with-wxwidgets, I got the following config error
>> checking for wx-config... /usr/bin/wx-config
>> checking wxWidgets version... 2.5.3
>> configure: error: *** wxWidgets 2.8.1 or later is required.
>>
>> I check and it turns out I had a wx-config hidden away in
>> /usr/bin/wx-config. But it is old. No binaries since 2.5.3 (quite
>> awhile
>> back) have installed this. I looked at it and it is just a link to
>> a file
>> called mac-unicode-debug-2.5. This file seems to be a version of
>> wx-config.in created for Debian.
>>
>> Somehow, we need to get this working on non-Debian systems. Not
>> for 6.3.0,
>> but definitely for later versions.

Martin:

> I am not sure if I am getting the point, you can define alternative
> location of wx-config. So find your wx-config for 2.8 and run
> --with-wxwidgets=path/to/your/wx-config

The problem is that the Mac doesn't have a wx-config. This file seems
to be Debian specific, or at least Linux specific.

no, wx-config is not at least Debian or GNU/Linux specific in general.
However I downloaded wxWidgets source code for Windows/Mac/All and I
found template for wx-config so I would expect you have wx-config on
your system too.

/home/martin/smetiste/wxMac-2.8.7/wx-config.in
/home/martin/smetiste/wxMac-2.8.7/wx-config-inplace.in
/home/martin/smetiste/wxMSW-2.8.7/wx-config.in
/home/martin/smetiste/wxMSW-2.8.7/wx-config-inplace.in
/home/martin/smetiste/wxWidgets-2.8.7/wx-config.in
/home/martin/smetiste/wxWidgets-2.8.7/wx-config-inplace.in

have a file or files that are functionally similar named
build_options.py and config.py in /Library/Frameworks/
Python.frameworks/Versions/current/lib/python2.5/site-packages/wx-2.8-
mac-unicode/wx/build/

Note that wx-config is part of wxWidgets not wxPython.

I'm attaching them here to see if they are functionally equivalent or
not. Note that the path I gave is specific to a Python 2.5 unicode
installation with wxPython 2.8.

If looking for wx-config is simply to ascertain that wxPython does
indeed exist and checking its version, this should be doable in more
generic ways (e.g., I have a __version__.py file for wx that has this
information). If we need to access the information in wx-config, then
that too should be doable in a more generic, non-hard coded way. I
realize that it's not much help to just say something doesn't work
and not be able to suggest what does work.

Maybe Glynn can help with this. It's still not clear to me what
specifically is needed to to compile vdigit. I did get the few extra
headers from the wxPython source. Maybe all I need is a path to
these. Or maybe it needs more. I can try to see if there are
equivalents already on my system if I know what I'm looking for.
William Kyngesbury may be able to help with this too, as he is more
familiar with configuration issues on a Mac than I am. Getting this
to work generically across Linux and Mac will be a big help to making
it work on Windows too. Windows may have a wx-config, but it's
probably not in /usr/bin.

This will be something to work on for the next GRASS version.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

On Feb 17, 2008, at 11:15 AM, Martin Landa wrote:

[I took liberty to cc grass-dev]

Michael,

2008/2/17, Michael Barton <michael.barton@asu.edu>:

When I included --with-wxwidgets, I got the following config error
checking for wx-config... /usr/bin/wx-config
checking wxWidgets version... 2.5.3
configure: error: *** wxWidgets 2.8.1 or later is required.

I check and it turns out I had a wx-config hidden away in
/usr/bin/wx-config. But it is old. No binaries since 2.5.3 (quite
awhile
back) have installed this. I looked at it and it is just a link to
a file
called mac-unicode-debug-2.5. This file seems to be a version of
wx-config.in created for Debian.

Somehow, we need to get this working on non-Debian systems. Not
for 6.3.0,
but definitely for later versions.

Martin:

I am not sure if I am getting the point, you can define alternative
location of wx-config. So find your wx-config for 2.8 and run
--with-wxwidgets=path/to/your/wx-config

The problem is that the Mac doesn't have a wx-config. This file seems
to be Debian specific, or at least Linux specific.

no, wx-config is not at least Debian or GNU/Linux specific in general.
However I downloaded wxWidgets source code for Windows/Mac/All and I
found template for wx-config so I would expect you have wx-config on
your system too.

/home/martin/smetiste/wxMac-2.8.7/wx-config.in
/home/martin/smetiste/wxMac-2.8.7/wx-config-inplace.in
/home/martin/smetiste/wxMSW-2.8.7/wx-config.in
/home/martin/smetiste/wxMSW-2.8.7/wx-config-inplace.in
/home/martin/smetiste/wxWidgets-2.8.7/wx-config.in
/home/martin/smetiste/wxWidgets-2.8.7/wx-config-inplace.in

Yes. I know that this is in the source code. But it is not in the Mac binary. That is, apparently it does not get built for Mac. I have not built this myself from source, however. Perhaps it gets built under some circumstances and not under others on Mac

have a file or files that are functionally similar named
build_options.py and config.py in /Library/Frameworks/
Python.frameworks/Versions/current/lib/python2.5/site-packages/wx-2.8-
mac-unicode/wx/build/

Note that wx-config is part of wxWidgets not wxPython.

Right. I realize that to get wxPython, you also need wxWidgets on Linux. On the Mac, this is not a separate install. However, I'm not sure, but I think that wxWidgets comes packaged with the wxPython binaries for Mac. I have a folder /Library/Frameworks/.../wxpython that holds the wxPython stuff and another /Library/Frameworks/.../wx that I *think* is wxWidgets stuff. But none of them have wx-config.

Looks like there are only wxWidgets binaries for Debian and Ubuntu. None for Mac or other platforms (maybe a special installer for Windows).

I'm trying to see if there is some way to compile vdigit for the Mac without having to compile the entire wxWidgets package (or wxPython) from source. Among other things, I'm worried what this might do to my existing wxPython (and I think wxWidgets) installation. This is why it is important to find out exactly which files vdigit actually needs in order to compile. Maybe I (and all other people with Mac installs) already have those files. If not, the next question is do we need to compile something from source to get them (I hope not), or can we just grab them from source (e.g., *.h header files)?

Michael

I'm attaching them here to see if they are functionally equivalent or
not. Note that the path I gave is specific to a Python 2.5 unicode
installation with wxPython 2.8.

If looking for wx-config is simply to ascertain that wxPython does
indeed exist and checking its version, this should be doable in more
generic ways (e.g., I have a __version__.py file for wx that has this
information). If we need to access the information in wx-config, then
that too should be doable in a more generic, non-hard coded way. I
realize that it's not much help to just say something doesn't work
and not be able to suggest what does work.

Maybe Glynn can help with this. It's still not clear to me what
specifically is needed to to compile vdigit. I did get the few extra
headers from the wxPython source. Maybe all I need is a path to
these. Or maybe it needs more. I can try to see if there are
equivalents already on my system if I know what I'm looking for.
William Kyngesbury may be able to help with this too, as he is more
familiar with configuration issues on a Mac than I am. Getting this
to work generically across Linux and Mac will be a big help to making
it work on Windows too. Windows may have a wx-config, but it's
probably not in /usr/bin.

This will be something to work on for the next GRASS version.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Michael Barton wrote:

> Note that wx-config is part of wxWidgets not wxPython.

Right. I realize that to get wxPython, you also need wxWidgets on
Linux. On the Mac, this is not a separate install.

FWIW, Gentoo's wxGTK ebuilds use the wxPython sources:

2.8.7.1:
  # we use the wxPython tarballs because they include the full wxGTK sources and
  # docs, and are released more frequently than wxGTK.
  SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2"

2.6.4.0:
  # we use the wxPython tarballs because they include the full wxGTK sources and
  # are released more frequently than wxGTK.
  SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2
      doc? ( mirror://sourceforge/wxwindows/wxWidgets-${BASE_PV}-HTML.tar.gz )"

If you install wxPython, it treats wxGTK as a separate dependency, but
they both get built from the same sources.

Looks like there are only wxWidgets binaries for Debian and Ubuntu.
None for Mac or other platforms (maybe a special installer for Windows).

I'm trying to see if there is some way to compile vdigit for the Mac
without having to compile the entire wxWidgets package (or wxPython)
from source. Among other things, I'm worried what this might do to my
existing wxPython (and I think wxWidgets) installation.

wxPython 2.5.3 onwards is designed to support having multiple versions
installed. So you should be able to have one <2.5.3 version and any
number of >=2.5.3 versions installed concurrently.

I have 2.4.2.4, 2.6.4.0 and 2.8.7.1, and haven't noticed any problems.

There is some information available at:

  http://wiki.wxpython.org/index.cgi/MultiVersionInstalls

--
Glynn Clements <glynn@gclements.plus.com>

On Feb 17, 2008, at 7:34 PM, Glynn Clements wrote:

Michael Barton wrote:

Note that wx-config is part of wxWidgets not wxPython.

Right. I realize that to get wxPython, you also need wxWidgets on
Linux. On the Mac, this is not a separate install.

FWIW, Gentoo's wxGTK ebuilds use the wxPython sources:

2.8.7.1:
  # we use the wxPython tarballs because they include the full wxGTK sources and
  # docs, and are released more frequently than wxGTK.
  SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2"

2.6.4.0:
  # we use the wxPython tarballs because they include the full wxGTK sources and
  # are released more frequently than wxGTK.
  SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2
      doc? ( mirror://sourceforge/wxwindows/wxWidgets-${BASE_PV}-HTML.tar.gz )"

If you install wxPython, it treats wxGTK as a separate dependency, but
they both get built from the same sources.

Looks like there are only wxWidgets binaries for Debian and Ubuntu.
None for Mac or other platforms (maybe a special installer for Windows).

I'm trying to see if there is some way to compile vdigit for the Mac
without having to compile the entire wxWidgets package (or wxPython)
from source. Among other things, I'm worried what this might do to my
existing wxPython (and I think wxWidgets) installation.

wxPython 2.5.3 onwards is designed to support having multiple versions
installed. So you should be able to have one <2.5.3 version and any
number of >=2.5.3 versions installed concurrently.

I have 2.4.2.4, 2.6.4.0 and 2.8.7.1, and haven't noticed any problems.

But these would be the same versions in different places. And I'm speaking of wxWidgets, not wxPython. How would a source build of wxWidgets interact or not interact with the wxWidgets pieces installed with wxPython? Maybe not a problem, but I don't know. If this situation can be avoided it would be nice.

FWIW, I emailed Robin Dunn to see if the dev package could be made available with the Mac binaries. I don't know whether Robin maintains the Mac binaries or it's someone else.

Michael

There is some information available at:

  http://wiki.wxpython.org/index.cgi/MultiVersionInstalls

--
Glynn Clements <glynn@gclements.plus.com>

Michael Barton wrote:

>>> Note that wx-config is part of wxWidgets not wxPython.
>>
>> Right. I realize that to get wxPython, you also need wxWidgets on
>> Linux. On the Mac, this is not a separate install.
>
> FWIW, Gentoo's wxGTK ebuilds use the wxPython sources:
>
> 2.8.7.1:
> # we use the wxPython tarballs because they include the full wxGTK
> sources and
> # docs, and are released more frequently than wxGTK.
> SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2"
>
> 2.6.4.0:
> # we use the wxPython tarballs because they include the full wxGTK
> sources and
> # are released more frequently than wxGTK.
> SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2
> doc? ( mirror://sourceforge/wxwindows/wxWidgets-${BASE_PV}-
> HTML.tar.gz )"
>
> If you install wxPython, it treats wxGTK as a separate dependency, but
> they both get built from the same sources.
>
>> Looks like there are only wxWidgets binaries for Debian and Ubuntu.
>> None for Mac or other platforms (maybe a special installer for
>> Windows).
>>
>> I'm trying to see if there is some way to compile vdigit for the Mac
>> without having to compile the entire wxWidgets package (or wxPython)
>> from source. Among other things, I'm worried what this might do to my
>> existing wxPython (and I think wxWidgets) installation.
>
> wxPython 2.5.3 onwards is designed to support having multiple versions
> installed. So you should be able to have one <2.5.3 version and any
> number of >=2.5.3 versions installed concurrently.
>
> I have 2.4.2.4, 2.6.4.0 and 2.8.7.1, and haven't noticed any problems.

But these would be the same versions in different places.

Right; that would conflict. AFAICT, the multi-version option only
applies to major versions; i.e. you can have 2.6.x and 2.8.x, but not
e.g. 2.8.7.0 and 2.8.7.1.

OTOH, I would be surprised if you have any external packages which use
wxWidgets 2.8.x; everyone else seems to be sticking with 2.6 for now.
If that's the case, then you should be free to do what you want with
2.8.

And I'm
speaking of wxWidgets, not wxPython. How would a source build of
wxWidgets interact or not interact with the wxWidgets pieces
installed with wxPython? Maybe not a problem, but I don't know. If
this situation can be avoided it would be nice.

wxWidgets is likely to be installed the same way regardless of whether
you build it separately or as part of of wxPython.

--
Glynn Clements <glynn@gclements.plus.com>

On 18/02/08 00:01, Michael Barton wrote:

I check and it turns out I had a wx-config hidden away in /usr/bin/wx-config. But it is old. No binaries since 2.5.3
(quite awhile back) have installed this. I looked at it and it
is just a link to a file called mac-unicode-debug-2.5. This
file seems to be a version of wx-config.in created for Debian.

On Feb 17, 2008, at 11:15 AM, Martin Landa wrote:

no, wx-config is not at least Debian or GNU/Linux specific in
general. However I downloaded wxWidgets source code for
Windows/Mac/All and I found template for wx-config so I would
expect you have wx-config on your system too.

/home/martin/smetiste/wxMac-2.8.7/wx-config.in /home/martin/smetiste/wxMac-2.8.7/wx-config-inplace.in /home/martin/smetiste/wxMSW-2.8.7/wx-config.in /home/martin/smetiste/wxMSW-2.8.7/wx-config-inplace.in /home/martin/smetiste/wxWidgets-2.8.7/wx-config.in /home/martin/smetiste/wxWidgets-2.8.7/wx-config-inplace.in

Yes. I know that this is in the source code. But it is not in the Mac
binary. That is, apparently it does not get built for Mac. I have
not built this myself from source, however. Perhaps it gets built
under some circumstances and not under others on Mac

Note that in Debian at least, wx-config does not exist either as a file.
It is only symlink which in my case points to:

/usr/lib/wx/config/gtk2-unicode-release-2.8

So, maybe you need to check whether you have a 2.8 equivalent of the mac-unicode-debug-2.5 file you mention above and then just link /usr/bin/wx-config to that.

In my installation, I currently have the following choices for alternative wx-configs:

$ sudo update-alternatives --config wx-config

Il y a 2 alternatives fournissant « wx-config ».

   Sélection Alternative
-----------------------------------------------
           1 /usr/lib/wx/config/base-unicode-release-2.8
*+ 2 /usr/lib/wx/config/gtk2-unicode-release-2.8

Moritz