carto project.mml > osm.xml fails

997 views
Skip to first unread message

boris....@gmail.com

unread,
Aug 27, 2013, 12:35:13 AM8/27/13
to map...@googlegroups.com
Hello,

I've installed carto, mapnik-utils, python-mapnik2, libmapnik2, gdl-bin from package on Ubuntu 13.04. The libmapnik2 version is 2.0.0+ds1-3ubuntu1. Then, I've cloned
git://github.com/gravitystorm/openstreetmap-carto.git and executed get-shapefiles.sh. However, carto project.mml > osm.xml fails with

The "sys" module is now called "util". It should have a similar interface.
Error: roads.mss:121:4 Unrecognized rule: marker-ignore-placement


Andy Allan

unread,
Aug 27, 2013, 4:57:13 AM8/27/13
to mapnik
On 27 August 2013 05:35, <boris....@gmail.com> wrote:
> Hello,
>
> I've installed carto, mapnik-utils, python-mapnik2, libmapnik2, gdl-bin from
> package on Ubuntu 13.04. The libmapnik2 version is 2.0.0+ds1-3ubuntu1.

The requirements for openstreetmap-carto includes mapnik >= 2.1.0 -
your mapnik version is too old.

Cheers,
Andy

boris....@gmail.com

unread,
Aug 27, 2013, 12:44:18 PM8/27/13
to map...@googlegroups.com
I removed mapnik and set up mapnik from PPA as explained in https://github.com/mapnik/mapnik/wiki/UbuntuInstallation. However, this PPA doesn't countain carto. Which packages do I need for carto and where can I get these?

The carto from git doesn't compile:

$ make
./node_modules/.bin/jshint lib/carto/*.js lib/carto/tree/*.js
/bin/sh: 1: ./node_modules/.bin/jshint: not found
make: *** [lint] Error 127

If I have to compile all dependencies from source, then mapnik is not for me.

Tom Hughes

unread,
Aug 27, 2013, 12:55:25 PM8/27/13
to map...@googlegroups.com, boris....@gmail.com
On 27/08/13 17:44, boris....@gmail.com wrote:

> I removed mapnik and set up mapnik from PPA as explained in
> https://github.com/mapnik/mapnik/wiki/UbuntuInstallation. However, this
> PPA doesn't countain carto. Which packages do I need for carto and where
> can I get these?

This should do it:

apt-get install nodejs npm
npm install --global carto millstone

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/

boris....@gmail.com

unread,
Aug 27, 2013, 5:31:47 PM8/27/13
to map...@googlegroups.com, boris....@gmail.com
It doesn't work:

/usr/local/bin/mml2json.js -> /usr/local/lib/node_modules/carto/bin/mml2json.js
npm ERR! error installing mill...@0.6.0
npm ERR! error rolling back mill...@0.6.0 Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/millstone'

npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: req...@2.26.0
npm ERR! Required: ["node >= 0.8.0"]
npm ERR! Actual:   {"npm":"1.1.4","node":"0.6.19"}
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--global" "carto" "millstone"
npm ERR! cwd /home/boris/GPS
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ENOTSUP
npm ERR! message Unsupported
npm ERR! errno {}
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/boris/GPS/npm-debug.log
npm not ok

This installed stuff in /usr/local. Can npm clean this up by itself?

I much prefer to use the packages made for Ubuntu 13.04. Everything else usually doesn't work on Linux. That means I need the stylefiles for mapnik 2.0.0. Where can I get these?

Graham Jones

unread,
Aug 27, 2013, 5:40:08 PM8/27/13
to map...@googlegroups.com, boris....@gmail.com
I think that last time I used carto I had these sort of troubles and I cheated and installed tilemill (http://www.mapbox.com/tilemill/) which came with all the dependencies, and I used carto from that.

But that was a couple of years ago, so I would have expected it to be easier now!

Graham.


--
You received this message because you are subscribed to the Google Groups "mapnik" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapnik+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Graham Jones
Hartlepool, UK.

boris....@gmail.com

unread,
Aug 28, 2013, 5:56:14 AM8/28/13
to map...@googlegroups.com, boris....@gmail.com
I'll give TileMill a try, it can generate MBTiles.

boris....@gmail.com

unread,
Aug 28, 2013, 7:32:08 AM8/28/13
to map...@googlegroups.com, boris....@gmail.com
TileMill doesn't work either. I did everything as explained in the guide but all I see is a blank map. Also, it didn't install carto. I'd better go back to MOBAC.

Dane Springmeyer

unread,
Aug 28, 2013, 11:34:17 AM8/28/13
to map...@googlegroups.com, map...@googlegroups.com, boris....@gmail.com


On Aug 28, 2013, at 4:32 AM, boris....@gmail.com wrote:

TileMill doesn't work either. I did everything as explained in the guide but all I see is a blank map.

First time loading it can take 5-10 minutes to pull down sample data. 

Also, it didn't install carto.

It did. It installed in /usr/share/tilemill/node_modules/carto/bin/carto


I'd better go back to MOBAC.

--

Dane Springmeyer

unread,
Aug 28, 2013, 11:45:29 AM8/28/13
to map...@googlegroups.com
The below error indicates your node.js version is too old. I agree with you that in general official debian hosted apt packages for things is better than self installing. But the opposite is true for node.js and related tools currently because the 'official' Debian hosted packages cannot keep up or are simply unmaintained. 

So I strongly recommend you do not try to use official debian hosted packages for anything related to node.js software for now on Debian systems. This situation may change soon as node stabilizes but at this point the project is still too fast moving. 

So I recommend using the TileMill package from the development seed PPA like you have done. I maintain this, update it fairly frequently and can help troubleshoot when it breaks (due to older packages being installed that conflict). 

Dane
--

Dane Springmeyer

unread,
Aug 28, 2013, 11:48:39 AM8/28/13
to map...@googlegroups.com
Personally I don't ever use the --global flag when installing node modules and instead let them be placed locally in my working directory.

Dane Springmeyer

unread,
Aug 28, 2013, 11:49:48 AM8/28/13
to map...@googlegroups.com


On Aug 27, 2013, at 9:44 AM, boris....@gmail.com wrote:

> $ make
> ./node_modules/.bin/jshint lib/carto/*.js lib/carto/tree/*.js
> /bin/sh: 1: ./node_modules/.bin/jshint: not found
> make: *** [lint] Error 127

You should run 'npm install' not make in this case since 'make' here is a shortcut for developer use only.

boris....@gmail.com

unread,
Aug 29, 2013, 4:20:58 AM8/29/13
to map...@googlegroups.com, boris....@gmail.com
Am Mittwoch, 28. August 2013 17:34:17 UTC+2 schrieb Dane Springmeyer:
First time loading it can take 5-10 minutes to pull down sample data. 

Thanks for this hint. Indeed, after a while the map appeared. As Tilemill doesn't indicate any activity during downloading, I assumed it didn't work. So far, I'm quite impressed by Tilemill and I prefer it to Mapnik.

However, using user postgres as explained on http://www.mapbox.com/tilemill/docs/guides/osm-bright-ubuntu-quickstart/ didn't work, so I've created a dedicated database user on Ubuntu 13.04.

Graham Jones

unread,
Aug 29, 2013, 4:47:54 AM8/29/13
to map...@googlegroups.com

I always think of TileMill as being a front end for mapnik rather than something different.

Cheers

Graham

Hartlepool, UK (from my phone)

--
Reply all
Reply to author
Forward
0 new messages