[gdal-dev] Building GDAL with autoconf for Android on Windows

Kai Pastor, DG0YT dg0yt at darc.de
Sat Apr 1 01:27:41 PDT 2023


git bash, quotes, make, this seems to add a lot of complication when you 
could directly run cmake+ninja for fast builds on windows.

I think you shoudn't try to pass escaped quotes, but just quote the 
whole arguments as in

  ... "-DINST_DATA=/c/prefix_path/shared" 
"-DSYSCONF_DIR=/c/prefix_path/etc" ...

Regards, Kai


Am 31.03.23 um 02:28 schrieb Andrew Patterson:
> Hello!
>
> We've been using a custom CMakeLists.txt for years to build a subset 
> of GDAL for Android but I'm attempting to move us to building it 
> properly. Unfortunately, we can't move to 3.5+ quite yet (I'm hoping 
> soon) so I'm stuck with autoconf. I was happily surprised at how 
> quickly I passed through the configure step (many thanks Google's NDK 
> page with a very helpful autoconf section) but now I'm running into a 
> rather stupid blocker.
>
> I'm building this using git bash on a Windows machine, and I suspect 
> that's the root of my problem. Basically, when I run make on my 
> configured system, it screws up the quoting on INST_DATA & 
> SYSCONF_DIR. The command being executed looks something like:
>
> ... yada yada ... -DINST_DATA=\"/c/prefix_path/shared\" 
> -DSYSCONF_DIR=\"/c/prefix_path/etc\"
>
> If I copy the command being executed and change that part to:
>
> ... yada yada ... -DINST_DATA="\"/c/prefix_path/shared\"" 
> -DSYSCONF_DIR="\"/c/prefix_path/etc\""
>
> It works. It also works if fully remove the defines for INST_DATA & 
> SYSCONF_DIR, which I know is safe because we never defined those in 
> our old CMakeLists.txt and everything worked fine (we were specifying 
> the properly locations ahead of time so it never needed to look in any 
> default places).
>
> Now, obviously manually copying the commands isn't the right fix, but 
> maybe someone knows how to fix the quoting? Or, frankly, is there an 
> option I'm missing (or some other magic trick) to tell it not to 
> include INST_DATA or SYSCONF_DIR at all?
>
> Any help here would be greatly appreciated! This looked like it was 
> going to be a quick job and it turned into a frustrating full-day 
> failure :(
>
> Avenza Systems Logo 
> <https://www.google.com/url?q=https://www.avenza.com/&source=gmail-html&ust=1678977468213000&usg=AOvVaw3ajVwWQPLnJ8kVQuKtUNKi> 
> 	
>
> *Andrew Patterson*
> Desktop Lead Architect
>
> +1 (416) 487-5116 x401
> 84 Merton St., Toronto, ON, M4S 1A1
>
> ///supply.founders.outreach 
> <https://www.google.com/url?q=https://www.avenza.com/about/contact/&source=gmail-html&ust=1678977468213000&usg=AOvVaw0_nt7MnUyk1lGZCRk6wICQ>
>
> AvenzaUC2023 Banner 
> <https://www.google.com/url?q=https://www.avenza.com/user-conference/&source=gmail-html&ust=1678977468213000&usg=AOvVaw2Uj9MQv3vk5IzdDU7m0ycG> 
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230401/cd117f8c/attachment-0001.htm>


More information about the gdal-dev mailing list