Build fails on MacOS Mojave, January 2019
See original GitHub issueI don’t know whether this is user error, a return of Issue #34, or something new (since #34 seems to have been closed as resolved), but I just tried and failed to build marisa-trie under MacOS Mojave. Details below.
Vombatus:SciFi djb$ pip install marisa-trie
Collecting marisa-trie
Using cached https://files.pythonhosted.org/packages/20/95/d23071d0992dabcb61c948fb118a90683193befc88c23e745b050a29e7db/marisa-trie-0.7.5.tar.gz
Building wheels for collected packages: marisa-trie
Running setup.py bdist_wheel for marisa-trie ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-install-f2s2mhpn/marisa-trie/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-wheel-syviv4xc --python-tag cp37:
running bdist_wheel
running build
running build_clib
building 'libmarisa-trie' library
creating build
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/io
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/trie
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/vector
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -Imarisa-trie/lib -Imarisa-trie/include -c marisa-trie/lib/marisa/trie.cc -o build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/trie.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from marisa-trie/lib/marisa/trie.cc:1:
marisa-trie/include/marisa/stdio.h:4:10: fatal error: 'cstdio' file not found
#include <cstdio>
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for marisa-trie
Running setup.py clean for marisa-trie
Failed to build marisa-trie
Installing collected packages: marisa-trie
Running setup.py install for marisa-trie ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-install-f2s2mhpn/marisa-trie/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-record-539k0cjv/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_clib
building 'libmarisa-trie' library
creating build
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/io
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/trie
creating build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/grimoire/vector
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -Imarisa-trie/lib -Imarisa-trie/include -c marisa-trie/lib/marisa/trie.cc -o build/temp.macosx-10.7-x86_64-3.7/marisa-trie/lib/marisa/trie.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from marisa-trie/lib/marisa/trie.cc:1:
marisa-trie/include/marisa/stdio.h:4:10: fatal error: 'cstdio' file not found
#include <cstdio>
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-install-f2s2mhpn/marisa-trie/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-record-539k0cjv/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/46/5fcnvzts14527hn_3ryrqr100000gn/T/pip-install-f2s2mhpn/marisa-trie/
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
If an error occurred while updating or installing macOS
If an error occurred while updating or installing macOS · Check your internet connection · Install in safe mode · Install after repairing...
Read more >How to Fix “application is damaged, can't be used to install ...
The cause of this error is an expired certificate, and because the certificate is expired the “Install macOS” app for Mojave, Sierra, ...
Read more >A List of Apps Having Problems Running in macOS Mojave
macOS Mojave has many new features that can cause some apps to no longer work correctly or outright crash. Check our list for...
Read more >Can't compile C program on a Mac after upgrade to Mojave
I have used the gcc command on the terminal to compile C programs but all of a sudden, after an update to my...
Read more >Multithread R installation fails macOS Mojave 10.14.2 - XGBoost
Multithread R installation fails macOS Mojave 10.14.2 · DanOvando January 3, 2019, 8:55pm #1 ... BuildVersion: 18C54 abalone:build danovan$ R ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
from https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojaveplus
export MACOSX_DEPLOYMENT_TARGET=10.9
@bodak Thank you! Working now!
To summarize, I needed to:
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
, as described in Nigel’s response at https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave.