Skip to content

Segfault on MacOS caused by LibGMT.log_to_file #164

@chandrex

Description

@chandrex

screen shot 2018-04-20 at 16 54 44

Hi, I've been trying to install gmt-python for the past day and a half with no avail. I am on macOS 10.13.4, Python 3.6.5 (installed with Anaconda 3). I've been following all of the installation instruction, and everything seems fine except when I get to the very end, with the gmt.test().

I am in the conda environment (using source activate gmt-python), and trying this in the Python interpreter. This is what happens:

(gmt-python) Chandras-MacBook-Pro:~ chandra$ python
Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import gmt
gmt.test()

returns

============================= test session starts ==============================
platform darwin -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /anaconda3/envs/gmt-python/bin/python
cachedir: .pytest_cache
Matplotlib: 2.2.2
Freetype: 2.8.1
rootdir: /Users/chandra, inifile:
plugins: mpl-0.9
collected 126 items
gmt/base_plotting.py::gmt.base_plotting.BasePlotting._preprocess <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/base_plotting.py PASSED [ 0%]
gmt/figure.py::gmt.figure.Figure <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/figure.py FAILED [ 1%]
gmt/clib/core.py::gmt.clib.core.LibGMT <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py PASSED [ 2%]
gmt/clib/core.py::gmt.clib.core.LibGMT._check_dtype_and_dim <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py PASSED [ 3%]
gmt/clib/core.py::gmt.clib.core.LibGMT.extract_region <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py gmt-python-session [ERROR]: Long input record (236 bytes) was truncated to first 126 bytes!
FAILED [ 3%]
gmt/clib/core.py::gmt.clib.core.LibGMT.grid_to_vfile <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py FAILED [ 4%]
gmt/clib/core.py::gmt.clib.core.LibGMT.log_to_file <- ../../anaconda3/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py Segmentation fault: 11

I feel like this might be because of a bash profile issue. I am not sure how to set up a .bashrc profile properly on the Mac (sorry!), but my .bash_profile looks like this (note the 'added by...' is commented out):

added by Anaconda3 5.1.0 installer
export PATH="/anaconda3/bin:$PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/anaconda3/envs/gmt-python/lib

Any help would be much appreciated! 😄
ps. let me know if any clarifications are needed, sorry first time writing an issue in!
pps. attached a screenshot of terminal, just to be super clear!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions