Libpostal no longer builds on MacOS catalina
Hi!
I have successfully built libpostal on Linux. But it fails to build on MacOS X (Catalina 10.15.6). It fails with the following error on make:
crf_context.c:366:23: error: implicit declaration of function 'double_equals' is invalid in C99 [-Werror,-Wimplicit-function-declaration] double scale_t = !double_equals(sum, 0.) ? 1. / sum : 1.;
Here is also the output of my gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.31.1) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Any attention to this would be greatly appreciated.
Hi guys, here is the fix for this issue. Please kindly merge.
Thanks @albarrentine, much appreciated!
Is there any ETA on a new version release (and closing this issue)?
For the record, I did not encounter this bug, but rather did a successful install of latest tag v1.1-alpha on OS X Catalina 10.15.7 using
brew install robsalasco/libpostal/libpostal
Might it be a clang vs gcc issue? Homebrew defaults to clang. Similarly, PyICU doesn't like installing with gcc@8 on my machine. ref
https://gist.github.com/ddelange/6e04e81b99fae08e817a00515d4a378d
Is there any ETA on a new version release (and closing this issue)?
1.1 was released so this issue can be closed.
For the record, I did not encounter this bug, but rather did a successful install of latest tag
v1.1-alphaon OS X Catalina 10.15.7 using
Implicit declaration of function has not been allowed since the C99 standard was introduced (in 1999). However because it was allowed in the C89 standard, C99 compilers only issued a warning. That changed with the introduction of Xcode 12 a couple years ago. Its clang compiler considers it to be an error. So you would not have seen the problem if you were using Xcode 11 or earlier on macOS 10.15 or earlier.