Hello, I was able to successfully configure Pylith on my MacOS Big Sur (11.6.3) intel core i5. However, when running make, although it downloads and gets through a lot of the make file’s commands, it eventually stops at this stage:
…/proj-8.1.1/./install-sh -c -d ‘/Users/saeedmohanna/pylith/share/doc/proj’
/usr/bin/install -c -m 644 …/proj-8.1.1/COPYING …/proj-8.1.1/NEWS …/proj-8.1.1/AUTHORS ‘/Users/saeedmohanna/pylith/share/doc/proj’
…/proj-8.1.1/./install-sh -c -d ‘/Users/saeedmohanna/pylith/lib/pkgconfig’
/usr/bin/install -c -m 644 proj.pc ‘/Users/saeedmohanna/pylith/lib/pkgconfig’
dyld: Library not loaded: @rpath/libtiff.5.dylib
Referenced from: /Users/saeedmohanna/pylith/bin/projsync
Reason: image not found
/bin/sh: line 1: 26556 Abort trap: 6 projsync --system-directory --all
make: *** [proj] Error 134
make: *** [installed_proj] Error 2
make: *** [all-recursive] Error 1
I looked in my /usr/local/lib and /usr/local/Cellar/libtiff/4.5.1/lib folders and saw that there is a libtiff.6.dylib file in each (NOT a libtiff.5.dylib file). Do I need to downgrade to libtiff.5?
I could not find a make.log file and not sure where to find the list of system packages I am using. I also attempted to attach the config.log file but this website would not allow me to upload it.
I am assuming you are using the PyLith installer utility. Yes, you need the libtiff version that works with the Proj version that you are using. You can use the
--enable-tiff command line argument to the PyLith installer utility configure to install a compatible version of libtiff.
Note: When running
make fails and you need to rerun the installer utility configure with different parameters, we strongly recommend that you delete BOTH the destination directory (specified by --prefix=DIR) and the directory where you are building. This ensures that all of the dependencies are built with consistent settings.
Thank you for your prompt reply! I deleted and remade the build and destination directories and re-ran the configure command with you recommended argument. I then ran make and did not get any errors with libtiff, but I did get the following error when the make file is trying to compile netcdfpy:
It seems like it cannot find the numpy library even though I see numpy in the $PYTHONPATH. Not sure what to do from here. I even uninstalled and reinstalled numpy and re ran the configure and install steps.
Here are some things to check:
- Did you run
source setup.sh before running
- Before running
source setup.sh, PYTHONPATH should be empty or not set. Make sure it does not have any Anaconda, Conda, other Python virtual environments, or other directories with Python packages. The PyLith installer creates a Python virtual environment for the PyLith install. You should keep your Python virtual environments isolated from each other.
Yes, I did both (see below)
Can you post
make.log (you may need to put it in a zip file)?
It would also help us if you could post the
config.log (this file is generated automatically whenever you run configure) from the top-level build directory where you configured the installer and any subdirectories where running
make failed (only available for packages that are installed using configure).
I tried attaching the .zip file to this reply, but got the following error message:
Is there some email I can send it to?
Sorry about the forum not letting you attach a file because you are “new”. That is a very annoying feature of this forum. I upgraded you to “basic user”. Try attaching the file now. If it doesn’t work, let me know.
Thanks! Here is the zip file containing make.log and config.log
log_files.zip (284.7 KB)
config.log shows that when you ran configure, you have anaconda at the front of your
PATH. Even though the
setup.sh will put the PyLith installation directory (designated by --prefix=DIR) at the front of your path, our experience is that the
make commands will sometimes use packages found during the configure. My suggestion is to update your
PATH before running the PyLith installer configure so that it does not have anaconda in it. Then rerun configure and rebuild. Again, you should wipe clean both the build and install directories to ensure everything from the previous installation attempt is deleted and doesn’t interfere with the new attempt.
Hi, I did what you suggested and am now facing some sort of compiling error for h5py. I have attached the log files again for your reference.
log_files2.zip (270.3 KB)
Something is clearly wrong with how it is trying to build h5py using the installed HDF5. It looks like some sort of incompatibility with cython; it might be trying to use a newer version of cython than what was used to setup h5py v3.6.0. I will dig up my macOS Intel build of the PyLith v3.0.3 binary to see if I can find the problem.
I am zeroing in on the problem.
In the meantime, is there a reason you are not using the macOS binary for Intel processors? Installation is very quick and easy.
I haven’t tried that option to be honest. I just downloaded the binaries tar ball from https://github.com/geodynamics/pylith/releases/download/v3.0.3/pylith-3.0.3-macOS-10.15-x86_64.tar.gz and followed the instructions from Installation — PyLith 3.0.3 documentation
I did all the steps but when I type the pylith command into my terminal I get repeated messages from Apple saying cannot be opened because the developer cannot be verified. Even after clicking “Allow anyway” for the first few and using chmod 777/sudo commands, I keep getting this message for every package in the bin and lib folders.
However, I just tried doing the same for a linux computer and the example ran fine which is all I need for now. Thanks for your patience and support throughout this.
From Installation — PyLith 3.0.3 documentation
To bypass macOS quarantine restrictions, simply use command line program
curl to download the tarball from within a terminal rather than using a web browser.
curl -L -O https://github.com/geodynamics/pylith/releases/download/v3.0.3/pylith-3.0.3-macOS-10.15-x86_64.tar.gz
Alternatively, if you do download the tarball using a web browser, after you unpack the tarball you can remove the macOS quarantine flags using the following commands (requires Administrator access):
# Show extended attributes
# Output should be
# Remove quarantine attributes
sudo xattr -r -d com.apple.quarantine ./pylith-3.0.3-macOS-10.15-x86_64