Print

Print


@simonmichal Thanks for the response. I just gave it a try. Unfortunately, the [xrootd in brew](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/xrootd.rb) is built with `-DENABLE_PYTHON=OFF`, so this is not something the new PyPI version solves.

Furthermore, I'm unable to install xrootd 5.3.0 via `pip`. It reports missing dependencies - openssl development package. Note that openssl is installed via `brew` (including the headers). However, the following is part of what `brew` prints when installing `openssl`:
```
    [log in to unmask] is keg-only, which means it was not symlinked into /opt/homebrew,
    because macOS provides LibreSSL.
    If you need to have [log in to unmask] first in your PATH run:
    echo 'export PATH="[log in to unmask]:$PATH"' >> ~/.zshrc
    For compilers to find [log in to unmask] you may need to set:
    export LDFLAGS="[log in to unmask]"
    export CPPFLAGS="[log in to unmask]"
```
Maybe the makefiles would need to be updated for use on M1 Macs?

In any case, I was able to compile with Python bindings from source and it works without problems. The steps are somewhat convoluted, so I'll write them here for others looking for a solution.

### Compiling XRootD with Python bindings on M1 Macs
 - Run `cmake` like this

```shell
cmake -DENABLE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=/opt/xrootd -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl ..
```
 - Edit `CMakeCache.txt` and change the following variables to point to the `brew` Python, like so:
```
PYTHON_EXECUTABLE:FILEPATH=/opt/homebrew/bin/python3
PYTHON_INCLUDE_DIR:PATH=/opt/homebrew/Frameworks/Python.framework/Versions/3.9/include/python3.9
PYTHON_LIBRARY:FILEPATH=/opt/homebrew/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
```
- Run `make` and `sudo make install`
- Add `export PYTHONPATH=/opt/xrootd/lib/python3.9/site-packages:$PYTHONPATH` to `.zshrc`/`.bashrc`/...
- Confirm that it is working by running `python3 -c "import pyxrootd"`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1480#issuecomment-887703037

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1