Skip to content
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

Bioconda recipe for macosx-arm64? #72

Open
a-munoz-rojas opened this issue Aug 21, 2023 · 8 comments
Open

Bioconda recipe for macosx-arm64? #72

a-munoz-rojas opened this issue Aug 21, 2023 · 8 comments

Comments

@a-munoz-rojas
Copy link

Can't install parasail-python using conda in a Mac with the arm64 chip - the package is missing from bioconda. I know some bioconda recipes are missing for arm64. Not sure if I should post this here or if someone else has created the bioconda recipes for parasail.

@cjw85
Copy link

cjw85 commented Oct 2, 2023

We have macOS ARM binaries here: https://anaconda.org/nanoporetech/parasail-python/files

bioconda does not make any aarch64 binaries.

@DoaneAS
Copy link

DoaneAS commented Oct 2, 2023

Hi,
Is it possible to make ARM binaries for python 3.9?

@jeffdaily
Copy link
Owner

parasail wheels are python universal. @DoaneAS are you having issue with one of the wheels?

@DoaneAS
Copy link

DoaneAS commented Oct 8, 2023

Correct, issue is with building wheel.

× python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [91 lines of output]

Happy to provide more output if helpful, but here is where I see the error occuring during build:

$ pip install parasail
...
 × python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [91 lines of output]
    running bdist_wheel
    parasail/libparasail.dylib not found, attempting to build
    Downloading latest parasail master
    Unzipping parasail master archive
    fixing executable bits after unzipping
    Unable to find parasail configure script
    Prepending /usr/bin to PATH
    Running autoreconf -fi from ./parasail-master
    b'This is perl 5, version 30, subversion 3 (v5.30.3) built for darwin-thread-multi-2level'
    b'GNU M4 1.4.6'
    b'autoconf (GNU Autoconf) 2.71'
    b'automake (GNU automake) 1.16.5'
    b'glibtoolize (GNU libtool) 2.4.7'
    b'autoreconf (GNU Autoconf) 2.71'
    configure.ac:13: warning: The macro `AC_CONFIG_HEADER' is obsolete.
    configure.ac:13: You should run autoupdate.
    ./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
    configure.ac:13: the top level
    configure.ac:109: warning: The macro `AC_PROG_CC_C99' is obsolete.
    configure.ac:109: You should run autoupdate.
    ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
    configure.ac:109: the top level
    configure.ac:109: installing 'build-aux/compile'
    configure.ac:78: installing 'build-aux/config.guess'
    configure.ac:78: installing 'build-aux/config.sub'
    configure.ac:70: installing 'build-aux/install-sh'
    configure.ac:70: installing 'build-aux/missing'
    Makefile.am:22: error: Libtool library used but 'LIBTOOL' is undefined
    Makefile.am:22:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
    Makefile.am:22:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
    Makefile.am:22:   If 'LT_INIT' is in 'configure.ac', make sure
    Makefile.am:22:   its definition is in aclocal's search path.
    Makefile.am: installing 'build-aux/depcomp'
    parallel-tests: installing 'build-aux/test-driver'
    autoreconf: error: automake failed with exit status: 1
    autoreconf -fi exited with return code 1
    ```
    
thanks

@DoaneAS
Copy link

DoaneAS commented Oct 8, 2023

A work around for the time being on macosx-arm64 is to install parasail using homebrew, then:

PARASAIL_SKIP_BUILD=TRUE
PARASAIL_LIBPATH=/opt/homebrew/Cellar/parasail/2.4.2/lib
pip install parasail

From this I am able to import the library and run the example code.

@cjw85
Copy link

cjw85 commented Oct 9, 2023

@DoaneAS,

The error autoreconf -fi exited with return code 1 likely stems from not having all the build tools required when you ran the pip install. I received this error when the tool aclocal was not present. To build from the pip source distribution you would need to do the following first:

brew install automake autoconf libtool

(although I note that the setup.py script appears to download an compile some of these tools, but leaves aclocal missing).

@DoaneAS
Copy link

DoaneAS commented Oct 10, 2023

@cjw85,

I have automake, autoconf, and libtool installed via brew, however I think the issue is the path brew is using on M1 macs. Brew installs everything into /opt/homebrew for M1 macs (see their FAQ for more info).

My $PATH includes /opt/homebrew paths, but I suspect these are being superseded by the mamba environment or search paths specified by the parasail-python installer. E.g. prepending /usr/local/bin or similar. Do you think this is possible?

In any case, after installing parasail via brew install parasail and adding the path to parasail libraries PARASAIL_LIBPATH=/opt/homebrew/Cellar/parasail/2.4.2/lib, I can install parasail-python from source by cloning this repo and pip install ..

@cjw85
Copy link

cjw85 commented Oct 10, 2023

The setup.py of parasail-python detects that you are running on a mac and then contorts the names of various tools to be equivalents that are expected to be installed through homebrew setup.py#L165. (Incidentally the conda builds of parasail-python patch the setup.py to not have this bahaviour).

By building parasail outside of the Python package one of the things you are accomplishing is sidestepping all the logic in the setup.py. Otherwise the build within the Python pacakge is pretty identical to prebuilding parasail.

FYI, its not that difficult to build the conda package using conda build, if you want the more authentic conda experience. You need only the files from: https://github.com/bioconda/bioconda-recipes/tree/master/recipes/parasail-python and run conda build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants