NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

For testing purposes (before putting it on a Linux server), I would like to install the Overpass API on Mac OS X (El Capitan). According to the changelog it should also build on a Mac. However, the installation guide is only given for Ubuntu. I would follow these instructions, however homebrew cannot find the packages libexpat1-dev and zlib1g-dev. What can I do?

asked 18 Dec '15, 12:44

Arik's gravatar image

accept rate: 0%

If you follow the instructions at:, "Software Installation" this will work on a Mac provided you build with: make CXXFLAGS="-O3" CPPFLAGS="-DNATIVE_LARGE_FILES"

Error: I still get an error saying "ld: library not found for -lrt" though. Is there a way to get around this?

Oh! I forgot that problem. This will happen about 6 times in the build. The way I worked around it is each time that make stops with this error, copy & paste the last gcc command line (these spread over more than one line) and delete the "-lrt", then hit return. When it finishes, re-type "make CXXFLAGS="-O3" CPPFLAGS="-DNATIVE_LARGE_FILES"

BTW: We have an issue for this. Please follow up here:

permanent link

answered 18 Dec '15, 16:12

malcolmh's gravatar image

accept rate: 50%

edited 19 Dec '15, 16:31

mmd's gravatar image



Well, that's really only a workaround. Better would be to address this in and recreate the build environment. Result: no more manual fiddling. Anyone with a mac here who is brave enough to test this and update the github issue i mentioned? A patch could be similar to this one:

(19 Dec '15, 09:58) mmd

Tried it, same failure:

ld: library not found for -lrt clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [bin/osm3s_query] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

(19 Dec '15, 10:16) malcolmh

Did you also run autoscan, aclocal, autoheader, libtoolize, automake --add-missing, autoconf (see Installation option 2) before running configure and make again?

(19 Dec '15, 10:54) mmd

No. These steps are not mentioned in the Installation page. I tried this (BTW, no libtoolize, but ran glibtoolize). Same failure.

(19 Dec '15, 11:32) malcolmh

no_frills.html is targetting more the official releases. I recommend to check this Wiki page as well.

Thanks to Travis CI I now have a working build on Mac OS X without any manual tweaks:

Please retest with the changes described here - except for the .travis.yml maybe, which is only in my branch.

(19 Dec '15, 16:25) mmd

Hello, I found these links:

Hope this helps someone in the future.


permanent link

answered 18 Dec '21, 21:01

wobi's gravatar image

accept rate: 0%

edited 18 Dec '21, 21:02

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 Dec '15, 12:44

question was seen: 4,986 times

last updated: 18 Dec '21, 21:02

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum