Re: [gdal-dev] Use GitPod for GDAL?

2022-02-22 Thread Matt Wilkie
I finally have a working recipe for getting Gitpod fired up with a
pre-populated gdal docker image!

At Github repo root create .gitpod.yml:

image:
  file: .gitpod.Dockerfile

And in .gitppod.Dockerfile:

FROM osgeo/gdal:ubuntu-small-latest
RUN uname -a && cat /etc/os-release
RUN apt-get update --fix-missing
RUN apt-get install -y sudo libproj-dev

And then launch https://gitpod.io/#https://github.com/PATH/TO/REPO
Working example:
https://gitpod.io/#https://github.com/maphew/gdal/tree/gitpod

There's still some things to sort out, like sudo doesn't work because it
asks for a password, but gdalinfo and friends are all there and happy.

-matt


On Fri, Feb 18, 2022 at 3:38 PM Even Rouault 
wrote:

> Matt,
>
> you need to install the "libproj-dev" package.
>
> Looking at the CI build recipees is a source of good hints in general:
> https://github.com/OSGeo/gdal/blob/6e6aff451dbcde450f051bff2f2e75ce6a4a3e6f/.github/workflows/cmake_builds.yml#L38
> (this one has pretty much all the pre packaged dependencies. you don't need
> all that)
>
> Even
> Le 18/02/2022 à 23:34, Matt Wilkie a écrit :
>
> This what I've come up with:
>
> https://gitpod.io
>
> Create new >> search for gdal >> select OSGeo/gdal
>
>
> On launch:
>
>
>
> -- Could NOT find PROJ (missing: PROJ_DIR)
>
> CMake Error at
> /home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
> (message):
>
>   Could NOT find PROJ (missing: PROJ_LIBRARY PROJ_INCLUDE_DIR) (Required
> is
>
>   at least version "6.0")
>
> Call Stack (most recent call first):
>
>   
> /home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594
> (_FPHSA_FAILURE_MESSAGE)
>
>   cmake/modules/packages/FindPROJ.cmake:57
> (find_package_handle_standard_args)
>
>   cmake/helpers/CheckDependentLibraries.cmake:303 (find_package)
>
>   gdal.cmake:210 (include)
>
>   CMakeLists.txt:206 (include)
>
>
>
> Attempted to remedy this with `sudo apt install proj-bin` but same error
> from `cmake .`
>
>
>
> --
>
>
>
>
> The below adapted from
> https://github.com/maphew/gdal/blob/pr-5281-redux/CONTRIBUTING.md
>
>
>
> cd /workspace/gdal
>
> ./autogen.sh
>
> ./configure --with-python
>
>
>
> Fails with "configure: error: PROJ 6 symbols not found".
>
> tried `sudo apt install proj-bin` and repeated above, same error.
>
> Version of proj that's installed with this is 6.3.1.
>
>
>
> Try building Proj from source (takes awhile):
>
>
>
> cd /workspace
>
> wget https://download.osgeo.org/proj/proj-6.3.1.tar.gz
>
> tar zxf proj-*.gz
>
> cd proj-6.3.1
>
> ./configure
>
> make && sudo make install
>
>
>
> Now try again (takes much longer):
>
>
>
> cd /workspace/gdal
>
> ./autogen.sh
>
> ./configure --with-python
>
> make -j8
>
> sudo make install
>
>
>
> It works!
>
>
>
> . scripts/setdevenv.sh
>
> gdalinfo --version
>
> GDAL 3.5.0dev-39057d7396, released 2022/02/18
>
>
> uname -a
> inux osgeo-gdal-j6a7bhjf0c8 5.13.0-1013-gcp #16-Ubuntu SMP Tue Jan 18
> 14:31:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
>
> I'm still unable to successfully install a python wheel of gdal-utils,
> because pip is calling g++ which in turn is not finding libgdal, but it
> still feels like significant progress to get this far! :)
>
> -matt
>
> ___
> gdal-dev mailing 
> listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Use GitPod for GDAL?

2022-02-18 Thread Even Rouault

Matt,

you need to install the "libproj-dev" package.

Looking at the CI build recipees is a source of good hints in general: 
https://github.com/OSGeo/gdal/blob/6e6aff451dbcde450f051bff2f2e75ce6a4a3e6f/.github/workflows/cmake_builds.yml#L38 
(this one has pretty much all the pre packaged dependencies. you don't 
need all that)


Even

Le 18/02/2022 à 23:34, Matt Wilkie a écrit :

This what I've come up with:

https://gitpod.io

Create new >> search for gdal >> select OSGeo/gdal


On launch:

-- Could NOT find PROJ (missing: PROJ_DIR)

CMake Error at 
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 
(message):


Could NOT find PROJ (missing: PROJ_LIBRARY PROJ_INCLUDE_DIR) (Required is

at least version "6.0")

Call Stack (most recent call first):

/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 
(_FPHSA_FAILURE_MESSAGE)


cmake/modules/packages/FindPROJ.cmake:57 
(find_package_handle_standard_args)


cmake/helpers/CheckDependentLibraries.cmake:303 (find_package)

gdal.cmake:210 (include)

CMakeLists.txt:206 (include)

Attempted to remedy this with `sudo apt install proj-bin` but same 
error from `cmake .`


-- 



The below adapted from 
https://github.com/maphew/gdal/blob/pr-5281-redux/CONTRIBUTING.md


cd /workspace/gdal

./autogen.sh

./configure --with-python

Fails with "configure: error: PROJ 6 symbols not found".

tried `sudo apt install proj-bin` and repeated above, same error.

Version of proj that's installed with this is 6.3.1.

Try building Proj from source (takes awhile):

cd /workspace

wget https://download.osgeo.org/proj/proj-6.3.1.tar.gz 



tar zxf proj-*.gz

cd proj-6.3.1

./configure

make && sudo make install

Now try again (takes much longer):

cd /workspace/gdal

./autogen.sh

./configure --with-python

make -j8

sudo make install

It works!

. scripts/setdevenv.sh

gdalinfo --version

GDAL 3.5.0dev-39057d7396, released 2022/02/18


uname -a
inux osgeo-gdal-j6a7bhjf0c8 5.13.0-1013-gcp #16-Ubuntu SMP Tue Jan 18 
14:31:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux



I'm still unable to successfully install a python wheel of gdal-utils, 
because pip is calling g++ which in turn is not finding libgdal, but 
it still feels like significant progress to get this far! :)


-matt

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Use GitPod for GDAL?

2022-02-18 Thread Matt Wilkie
This what I've come up with:

https://gitpod.io

Create new >> search for gdal >> select OSGeo/gdal


On launch:



-- Could NOT find PROJ (missing: PROJ_DIR)

CMake Error at
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
(message):

  Could NOT find PROJ (missing: PROJ_LIBRARY PROJ_INCLUDE_DIR) (Required is

  at least version "6.0")

Call Stack (most recent call first):

  
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594
(_FPHSA_FAILURE_MESSAGE)

  cmake/modules/packages/FindPROJ.cmake:57
(find_package_handle_standard_args)

  cmake/helpers/CheckDependentLibraries.cmake:303 (find_package)

  gdal.cmake:210 (include)

  CMakeLists.txt:206 (include)



Attempted to remedy this with `sudo apt install proj-bin` but same error
from `cmake .`



--




The below adapted from
https://github.com/maphew/gdal/blob/pr-5281-redux/CONTRIBUTING.md



cd /workspace/gdal

./autogen.sh

./configure --with-python



Fails with "configure: error: PROJ 6 symbols not found".

tried `sudo apt install proj-bin` and repeated above, same error.

Version of proj that's installed with this is 6.3.1.



Try building Proj from source (takes awhile):



cd /workspace

wget https://download.osgeo.org/proj/proj-6.3.1.tar.gz

tar zxf proj-*.gz

cd proj-6.3.1

./configure

make && sudo make install



Now try again (takes much longer):



cd /workspace/gdal

./autogen.sh

./configure --with-python

make -j8

sudo make install



It works!



. scripts/setdevenv.sh

gdalinfo --version

GDAL 3.5.0dev-39057d7396, released 2022/02/18


uname -a
inux osgeo-gdal-j6a7bhjf0c8 5.13.0-1013-gcp #16-Ubuntu SMP Tue Jan 18
14:31:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I'm still unable to successfully install a python wheel of gdal-utils,
because pip is calling g++ which in turn is not finding libgdal, but it
still feels like significant progress to get this far! :)

-matt
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Use GitPod for GDAL?

2022-02-18 Thread Matt Wilkie
Hi,

Does anyone know how to use https://gitpod.io to set up a gdal development
environment? I'm wondering if that might be an easy path for Windows folk
like myself to test changes against linux (e.g. like this one
https://github.com/OSGeo/gdal/pull/5296#issuecomment-1037141210).

I've tried creating one straight from Github repo using the GitPod browser
extension for Firefox. It appears to work quite well but there are errors
indicating some dependencies are missing.

No PROJ_DIR being the first. I attempted to remedy that with:

sudo apt-get install proj-bin

which worked well enough, but then "Could not find gdal-config. Make sure
you have installed the GDAL native library and development headers." and so
on when attempting to install python wheel.

-matt
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev