-
-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providing Windows binaries/packages #17
Comments
|
/cc @onepremise - based on your build system so you have a binary yet for osm2pgsql that runs? |
|
/cc @emirhartato, member of @hotosm who I know would love to get access to a working build to use in a workshop by the last week in April |
|
Hi Dane, Yes I have a cygwin build which is working. I'm also getting together a Thanks, Jason On Mon, Apr 8, 2013 at 8:48 PM, Dane Springmeyer
|
|
Jason, both would be great for testing, but really whatever you have. |
|
Hello, sorry for late reply. This the error log for different build of osm2pgsql on Windows: Build 0.69 that I got from http://tile.openstreetmap.org/osm2pgsql.zip doesn't shows any error. But the polygon sometimes doesn't work and polyline for road sometimes get messy. Here's the screenshot: I'm running on MacOSX with 0.70, seems to work very well. But this build is not available for Windows. |
|
Version 0.69 is pretty old. From what I can gather it is from sometime in 2010. That is presumably still pre 64 bit ID, so it won't work with the current planet at all, which is why it desperately needs replacing. People have compiled much newer working versions of osm2pgsql on windows though. They were just never put on tile.osm.org. The errors shown in your logs look like configuration errors with the database parameters not correctly set. It might be possible that the defaults have changed in newer versions which is why you might need to set db parameters which you didn't use to need to do. |
|
@apmon can you explain how to set database parameters? Hopefully if that can help solve the problem. There were 6 laptops tested and all of them have same error log. I also did a fresh install of PostgreSQL and PostGIS and create a new database, but still have the same error log. |
|
Not sure if it helps, but here are my notes on the postgres configuration:
Import example: osm2pgsql.exe -v -c -d osm -U osm -W -H localhost -P 5432 -S default.style I also have a recent build of osm2psql which works. I have some mapnik https://vanguard.houghtonassociates.com The next build will have a package you can download under the Artifacts tab: https://vanguard.houghtonassociates.com/browse/OSM-OSM2PSQL-27/artifact Is there a specific time-frame you need this? On Thu, Apr 11, 2013 at 2:18 AM, emirhartato notifications@github.comwrote:
|
|
Hello... Well, there will be a workshop in 6th May. My team will teach osm2pgsql and Our team also already have Advanced OpenStreetMap documentation written by But if that's the only way to work, it's still possible to change the
|
|
My guess would be the important parameters to resolve your issues are the following: "-U osm -W -H localhost -P 5432" -W forces a password promt where you can specify the password for the user osm. However, you have to make sure that postgresql is set up for password authentication and that you have set the appropriate password for the osm user in postgresql. QGis should not be affected by any of this, as it simply uses an existing postgis db, no matter how you created it. I have not heard of OSM Tool GUI before, so I don't know what it does. (And google doesn't seem to give me anything useful either) But assuming it is a wrapper around osm2pgsql to make sure you don't have to work with the command line, then you would simply have to extend OSM Tool GUI to set the appropriate parameters of osm2pgsql. Oh, reading your message again, I see OSM Tool GUI is something / a plugin of QGis. But the same should still apply, that the integration module needs to be adapted to set the correct parameters when calling osm2pgsql. Just that it then does effect QGis... ;-) You probably want to test it on the command line first. Make sure it works, and then contact the developers of the tool gui. |
|
@apmon - Yes, I wrote "OSM Tool GUI" a while back: it is a python wrapper that works with the 0.69 (old) osm2pgsql (https://bitbucket.org/springmeyer/hot_tools/src/2321b0d0adae/osm_tools/command_dock2.py). Getting the password prompt working was extremely hard. Also when I've tried to compile osm2pgsql the getopt code has been the most difficult to port. So I presume that something changed in the behavior of the password prompt at some point, breaking the plugin. @emirhartato - can you focus on testing osm2pgsql from the command line ONLY. Do not test with the QGIS plugin. We want to first make sure that an updated osm2pgsql build for windows works from the command line. After that I can take a look at any updates needed for the plugin to adapt it. @emirhartato - my sense is you need to provide the -W flag when testing to that a password prompt comes up. |
|
Well, that makes the task of fixing the "OSM Tool GUI" somewhat easier, if we know who to contact and know they are still interested in fixining things... ;-) If password prompt is causing issues, it shouldn't be too difficult to try and add a different way to supply the password to osm2pgsql. One option would be to just add it as another parameter. However, the disadvantage is that the command line arguments are listed in the process outputs like top (not sure if that is the case in windows), so the password would then be publicly visible to everyone on the computer. But yes, we first need to know that osm2pgsql itself works before fixing the wrapper around it. @onepremise Nice to see those efforts. Having any form of working osm2pgsql on windows is obviously a good start, but the more "native" the compile is, the better. If I understand it correctly mingw is more "native" than cygwin, so that would be preferable. If we can get it to build from a clean source in git and can then add a windows build server to the ci.osm.org, then perhaps we can prevent it from constantly breaking and make windows a properly supported platform of osm2pgsql. |
|
+1 to an insecure and easy way to pass a password for windows users. I configure my linux/osx postgres installs to not need a password, but the postgres windows installers require a password based on how the installers work. So a backdoor here for development would be really handy. |
Correct, mingw64 is definitely preferred, and I will providing the mingw64 build as soon as i tie up some lose ends with a Mapnik issue I'm working on in mingw 64 bit. I'm very close to providing a stable build with MinGW-AD64S: https://github.com/onepremise/MinGW-AD64S Until then, I have the cygwin version, with 64bit IDs enabled, available here: https://vanguard.houghtonassociates.com/browse/OSM-OSM2PSQL-35/artifact Another build will follow up with the latest osm2pgsql updates. |
|
Here's a build with the latest changes rebased: https://vanguard.houghtonassociates.com/browse/OSM-OSM2PSQL-39/artifact |
|
Here are the steps I followed to get @onepremise's build to work for me on Win7 https://gist.github.com/jlar/5375480 |
|
Sweet, thanks @jlar! @emirhartato - could you try following those instructions ^^ and let us know how things work for you? |
|
Sweet! Will test it out tonight.
|
|
Ok, so I tested @onepremise build. It's still get me this error: osm2pgsql SVN version 0.81.0 (64bit id space) |
|
@emirhartato - that error indicates usually means that postgres is not running. Can you confirm that you have postgres installed and it is running? Make sure to you can connect to postgres/postgis via pgadminIII and/or QGIS. |
|
@emirhartato can you include your osm2pgsql command-code? Perhaps try specifying |
|
Hello, Thank you guys for your valuable efforts. I have managed to find an id of OSM object. This is a relation Moreover, I would like to mention that @onepremise's Cygwin build works much slower then the one provided by Dominik Perpeet. --------------------------- Cygwin --------------------------- .pbf --------------------------- Dominik --------------------------- .pbf |
|
@Rungee - thanks for the feedback. I think at this point we are aiming at something that just works, performance concerns, while important, can come later. I wonder if the /cc @apmon - what do you think about pushing the output of |
|
@jlar @onepremise Error message for version 0.8: C:\osm2pgsql>osm2pgsql -c -d tes_maning -U postgres -W -H localhost -P 5432 -S C Password: Error message for 0.81 from https://vanguard.houghtonassociates.com/browse/OSM-OSM2PSQL-39/artifact C:\osm2pgsql>osm2pgsql -c -d tes_maning -U postgres -W -H localhost -P 5432 -S C Password: |
|
err? that's strange. You're missing some tables in your database. Did you On Thu, Apr 18, 2013 at 5:19 AM, emirhartato notifications@github.comwrote:
|
|
@onepremise. Notice that his visual screenshot is for really old osm2pgsql while the recent build is running out of memory and never finishing. @apmon can you advise if this seems odd? @emirhartato can you tell us how much memory your machine has and how large this specific osm extract is? |
|
Osm2pgsql uses virtual memory fairly wasteful and kind of assumes that you have 64 bit address space and an efficient memory management. So there are a number of places, where it just allocates something like 2GB of memory with a good chance of never writing to that memory and thus never needing that amount of physical memory. However, depending on your over commit settings of your OS and how well your OS handles those situations, this might not work well. As the error message sais, you should try the parameter "--cache-strategy sparse" which is less wastefull of virtual memory and thus might work (It roughly limits itself to what is specified in the -C parameter). |
|
okay, update.. I'm adding -H localhost and -W on my command line to get it work Thanks everyone |
|
@emirhartato - thanks for the update. What about the @emirhartato - also, what are the next steps for you? are you good to go for your workshop, or do you need the QGIS plugin updated to also pass custom flags? |
|
alex85 hi, I'm fairly new in the OSM2PGSQL I'm still wondering around, and I have some question:
thank you for your time and effort, your work is excellent!! |
|
@alex85k thanks, it works for me. Can this version be declared stable enough to find its way into http://wiki.openstreetmap.org/wiki/Osm2pgsql#Binary ? The server mentioned there does not respond anymore. |
|
@Andre-J : The current msvc version does not support flat-nodes and parallelism properlly, which may make it hard to use on several Gb extracts. Flat-nodes is fixable (only hard to debug with 20Gb tempfiles). Adding parallelism is much harder. Currently it is based on "fork" function which has no analogs in Windows core. I guess for now Mingw/Cygwin version by @onepremise is more universal (but slower for small extracts): |
|
I tested both versions from onepromise, but did not get lucky with them: http://gis.stackexchange.com/questions/118334/download-link-to-osm2pgsql/118356#118356 |
|
Sorry, wasn't aware a few dependencies were missing. I can easily add On Fri, Nov 7, 2014 at 4:33 AM, AndreJ notifications@github.com wrote:
|
|
mingle-light.zip does not contain them, and the other one is too large to download for just 2 small files. |
|
alex85k hi, I'm paying around with two version one from the Sep 15 and the other one from Oct 26, the version form Oct is faster but it crashing the one from Sep is slow (4 times slower) but it didn't crash I'm using the following command: The HW is 96 GB RAM on windows server 2008 R2 any idea why? thanks |
|
@ohadmanor : Thank you for the feedback! October26 version is based on newly created C++ source and uses new protobuf 2.6.0 and protobuf-c, so there are many places where the bug could be introduced. One of the previous versions was a debug one by mistake (this can explain 4x speedup). I know only about some UTF-related problem (failing tests) and flat-nodes crash. It would be great if you can reproduce a crash on some smaller (one-country) extract, then maybe we can fix it :) |
|
@alex85k : I think there is a memory linkage when I try to use large scale of data. on small areas it works fine but when I try to use it on large area when it gets to the way procedure it jump to maximum memory and start to do memory allocation. then it send the following error: "Error allocating ways Error occurred, cleaning up". when I used the same procedure on the version from Sep It works fine, slow but fine!! I hope it will help you figure up the problem. |
|
So, this is out-of-memory error... The reasons could be:
I have rebuilt september C-version in Release, it should be faster: The latest C++ version is here: I have updated the CMake build scripts to support latest source: alex85k/osm2pgsql-cmake@b8d6e57 @ohadmanor : could you compare the updated version and measure memory consumption, if possible? (maybe on one-country extract) |
|
@alex85k : I tested both versions on small files (up to 1.5GB) it works fine (No memory linkage), I'll get back my server time tomorrow and I'll test them on large files with --bbox command. |
|
@ohadmanor Thank you. Please also track memory consumption with something like http://stackoverflow.com/questions/69332/tracking-cpu-and-memory-usage-per-process |
|
Much of the content of this topic is pre-C++. I'm wondering if we should isolate out the issues that still remain and close this particular issue |
|
@alex85k well I tested this two versions, both works excellent with single country file the problem is with the --bbox command both version has memory leakage (I used Red-Gate) on small files up to 2 GB it can works if you try to use the planet-latest.osm.pbf it crash in same cases it take windows with it. I can try to debug it if you send me the latest code (if you have it on VS it will be best) |
|
@ohadmanor: I have prepared a full debug testing kit - pre-packaged libraries and cmake scripts To use the pack, only Visual Studio 2013, CMake and PostgreSQL 9.3 are needed. @pnorman: yes, maybe the new ticket will be better. |
|
@alex85k I tried to debug and play around with the versions,
what is the different between the september and november? |
|
@ohadmanor September version is C, November is C++-translated (huge changes in code). Windows patches are almost the same and mostly cosmetic, so there may be new problems with Linux version too. Does the memory leaks exist on small files too? |
|
@alex85k to be clear the problem is only when using the -bbox command from large files (above 2GB) and only if you try to cut area larger then 10x10 degrees. |
|
@alex85k First of all: Awesome job! I tried to import some sumps with the November-Build and it always fails. I think it might be related to UTF8 as someone mentioned earlier. Here are some infos: Command: Error: |
|
@danielkastner : Thank you for the feedback! Did you set UTF8 encoding for osm database (I had)? Are you using latest 9.3 PostgreSQL? |
|
@ohadmanor: Thank you for the details. It will be harder to catch... Did your software detect memory leaks on smaller extracts with BBox? (you can try Russia extract for example - it have > 10 degrees range and reasonable file size) |
|
@alex85k Thanks for the quick reply. I'm not sure about the charset of the db. I'll check it and give the extract you uploaded a try. |
|
@alex85k It's been a while but now I could give the extract you uploaded a try. Unfortanetly the same error occurs: The database is using UTF8. Here is the CREATE-Statement: |
|
Wait, it's working. The problem was the database or, more precisely, the tables. They were created some time ago and for the update of the data now i just deleted their contents instead of dropping the database/tables. After using osm2pgsql in create-mode instead of append-mode it worked. At least until it hit the problem with the violation of unique-constraints :/ But for your part @alex85k everything works fine now. Thanks for your support and the up2date version of osm2pgsql |
|
Given the age of this issue, I'm going to go ahead and close it. If there are new specific issues in 0.88.0 or 0.89.0-dev, they should be raised as new issues. |


In addition to OS X (#15) the osm2pgsql community of developers should provide binaries for Windows.
Let's coordinate how to get this done via this ticket.
Tasks:
Background discussions: hotosm/tech#1
The text was updated successfully, but these errors were encountered: