New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue building on OSX 10.8.2 #1738
Comments
I'm able to build on 10.8.2 without a hitch.
|
Maybe it's matplotlib 1.2.0 vs 1.3.x? |
@jrdmcgr If this is still an issue please re-open |
I am having the same problem on OSX 10.9.1: BUILDING MATPLOTLIB matplotlib: yes [1.3.1] python: yes [2.7 (r27:82500, Feb 21 2014, 18:09:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]] platform: yes [darwin] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.6.2] dateutil: yes [using dateutil version 2.2] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [pyparsing was not found. It is required for mathtext support. pip/easy_install may attempt to install it after matplotlib.] pycxx: yes [Couldn't import. Using local copy.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: yes [version 17.1.11] png: yes [version 1.5.18] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite] OPTIONAL BACKEND EXTENSIONS macosx: yes [installing, darwin] qt4agg: no [PyQt4 not found] gtk3agg: no [Requires pygobject to be installed.] gtk3cairo: no [Requires cairo to be installed.] gtkagg: no [Requires pygtk] tkagg: yes [installing, version 81008] wxagg: no [requires wxPython] gtk: no [Requires pygtk] agg: yes [installing] cairo: no [cairo not found] windowing: no [Microsoft Windows only] OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: no latex: no pdftops: no and the error: building 'matplotlib.ft2font' extension /usr/local/bin//gcc-4.2 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Users/valentin/.pyenv/versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.5.2/include/freetype2 -I/Users/valentin/.pyenv/versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.4-x86_64-2.7/src/ft2font.o src/ft2font.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’: src/ft2font.cpp:854: instantiated from here src/ft2font.cpp:854: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’ but no definition available src/ft2font.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’: src/ft2font.cpp:854: instantiated from here src/ft2font.cpp:854: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’ but no definition available src/ft2font.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’: src/ft2font.cpp:854: instantiated from here src/ft2font.cpp:854: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’ but no definition available src/ft2font.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’: src/ft2font.cpp:854: instantiated from here src/ft2font.cpp:854: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’ but no definition available src/ft2font.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’: src/ft2font.cpp:854: instantiated from here src/ft2font.cpp:854: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]’ but no definition available error: command '/usr/local/bin//gcc-4.2' failed with exit status 1 Complete output from command /Users/valentin/.pyenv/versions/2.7/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/h_/jrvb3jpj6wl67l8jk14v7s6w0000gp/T/pip_build_valentin/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/h_/jrvb3jpj6wl67l8jk14v7s6w0000gp/T/pip-ecPPeW-record/install-record.txt --single-version-externally-managed --compile: I installed the freetype and libpng libs with homebrew. I am also using pyenv to manage my local python versions. |
Building against the OSX system python was successful, so the problem is only there when building against a pyenv installed python. I fixed the issue in the above case by adding a compiler option: -mmacosx-version-min=10.9 The code is something like this in setupext.py, class CXX, add_flags: # OSX 10.9 requires a special flag if sys.platform == "darwin" and re.match("10\.9.*$", platform.mac_ver()[0]): ext.extra_compile_args.append("-mmacosx-version-min=10.9") I can provide a pull request for this, but I am not sure this is a use case that should be supported by the library, because using a non-system python prevents matplotlib from using the native macosx backend. Do you want a pull request for this? |
I think a PR would be good. Not everyone on mac wants to use the native backend and this seems like a small enough change that it is worth including. |
Here it is: #2883 |
I'm on OS X 10.8.2
It seems like I am missing some headers or some other code, but I'm just guessing. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: