OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.95k stars 2.57k forks source link

Vagrant: doesn't work #783

Closed drnextgis closed 6 years ago

drnextgis commented 6 years ago

Run vagrant up and got at the end:

...
    default: g++ -std=c++11 -shared   -L/home/vagrant/gnumake-build-gcc4.8 -lgdal  -lcryptopp -larmadillo -lpoppler -ljson-c -lfreexl -lqhull -lqhull -L/usr/lib/x86_64-linux-gnu -lSFCGAL -L/usr/lib/x86_64-linux-gnu -lgeos_c -lwebp -lepsilon -lodbc -lodbcinst -lkmlbase -lkmldom -lkmlengine -lkmlxsd -lkmlregionator   -lexpat -lxerces-c -lpthread -lopenjp2   -ljasper -L/usr/lib -lnetcdf -lhdf5 -lmfhdf -ldf -logdi -lgif -lCharLS -ljpeg -lgeotiff -ltiff -lgta -lpng -lcfitsio -L/usr/lib -lpq -llzma -lz -lpthread -lm -lrt -ldl  -lspatialite -lsqlite3 -lpcre   -L/usr/lib/x86_64-linux-gnu -lcurl         -Wl,-rpath=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm   -lxml2    -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl -L/usr/lib -lkea -L/usr/lib -lhdf5 -lhdf5_hl -lhdf5_cpp  osr_wrap.o -o libosrcsharp.so 
    default: rm -rf osr_csharp.dll.config
    default: echo "<configuration>" >> osr_csharp.dll.config
    default: echo "<dllmap dll=\""osr"_wrap\" target=\""osrcsharp"\" />" >> osr_csharp.dll.config
    default: echo "</configuration>" >> osr_csharp.dll.config
    default: mcs /debug:full /target:library /out:osr_csharp.dll osr/*.cs AssemblyInfo.cs
    default: AssemblyInfo.cs(88,12): warning CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
    default: Compilation succeeded - 1 warning(s)
    default: mcs /debug:full /target:library /out:ogr_csharp.dll /r:osr_csharp.dll ogr/*.cs AssemblyInfo.cs
    default: AssemblyInfo.cs(88,12): warning CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
    default: Compilation succeeded - 1 warning(s)
    default: mcs /debug:full /target:library /out:gdal_csharp.dll /r:ogr_csharp.dll gdal/*.cs AssemblyInfo.cs
    default: AssemblyInfo.cs(88,12): warning CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
    default: Compilation succeeded - 1 warning(s)
    default: mcs /debug:full /target:library /out:gdalconst_csharp.dll const/*.cs AssemblyInfo.cs
    default: AssemblyInfo.cs(88,12): warning CS1699: Use compiler option `keyfile' or appropriate project settings instead of `AssemblyKeyFile' attribute
    default: Compilation succeeded - 1 warning(s)
    default: mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:ogrinfo.exe apps/ogrinfo.cs
    default: mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:createdata.exe apps/createdata.cs
    default: mcs /r:osr_csharp.dll /out:OSRTransform.exe apps/OSRTransform.cs
    default: mcs /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALRead.exe apps/GDALRead.cs
    default: error CS0006: Metadata file `System.Drawing.dll' could not be found
    default: Compilation failed: 1 error(s), 0 warnings
    default: make: 
    default: *** [samples] Error 1

Ubuntu 16.04.4 LTS, Vagrant VirtualBox Provider

rouault commented 6 years ago

@miurahr Is this related to your changes ?

drnextgis commented 6 years ago

FYI: Using the original Vagrantfile I could not even get the box, so I have modified original Vagrant file in this way:

$ git diff
diff --git a/Vagrantfile b/Vagrantfile
index 1866258..a15c275 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -32,8 +32,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

   config.vm.provider :virtualbox do |vb,ovrd|
      ovrd.vm.network :forwarded_port, guest: 80, host: 8080
-     ovrd.vm.box = "trusty64"
-     ovrd.vm.box_url = "http://files.vagrantup.com/precise64.box"
+     ovrd.vm.box = "ubuntu/trusty64"
      vb.customize ["modifyvm", :id, "--memory", vm_ram]
      vb.customize ["modifyvm", :id, "--cpus", vm_cpu]
      vb.customize ["modifyvm", :id, "--ioapic", "on"]

Not sure that errors reported above are connected with these changes.

miurahr commented 6 years ago

@dreamil Thank you for reporting typo. I'd like to ask PR for this asap. This fails is happen on CSharp build. I don't know why fails, but as a fact, MONO version is different from previous vagrant script, 2.10.8.1-1ubuntu2.3 to 3.2.8+dfsg-4ubuntu1.1 on trusty.

My short research for checking travis-ci status, there are no mono build CI test result now.

It seems to be an issue on swig/csharp on mono-3 but not a direct issue on Vagrantfile script.

miurahr commented 6 years ago

It seems missing package libmono-system-drawing4.0-cil

miurahr commented 6 years ago

765 fixes an issue.

mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:ogrinfo.exe apps/ogrinfo.cs
mcs /r:ogr_csharp.dll /r:osr_csharp.dll /out:createdata.exe apps/createdata.cs
mcs /r:osr_csharp.dll /out:OSRTransform.exe apps/OSRTransform.cs
mcs /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALRead.exe apps/GDALRead.cs
mcs /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALReadDirect.exe apps/GDALReadDirect.cs
mcs /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALAdjustContrast.exe apps/GDALAdjustContrast.cs
mcs /r:gdal_csharp.dll /r:System.Drawing.dll /out:GDALDatasetRasterIO.exe apps/GDALDatasetRasterIO.cs
mcs /r:gdal_csharp.dll /out:GDALWrite.exe apps/GDALWrite.cs
mcs /r:gdal_csharp.dll /out:GDALDatasetWrite.exe apps/GDALDatasetWrite.cs
apps/GDALDatasetWrite.cs(63,13): warning CS0219: The variable `bXSize' is assigned but its value is never used
apps/GDALDatasetWrite.cs(63,21): warning CS0219: The variable `bYSize' is assigned but its value is never used
Compilation succeeded - 2 warning(s)
mcs /r:gdal_csharp.dll /out:GDALColorTable.exe apps/GDALColorTable.cs
mcs /r:ogr_csharp.dll /out:WKT2WKB.exe apps/WKT2WKB.cs
mcs /r:ogr_csharp.dll /out:OGRGEOS.exe apps/OGRGEOS.cs
mcs /r:gdal_csharp.dll /out:ReadXML.exe apps/ReadXML.cs
mcs /r:gdal_csharp.dll /r:osr_csharp.dll /out:GDALInfo.exe apps/GDALInfo.cs
mcs /r:gdal_csharp.dll /out:GDALOverviews.exe apps/GDALOverviews.cs
mcs /r:gdal_csharp.dll /out:GDALCreateCopy.exe apps/GDALCreateCopy.cs
mcs /r:gdal_csharp.dll /out:GDALGetHistogram.exe apps/GDALGetHistogram.cs
rouault commented 6 years ago

@drnextgis Is this issue now fixed ?

drnextgis commented 6 years ago

Yes, all works fine for me.