<div dir="ltr"><div>I finally have a working recipe for getting Gitpod fired up with a pre-populated gdal docker image!</div><div><br></div><div>At Github repo root create .gitpod.yml:</div><div><br></div><div>

<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">image</span><span style="color:rgb(212,212,212)">:</span></div><div><span style="color:rgb(212,212,212)">  </span><span style="color:rgb(86,156,214)">file</span><span style="color:rgb(212,212,212)">: </span><span style="color:rgb(206,145,120)">.gitpod.Dockerfile</span></div></div>

</div><div><br></div><div>And in .gitppod.Dockerfile:</div><div><br></div><div>

<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">FROM</span><span style="color:rgb(212,212,212)"> osgeo/gdal:ubuntu-small-latest</span></div><div><span style="color:rgb(86,156,214)">RUN</span><span style="color:rgb(212,212,212)"> uname -a && cat /etc/os-release</span></div><span style="color:rgb(86,156,214)">RUN</span><span style="color:rgb(212,212,212)"> apt-get update --fix-missing</span><div><span style="color:rgb(86,156,214)">RUN</span><span style="color:rgb(212,212,212)"> apt-get install -y sudo libproj-dev</span></div></div>

</div><div><br></div><div>And then launch <a href="https://gitpod.io/#https://github.com/PATH/TO/REPO">https://gitpod.io/#https://github.com/PATH/TO/REPO</a></div><div>Working example: <a href="https://gitpod.io/#https://github.com/maphew/gdal/tree/gitpod">https://gitpod.io/#https://github.com/maphew/gdal/tree/gitpod</a></div><div><br></div><div>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.</div><div><br></div><div>-matt<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 18, 2022 at 3:38 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Matt,</p>
    <p>you need to install the "libproj-dev" package.</p>
    <p>Looking at the CI build recipees is a source of good hints in
      general:
<a href="https://github.com/OSGeo/gdal/blob/6e6aff451dbcde450f051bff2f2e75ce6a4a3e6f/.github/workflows/cmake_builds.yml#L38" target="_blank">https://github.com/OSGeo/gdal/blob/6e6aff451dbcde450f051bff2f2e75ce6a4a3e6f/.github/workflows/cmake_builds.yml#L38</a>
      (this one has pretty much all the pre packaged dependencies. you
      don't need all that)</p>
    <p>Even<br>
    </p>
    <div>Le 18/02/2022 à 23:34, Matt Wilkie a
      écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div>This what I've come up with:</div>
          <div><br>
          </div>
          <div>
            <p><span><a href="https://gitpod.io" target="_blank">https://gitpod.io</a><span></span></span></p>
            <p><span>Create
                new >> search for gdal >> select OSGeo/gdal<span></span><br>
              </span></p>
            <p><br>
              <span> <span></span></span></p>
            <p><span>On
                launch:<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>-- Could NOT find PROJ
                (missing: PROJ_DIR)</span><span><span></span></span></p>
            <p><span>CMake Error at
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
                (message):</span><span><span></span></span></p>
            <p><span><span>  </span>Could NOT find PROJ (missing:
                PROJ_LIBRARY
                PROJ_INCLUDE_DIR) (Required is</span><span><span></span></span></p>
            <p><span><span>  </span>at least version "6.0")</span><span><span></span></span></p>
            <p><span>Call Stack (most
                recent call first):</span><span><span></span></span></p>
            <p><span><span> 
                </span>/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594
                (_FPHSA_FAILURE_MESSAGE)</span><span><span></span></span></p>
            <p><span><span>  </span>cmake/modules/packages/FindPROJ.cmake:57
                (find_package_handle_standard_args)</span><span><span></span></span></p>
            <p><span><span> 
                </span>cmake/helpers/CheckDependentLibraries.cmake:303
                (find_package)</span><span><span></span></span></p>
            <p><span><span>  </span>gdal.cmake:210 (include)</span><span><span></span></span></p>
            <p><span><span>  </span>CMakeLists.txt:206 (include)</span><span><span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>Attempted
                to remedy this with `</span><span>sudo apt install
                proj-bin</span><span>` but same error from `</span><span>cmake
                .</span><span>`<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>----------------------------------------------------------------------------------
                <span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>The
                below adapted from <a href="https://github.com/maphew/gdal/blob/pr-5281-redux/CONTRIBUTING.md" target="_blank">https://github.com/maphew/gdal/blob/pr-5281-redux/CONTRIBUTING.md</a><span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>cd /workspace/gdal</span><span><span></span></span></p>
            <p><span>./autogen.sh</span><span><span></span></span></p>
            <p><span>./configure
                --with-python</span><span><span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>Fails
                with "configure: error: PROJ 6 symbols not found".<span></span></span></p>
            <p><span>tried
                `sudo apt install proj-bin` and repeated above, same
                error.<span></span></span></p>
            <p><span>Version
                of proj that's installed with this is 6.3.1.<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>Try
                building Proj from source (takes awhile):<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>cd /workspace</span><span><span></span></span></p>
            <p><span>wget </span><span><a href="https://download.osgeo.org/proj/proj-6.3.1.tar.gz" target="_blank"><span>https://download.osgeo.org/proj/proj-6.3.1.tar.gz</span></a><span></span></span></p>
            <p><span>tar zxf proj-*.gz</span><span><span></span></span></p>
            <p><span>cd proj-6.3.1</span><span><span></span></span></p>
            <p><span>./configure</span><span><span></span></span></p>
            <p><span>make && sudo
                make install</span><span><span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>Now
                try again (takes much longer):<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>cd /workspace/gdal</span><span><span></span></span></p>
            <p><span>./autogen.sh</span><span><span></span></span></p>
            <p><span>./configure
                --with-python</span><span><span></span></span></p>
            <p><span>make -j8</span><span><span></span></span></p>
            <p><span>sudo make install</span><span><span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>It
                works!<span></span></span></p>
            <p><span> <span></span></span></p>
            <p><span>. scripts/setdevenv.sh</span><span><span></span></span></p>
            <p><span>gdalinfo --version</span><span><span></span></span></p>
            <p><span>GDAL
                3.5.0dev-39057d7396, released 2022/02/18</span></p>
            <p><br>
            </p>
            <p class="MsoNormal"><span><span>uname -a<br>
                  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</span>
              </span></p>
          </div>
        </div>
        <br>
        <div class="gmail_quote">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! :)<br>
        </div>
        <div class="gmail_quote"><br>
        </div>
        <div class="gmail_quote">-matt<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>