systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.51k stars 234 forks source link

TileMaker will not build for macOS Big Sur running Xcode 12.3, command line tools 12.3 #193

Closed pbmorton closed 3 years ago

pbmorton commented 3 years ago

The issue is explained in this snippet from Apple's Xcode 10 release notes:

The command line tools will search the SDK for system headers by default. However, some software may fail to build correctly against the SDK and require macOS headers to be installed in the base system under /usr/include. If you are the maintainer of such software, we encourage you to update your project to work with the SDK or file a bug report for issues that are preventing you from doing so.

Will this be fixed? When? And can you suggest a work-around for the moment? Also, thanks for your efforts with providing tilemaker!

systemed commented 3 years ago

You'll need to provide a more detailed bug report than that - what happens when you try to build? What is the output? Have you installed the required dependencies, and if so, how (using Homebrew, or from source, or...)?

pbmorton commented 3 years ago

macOS Big Sur version 11.1, chip Apple M1. From my terminal:

paul@Mac-mini Nannup_ios % /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version
Xcode 12.3
Build version 12C33
paul@Mac-mini Nannup_ios % brew -v                                                               
Homebrew 2.7.3
Homebrew/homebrew-core (git revision 438d0; last commit 2021-01-12)
Homebrew/homebrew-cask (git revision 0f2b1; last commit 2021-01-12)
paul@Mac-mini Nannup_ios % brew list                                                             
icu4c       readline    sqlite
paul@Mac-mini Nannup_ios % brew install protobuf boost lua51 shapelib
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/protobuf-3.14.0.arm64_big_sur.bottle.1.tar.gz
Already downloaded: /Users/paul/Library/Caches/Homebrew/downloads/3310205da576ba280e2ec06e27f4caa30e554797b8bdab10de03d30dbda29dbe--protobuf-3.14.0.arm64_big_sur.bottle.1.tar.gz
==> Pouring protobuf-3.14.0.arm64_big_sur.bottle.1.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /opt/homebrew/share/emacs/site-lisp/protobuf
==> Summary
🍺  /opt/homebrew/Cellar/protobuf/3.14.0: 211 files, 17.9MB
==> Downloading https://homebrew.bintray.com/bottles/boost-1.75.0_1.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/paul/Library/Caches/Homebrew/downloads/2f38ec079eac4e4b40f6232281c4aa948dfc75788cdadf12dcc0a84d8c3578b1--boost-1.75.0_1.arm64_big_sur.bottle.tar.gz
==> Pouring boost-1.75.0_1.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/boost/1.75.0_1: 15,058 files, 517.3MB
Warning: lua@5.1 has been deprecated because it is not supported upstream!
==> Downloading https://homebrew.bintray.com/bottles/lua%405.1-5.1.5_8.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/paul/Library/Caches/Homebrew/downloads/89aff575a8611d194680791475345e200e1e0a39467652532c3ef923b818d039--lua@5.1-5.1.5_8.arm64_big_sur.bottle.tar.gz
==> Pouring lua@5.1-5.1.5_8.arm64_big_sur.bottle.tar.gz
==> Caveats
You may also want luarocks:
  brew install luarocks
==> Summary
🍺  /opt/homebrew/Cellar/lua@5.1/5.1.5_8: 22 files, 408.5KB
Error: shapelib: no bottle available!
You can try to install from source with:
  brew install --build-from-source shapelib
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
==> Caveats
==> protobuf
Emacs Lisp files have been installed to:
  /opt/homebrew/share/emacs/site-lisp/protobuf
==> lua@5.1
You may also want luarocks:
  brew install luarocks
paul@Mac-mini Nannup_ios % cd ~/tools/tilemaker 
paul@Mac-mini tilemaker % make
Makefile:49: *** Couldn't find Lua.  Stop.
paul@Mac-mini tilemaker % ls -al /usr/include
ls: /usr/include: No such file or directory
paul@Mac-mini tilemaker % ls -al /usr/local/include
ls: /usr/local/include: No such file or directory
paul@Mac-mini tilemaker % xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
paul@Mac-mini tilemaker % ls -al /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
lrwxr-xr-x  1 root  wheel  14 10 Jan 12:02 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -> MacOSX11.1.sdk
paul@Mac-mini tilemaker % ls -al /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr 
total 0
drwxr-xr-x    7 root  wheel   224 30 Nov 20:33 .
drwxr-xr-x    7 root  wheel   224 30 Nov 20:33 ..
drwxr-xr-x   11 root  wheel   352 30 Nov 20:33 bin
drwxr-xr-x  284 root  wheel  9088 10 Jan 12:02 include
drwxr-xr-x  304 root  wheel  9728 10 Jan 12:02 lib
drwxr-xr-x    3 root  wheel    96 30 Nov 20:33 libexec
drwxr-xr-x    3 root  wheel    96 30 Nov 20:33 share
paul@Mac-mini tilemaker % ls -al /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include 
total 3312
drwxr-xr-x  284 root  wheel    9088 10 Jan 12:02 .
drwxr-xr-x    7 root  wheel     224 30 Nov 20:33 ..
drwxr-xr-x   17 root  wheel     544 30 Nov 20:33 AppleArchive
-rw-r--r--    1 root  wheel  121206 30 Nov 20:30 AppleEXR.h
-rw-r--r--    1 root  wheel   54891 30 Nov 20:30 AppleTextureEncoder.h
-rw-r--r--    1 root  wheel   59503 30 Nov 20:30 AssertMacros.h
-rw-r--r--    1 root  wheel   20978 30 Nov 20:30 Availability.h
-rw-r--r--    1 root  wheel  432109 30 Nov 20:30 AvailabilityInternal.h
-rw-r--r--    1 root  wheel  211383 30 Nov 20:30 AvailabilityMacros.h
-rw-r--r--    1 root  wheel    7401 30 Nov 16:56 AvailabilityVersions.h
-rw-r--r--    1 root  wheel    1775 30 Nov 20:30 Block.h
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 CommonCrypto
-rw-r--r--    1 root  wheel   26422 30 Nov 20:30 ConditionalMacros.h
-rw-r--r--    1 root  wheel    1133 30 Nov 16:56 Darwin.apinotes
drwxr-xr-x    7 root  wheel     224 30 Nov 20:33 EndpointSecurity
-rw-r--r--    1 root  wheel   31737 30 Nov 20:30 MacTypes.h
-rw-r--r--    1 root  wheel    5060 30 Nov 20:30 NSSystemDirectories.h
-rw-r--r--    1 root  wheel   20865 30 Nov 20:30 TargetConditionals.h
-r--r--r--    1 root  wheel   27271 30 Nov 16:56 Xplugin.h
-rw-r--r--    1 root  wheel    2532 30 Nov 16:56 __cxxabi_config.h
-rw-r--r--    1 root  wheel    5098 30 Nov 16:56 __libunwind_config.h
-r--r--r--    1 root  wheel    2760 30 Nov 16:56 __wctype.h
-r--r--r--    1 root  wheel    1128 30 Nov 16:56 _ctermid.h
-r--r--r--    1 root  wheel   10408 30 Nov 16:56 _ctype.h
-r--r--r--    1 root  wheel    2718 30 Nov 16:56 _locale.h
-r--r--r--    1 root  wheel    5130 30 Nov 16:56 _regex.h
-r--r--r--    1 root  wheel    6201 30 Nov 16:56 _stdio.h
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 _types
-r--r--r--    1 root  wheel    2237 30 Nov 16:56 _types.h
-r--r--r--    1 root  wheel     671 30 Nov 16:56 _types.modulemap
-r--r--r--    1 root  wheel    3791 30 Nov 16:56 _wctype.h
-r--r--r--    1 root  wheel    1237 30 Nov 16:56 _xlocale.h
-r--r--r--    1 root  wheel    1214 30 Nov 16:56 aio.h
-r--r--r--    1 root  wheel    1435 30 Nov 16:56 aliasdb.h
-r--r--r--    1 root  wheel    1376 30 Nov 16:56 alloca.h
drwxr-xr-x  116 root  wheel    3712 30 Nov 20:33 apache2
drwxr-xr-x   73 root  wheel    2336 30 Nov 20:33 apr-1
-r--r--r--    1 root  wheel    2901 30 Nov 16:56 ar.h
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 architecture
drwxr-xr-x   15 root  wheel     480 30 Nov 20:33 arm
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 arm64
drwxr-xr-x    8 root  wheel     256 10 Jan 12:02 arpa
-rw-r--r--    1 root  wheel   49386 30 Nov 20:30 asl.h
-r--r--r--    1 root  wheel    4239 30 Nov 16:56 assert.h
drwxr-xr-x    5 root  wheel     160 30 Nov 20:33 atm
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 bank
-r--r--r--    1 root  wheel    5084 30 Nov 16:56 bitstring.h
-r--r--r--    1 root  wheel    1556 30 Nov 16:56 bootparams.h
-rw-r--r--    1 root  wheel    3356 30 Nov 20:30 bootstrap.h
drwxr-xr-x   14 root  wheel     448 30 Nov 20:33 bsm
-rw-r--r--    1 root  wheel    6245 30 Nov 16:56 bzlib.h
-rw-r--r--    1 root  wheel   12110 30 Nov 20:30 cache.h
-rw-r--r--    1 root  wheel    1478 30 Nov 20:30 cache_callbacks.h
-rw-r--r--    1 root  wheel   19340 30 Nov 16:56 checkint.h
-rw-r--r--    1 root  wheel    3095 30 Nov 16:56 com_err.h
-rw-r--r--    1 root  wheel    6362 30 Nov 16:56 complex.h
-rw-r--r--    1 root  wheel   17921 30 Nov 20:30 compression.h
-rw-r--r--    1 root  wheel    4336 30 Nov 16:56 copyfile.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 corpses
-r--r--r--    1 root  wheel    2466 30 Nov 16:56 cpio.h
-r--r--r--    1 root  wheel    1588 30 Nov 16:56 crt_externs.h
-r--r--r--    1 root  wheel    3444 30 Nov 16:56 ctype.h
drwxr-xr-x   17 root  wheel     544 30 Nov 20:33 cups
drwxr-xr-x   10 root  wheel     320 30 Nov 20:33 curl
-rw-r--r--    1 root  wheel   80132 30 Nov 16:56 curses.h
-rw-r--r--    1 root  wheel    7029 30 Nov 16:56 cxxabi.h
-r--r--r--    1 root  wheel    7897 30 Nov 16:56 db.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 default_pager
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 device
-r--r--r--    1 root  wheel    7108 30 Nov 20:30 dirent.h
-r--r--r--    1 root  wheel    2590 30 Nov 16:56 disktab.h
drwxr-xr-x   21 root  wheel     672 30 Nov 20:33 dispatch
-rw-r--r--    1 root  wheel    3196 30 Nov 20:30 dlfcn.h
-rw-r--r--    1 root  wheel    5675 30 Nov 16:56 dns.h
-rw-r--r--    1 root  wheel  138515 30 Nov 16:56 dns_sd.h
-rw-r--r--    1 root  wheel    7972 30 Nov 16:56 dns_util.h
-rw-r--r--    1 root  wheel   26884 30 Nov 16:56 dtrace.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 editline
-r--r--r--    1 root  wheel    4444 30 Nov 20:30 err.h
-r--r--r--    1 root  wheel    1003 30 Nov 16:56 errno.h
-rw-r--r--    1 root  wheel    2891 30 Nov 16:56 eti.h
-r--r--r--    1 root  wheel    1968 30 Nov 20:30 execinfo.h
-rw-r--r--    1 root  wheel   41534 30 Nov 20:30 expat.h
-rw-r--r--    1 root  wheel    5528 30 Nov 16:56 expat_external.h
-r--r--r--    1 root  wheel    1002 30 Nov 16:56 fcntl.h
-rw-r--r--    1 root  wheel   18958 30 Nov 20:30 fenv.h
drwxr-xr-x    8 root  wheel     256 30 Nov 20:33 ffi
-rw-r--r--    1 root  wheel    4047 30 Nov 16:56 float.h
-r--r--r--    1 root  wheel    2831 30 Nov 16:56 fmtmsg.h
-r--r--r--    1 root  wheel    3602 30 Nov 16:56 fnmatch.h
-rw-r--r--    1 root  wheel   17190 30 Nov 16:56 form.h
-r--r--r--    1 root  wheel    2540 30 Nov 16:56 fsproperties.h
-r--r--r--    1 root  wheel    3220 30 Nov 16:56 fstab.h
-r--r--r--    1 root  wheel    7944 30 Nov 20:30 fts.h
-r--r--r--    1 root  wheel    2291 30 Nov 16:56 ftw.h
-r--r--r--    1 root  wheel    1339 30 Nov 16:56 get_compat.h
-rw-r--r--    1 root  wheel    1878 30 Nov 20:30 gethostuuid.h
-r--r--r--    1 root  wheel    3260 30 Nov 16:56 getopt.h
-r--r--r--    1 root  wheel    5396 30 Nov 20:30 glob.h
-r--r--r--    1 root  wheel    3574 30 Nov 16:56 grp.h
drwxr-xr-x    5 root  wheel     160 30 Nov 20:33 gssapi
-rw-r--r--    1 root  wheel     118 30 Nov 16:56 gssapi.h
drwxr-xr-x    5 root  wheel     160 30 Nov 20:33 hfs
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 hid
-rw-r--r--    1 root  wheel    9246 30 Nov 16:56 histedit.h
drwxr-xr-x   16 root  wheel     512 30 Nov 20:33 i386
-r--r--r--    1 root  wheel    8295 30 Nov 16:56 iconv.h
-r--r--r--    1 root  wheel    2381 30 Nov 20:30 ifaddrs.h
-r--r--r--    1 root  wheel    8821 30 Nov 20:30 inttypes.h
-r--r--r--    1 root  wheel    1852 30 Nov 16:56 iso646.h
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 kern
drwxr-xr-x    5 root  wheel     160 30 Nov 20:33 krb5
-rw-r--r--    1 root  wheel     338 30 Nov 16:56 krb5.h
-r--r--r--    1 root  wheel    3820 30 Nov 16:56 langinfo.h
-rw-r--r--    1 root  wheel   15671 30 Nov 20:30 launch.h
-rw-r--r--    1 root  wheel   25607 30 Nov 20:30 lber.h
-rw-r--r--    1 root  wheel    1468 30 Nov 16:56 lber_types.h
-rw-r--r--    1 root  wheel   89753 30 Nov 20:30 ldap.h
-rw-r--r--    1 root  wheel    9466 30 Nov 16:56 ldap_cdefs.h
-rw-r--r--    1 root  wheel    1814 30 Nov 16:56 ldap_features.h
-rw-r--r--    1 root  wheel    9450 30 Nov 16:56 ldap_schema.h
-rw-r--r--    1 root  wheel    3468 30 Nov 16:56 ldap_utf8.h
-rw-r--r--    1 root  wheel    4674 30 Nov 16:56 ldif.h
drwxr-xr-x    4 root  wheel     128 30 Nov 20:33 libDER
-r--r--r--    1 root  wheel    2012 30 Nov 16:56 libc.h
-r--r--r--    1 root  wheel    1550 30 Nov 16:56 libcharset.h
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 libexslt
-r--r--r--    1 root  wheel    2326 30 Nov 20:30 libgen.h
drwxr-xr-x   17 root  wheel     544 30 Nov 20:33 libkern
-rw-r--r--    1 root  wheel    7913 30 Nov 20:30 libproc.h
-rw-r--r--    1 root  wheel   21318 30 Nov 20:30 libunwind.h
drwxr-xr-x   50 root  wheel    1600 30 Nov 20:33 libxml
drwxr-xr-x    3 root  wheel      96 10 Jan 12:02 libxml2
drwxr-xr-x   24 root  wheel     768 30 Nov 20:33 libxslt
-r--r--r--    1 root  wheel    5910 30 Nov 16:56 limits.h
-r--r--r--    1 root  wheel    1569 30 Nov 16:56 localcharset.h
-r--r--r--    1 root  wheel    2288 30 Nov 16:56 locale.h
drwxr-xr-x  120 root  wheel    3840 30 Nov 20:33 mach
drwxr-xr-x   23 root  wheel     736 30 Nov 20:33 mach-o
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 mach_debug
drwxr-xr-x   15 root  wheel     480 30 Nov 20:33 machine
-r--r--r--    1 root  wheel     277 30 Nov 16:56 machine_types.modulemap
drwxr-xr-x    4 root  wheel     128 30 Nov 20:33 malloc
-rw-r--r--    1 root  wheel   32379 30 Nov 20:30 math.h
-r--r--r--    1 root  wheel    8889 30 Nov 16:56 membership.h
-r--r--r--    1 root  wheel    1893 30 Nov 16:56 memory.h
-rw-r--r--    1 root  wheel   11845 30 Nov 16:56 menu.h
drwxr-xr-x    5 root  wheel     160 30 Nov 20:33 miscfs
-rw-r--r--    1 root  wheel   24371 30 Nov 16:56 module.modulemap
-r--r--r--    1 root  wheel    1826 30 Nov 16:56 monetary.h
-r--r--r--    1 root  wheel    2348 30 Nov 20:30 monitor.h
-r--r--r--    1 root  wheel    4138 30 Nov 16:56 mpool.h
-rw-r--r--    1 root  wheel   22018 30 Nov 16:56 nameser.h
-rw-r--r--    1 root  wheel    3947 30 Nov 16:56 nc_tparm.h
lrwxr-xr-x    1 root  wheel       8 10 Jan 12:01 ncurses.h -> curses.h
-rw-r--r--    1 root  wheel    3898 30 Nov 16:56 ncurses_dll.h
-r--r--r--    1 root  wheel    4464 30 Nov 20:30 ndbm.h
drwxr-xr-x   19 root  wheel     608 30 Nov 20:33 net
drwxr-xr-x   19 root  wheel     608 30 Nov 20:33 net-snmp
-r--r--r--    1 root  wheel   12820 30 Nov 16:56 netdb.h
drwxr-xr-x   24 root  wheel     768 30 Nov 20:33 netinet
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 netinet6
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 netkey
drwxr-xr-x   15 root  wheel     480 30 Nov 20:33 nfs
-r--r--r--    1 root  wheel    3457 30 Nov 16:56 nl_types.h
-r--r--r--    1 root  wheel    3434 30 Nov 16:56 nlist.h
-rw-r--r--    1 root  wheel   13405 30 Nov 20:30 notify.h
-rw-r--r--    1 root  wheel    3379 30 Nov 16:56 notify_keys.h
-r--r--r--    1 root  wheel    1209 30 Nov 16:56 ntsid.h
drwxr-xr-x   21 root  wheel     672 30 Nov 20:33 objc
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 odmodule
drwxr-xr-x   21 root  wheel     672 30 Nov 20:33 os
-rw-r--r--    1 root  wheel    3770 30 Nov 16:56 panel.h
-r--r--r--    1 root  wheel    4199 30 Nov 16:56 paths.h
drwxr-xr-x   18 root  wheel     576 30 Nov 20:33 pcap
-rw-r--r--    1 root  wheel    2294 30 Nov 16:56 pcap-bpf.h
-rw-r--r--    1 root  wheel    2024 30 Nov 16:56 pcap-namedb.h
-rw-r--r--    1 root  wheel    2226 30 Nov 16:56 pcap.h
drwxr-xr-x    7 root  wheel     224 30 Nov 20:33 pexpert
drwxr-xr-x    7 root  wheel     224  4 Dec 06:16 php
-r--r--r--    1 root  wheel    1004 30 Nov 16:56 poll.h
-r--r--r--    1 root  wheel    1565 30 Nov 16:56 printerdb.h
-r--r--r--    1 root  wheel   11130 30 Nov 20:30 printf.h
-rw-r--r--    1 root  wheel    6142 30 Nov 16:56 profile.h
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 protocols
drwxr-xr-x   10 root  wheel     320 30 Nov 20:33 pthread
lrwxr-xr-x    1 root  wheel      17 10 Jan 12:01 pthread.h -> pthread/pthread.h
lrwxr-xr-x    1 root  wheel      22 10 Jan 12:01 pthread_impl.h -> pthread/pthread_impl.h
lrwxr-xr-x    1 root  wheel      22 10 Jan 12:01 pthread_spis.h -> pthread/pthread_spis.h
-r--r--r--    1 root  wheel    4749 30 Nov 16:56 pwd.h
lrwxr-xr-x    1 root  wheel      79 10 Jan 12:01 python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-r--r--r--    1 root  wheel    4967 30 Nov 16:56 ranlib.h
drwxr-xr-x    4 root  wheel     128 10 Jan 12:02 readline
-r--r--r--    1 root  wheel    1664 30 Nov 16:56 readpassphrase.h
-r--r--r--    1 root  wheel    9422 30 Nov 20:30 regex.h
-rw-r--r--    1 root  wheel    2234 30 Nov 16:56 removefile.h
-rw-r--r--    1 root  wheel   18854 30 Nov 16:56 resolv.h
drwxr-xr-x   14 root  wheel     448 30 Nov 20:33 rpc
drwxr-xr-x   34 root  wheel    1088 30 Nov 20:33 rpcsvc
-r--r--r--    1 root  wheel    3738 30 Nov 20:30 rune.h
-r--r--r--    1 root  wheel    4198 30 Nov 16:56 runetype.h
-rw-r--r--    1 root  wheel    3475 30 Nov 20:30 sandbox.h
drwxr-xr-x   10 root  wheel     320 30 Nov 20:33 sasl
lrwxr-xr-x    1 root  wheel      15 10 Jan 12:01 sched.h -> pthread/sched.h
-r--r--r--    1 root  wheel    1373 30 Nov 16:56 search.h
drwxr-xr-x    6 root  wheel     192 30 Nov 20:33 secure
drwxr-xr-x   10 root  wheel     320 30 Nov 20:33 security
-r--r--r--    1 root  wheel    1135 30 Nov 16:56 semaphore.h
drwxr-xr-x    9 root  wheel     288 10 Jan 12:02 servers
-rw-r--r--    1 root  wheel    3139 30 Nov 16:56 setjmp.h
-r--r--r--    1 root  wheel    2213 30 Nov 16:56 sgtty.h
-r--r--r--    1 root  wheel    5226 30 Nov 16:56 signal.h
drwxr-xr-x   19 root  wheel     608 30 Nov 20:33 simd
-rw-r--r--    1 root  wheel   38247 30 Nov 16:56 slapi-plugin.h
-rw-r--r--    1 root  wheel    8242 30 Nov 20:30 spawn.h
-rw-r--r--    1 root  wheel  478848 30 Nov 20:30 sqlite3.h
-rw-r--r--    1 root  wheel   35348 30 Nov 20:30 sqlite3ext.h
-r--r--r--    1 root  wheel    3273 30 Nov 16:56 stab.h
-r--r--r--    1 root  wheel    1234 30 Nov 16:56 standards.h
-r--r--r--    1 root  wheel    3816 30 Nov 16:56 stddef.h
-r--r--r--    1 root  wheel    5556 30 Nov 16:56 stdint.h
-r--r--r--    1 root  wheel    1668 30 Nov 16:56 stdint.modulemap
-r--r--r--    1 root  wheel   16208 30 Nov 20:30 stdio.h
-r--r--r--    1 root  wheel   14730 30 Nov 20:30 stdlib.h
-r--r--r--    1 root  wheel    1968 30 Nov 16:56 strhash.h
-r--r--r--    1 root  wheel    7769 30 Nov 20:30 string.h
-rw-r--r--    1 root  wheel    2222 30 Nov 20:30 string_x86.h
-r--r--r--    1 root  wheel    2233 30 Nov 16:56 stringlist.h
-r--r--r--    1 root  wheel    4208 30 Nov 20:30 strings.h
-r--r--r--    1 root  wheel    3120 30 Nov 16:56 struct.h
drwxr-xr-x  137 root  wheel    4384 30 Nov 20:33 sys
-r--r--r--    1 root  wheel    1410 30 Nov 16:56 sys__types.modulemap
-r--r--r--    1 root  wheel     248 30 Nov 16:56 sys_cdefs.modulemap
-r--r--r--    1 root  wheel     809 30 Nov 16:56 sys_types.modulemap
-rw-r--r--    1 root  wheel    5530 30 Nov 20:30 sysdir.h
-r--r--r--    1 root  wheel    5472 30 Nov 16:56 sysexits.h
-r--r--r--    1 root  wheel    1004 30 Nov 16:56 syslog.h
-r--r--r--    1 root  wheel    3146 30 Nov 16:56 tar.h
lrwxr-xr-x    1 root  wheel      72 10 Jan 12:01 tcl.h -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tcl.h
lrwxr-xr-x    1 root  wheel      77 10 Jan 12:01 tclDecls.h -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tclDecls.h
lrwxr-xr-x    1 root  wheel      81 10 Jan 12:01 tclPlatDecls.h -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tclPlatDecls.h
lrwxr-xr-x    1 root  wheel      79 10 Jan 12:01 tclTomMath.h -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tclTomMath.h
lrwxr-xr-x    1 root  wheel      84 10 Jan 12:01 tclTomMathDecls.h -> ../../System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tclTomMathDecls.h
-rw-r--r--    1 root  wheel   38205 30 Nov 16:56 term.h
-rw-r--r--    1 root  wheel    7081 30 Nov 16:56 term_entry.h
-rw-r--r--    1 root  wheel    3476 30 Nov 16:56 termcap.h
-r--r--r--    1 root  wheel    1199 30 Nov 16:56 termios.h
-rw-r--r--    1 root  wheel   30569 30 Nov 16:56 tgmath.h
-rw-r--r--    1 root  wheel   12206 30 Nov 16:56 tic.h
drwxr-xr-x    7 root  wheel     224 30 Nov 20:33 tidy
-r--r--r--    1 root  wheel    8104 30 Nov 20:30 time.h
-r--r--r--    1 root  wheel    2684 30 Nov 16:56 timeconv.h
lrwxr-xr-x    1 root  wheel      70 10 Jan 12:01 tk.h -> ../../System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tk.h
lrwxr-xr-x    1 root  wheel      75 10 Jan 12:01 tkDecls.h -> ../../System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tkDecls.h
lrwxr-xr-x    1 root  wheel      82 10 Jan 12:01 tkIntXlibDecls.h -> ../../System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tkIntXlibDecls.h
lrwxr-xr-x    1 root  wheel      76 10 Jan 12:01 tkMacOSX.h -> ../../System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tkMacOSX.h
lrwxr-xr-x    1 root  wheel      79 10 Jan 12:01 tkPlatDecls.h -> ../../System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tkPlatDecls.h
-r--r--r--    1 root  wheel    2903 30 Nov 16:56 ttyent.h
-r--r--r--    1 root  wheel    5575 30 Nov 16:56 tzfile.h
-rw-r--r--    1 root  wheel    1803 30 Nov 20:30 ucontext.h
-r--r--r--    1 root  wheel    1625 30 Nov 16:56 ulimit.h
-rw-r--r--    1 root  wheel    3005 30 Nov 16:56 unctrl.h
-r--r--r--    1 root  wheel   28863 30 Nov 20:30 unistd.h
-rw-r--r--    1 root  wheel   14299 30 Nov 16:56 unwind.h
-r--r--r--    1 root  wheel    4552 30 Nov 20:30 util.h
-r--r--r--    1 root  wheel    3164 30 Nov 16:56 utime.h
-r--r--r--    1 root  wheel    4010 30 Nov 20:30 utmp.h
-r--r--r--    1 root  wheel    6798 30 Nov 20:30 utmpx.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 uuid
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 vfs
-r--r--r--    1 root  wheel    5278 30 Nov 16:56 vis.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 voucher
-rw-r--r--    1 root  wheel    1420 30 Nov 20:30 vproc.h
-r--r--r--    1 root  wheel   10206 30 Nov 20:30 wchar.h
-r--r--r--    1 root  wheel    3464 30 Nov 16:56 wctype.h
-r--r--r--    1 root  wheel    3085 30 Nov 20:30 wordexp.h
drwxr-xr-x    3 root  wheel      96 30 Nov 20:33 xar
-rw-r--r--    1 root  wheel    5976 30 Nov 20:30 xattr_flags.h
-rw-r--r--    1 root  wheel    2669 30 Nov 20:30 xcselect.h
drwxr-xr-x   14 root  wheel     448 30 Nov 20:33 xlocale
-r--r--r--    1 root  wheel    3087 30 Nov 16:56 xlocale.h
drwxr-xr-x   11 root  wheel     352 30 Nov 20:33 xpc
-rw-r--r--    1 root  wheel   16085 30 Nov 16:56 zconf.h
-rw-r--r--    1 root  wheel   98288 30 Nov 20:30 zlib.h
paul@Mac-mini tilemaker % 

The problem is that the header files and libraries are not located where the tilemaker Makefile expects them. Apple no longer allows /usr to be used for 3rd party files. See the Xcode release notes I linked to when I submitted this bug report. I did some local debugging, hacking away at the tilemaker Makefile to change paths. I was able to get the build to progress further but it still failed when compiling for me eventually and I was not able to work out why as I don't know C++. I suspect compile header dependencies were incorrect for me. It was never going to build anyway as homebrew failed to install shapelib.

systemed commented 3 years ago

If you edit lines 48-50 of the Makefile to read

else
  LUA_VER := unidentified system Lua
  LUA_LIBS := -llua
endif

then does that work? (If not, how about with LUA_LIBS := -llua5.1 ? Homebrew is a bit ornery about what it calls its Lua installation.)

The specific problem appears to be that our Lua check looks in the standard locations, which Apple have broken. I'm a little puzzled as to where Lua actually is given that it doesn't appear to be in your /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include either.

Failing that we could probably just resort to pkg-config --libs lua and pkg-config --cflags lua to get pkg-config to tell us where Lua is.

systemed commented 3 years ago

This now seems to work fine on my Macbook running Big Sur so I'll close this - do reopen if you encounter any further issues.

prebm commented 3 years ago

This is a quick writeup how I got Tilemaker running on a M1 Mac.

Dependencies

Installing dependencies (following this post: Creating OpenStreetMap Tiles | p3dt.net)

brew install lua@5.1
brew install protobuf
brew install boost
brew install sqlite3

Because there is no shapelib bottle for Apple Silicion we have to build it from source to /usr/local/ by

./configure && make && sudo make install

and create a symlink to /opt/homebrew/ for easier integration with the Tilemaker Makefile

ln -s /usr/local/lib/libshp.dylib /opt/homebrew/lib/libshp.dylib

Install Tilemaker

Before building Tilemaker the contents of the Makefile need to be changed.

First another condition needs to be added for lua

else ifneq ("$(wildcard /opt/homebrew/include/lua-5.1/lua.h)","")
  LUA_VER := Lua 5.1
  LUA_CFLAGS := -I/opt/homebrew/include/lua-5.1
  LUA_LIBS := -llua5.1

and then the paths to the libraries need to be changed from /usr/local/to /opt/homebrew

LIB := -L/opt/homebrew/lib ...
INC := -I/opt/homebrew/include ...

I will try to add a PR for the changes in the Makefile if desired.

systemed commented 3 years ago

That would be helpful - yes please! It looks like there's now a shapelib bottle for Apple Silicon: https://formulae.brew.sh/formula/shapelib

Possibly slightly cleaner to have extra variables (something like PLATFORM_LIB?) for the library path, rather than adding /opt/homebrew to the install paths when installing on Linux or anything.

(I wonder if there's some arcane Makefile magic we can do that would let us look in /opt/*/include, so it would also take in /opt/local/ for MacPorts. But that's one for the future!)