Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Error installing MAJIQ

238 views
Skip to first unread message

ANSALNA ANSARI

unread,
Jul 3, 2023, 7:33:36 PM7/3/23
to Biociphers

Hello,

I'm encountering this problem. I've installed gcc and tried to use that instead of clang with brew install gcc and $ export C=`which gcc`

and
$ export CXX=`which g++`

yet this error persists - 


/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here

      __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")

      ^

      /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

              #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))

                                                            ^

      In file included from rna_majiq/src/build.cpp:790:

      In file included from rna_majiq/src/internals/grimoire.hpp:12:

      In file included from rna_majiq/src/internals/psi.hpp:11:

      In file included from rna_majiq/src/internals/stats/stats.hpp:4:

      In file included from rna_majiq/src/internals/stats/MannWhitney.hpp:62:

      In file included from rna_majiq/src/internals/boost/math/distributions/normal.hpp:19:

      In file included from rna_majiq/src/internals/boost/math/special_functions/erf.hpp:15:

      In file included from rna_majiq/src/internals/boost/math/special_functions/gamma.hpp:24:

      In file included from rna_majiq/src/internals/boost/math/constants/constants.hpp:13:

      In file included from rna_majiq/src/internals/boost/math/tools/convert_from_string.hpp:15:

      In file included from rna_majiq/src/internals/boost/lexical_cast.hpp:32:

      In file included from rna_majiq/src/internals/boost/lexical_cast/try_lexical_convert.hpp:44:

      In file included from rna_majiq/src/internals/boost/lexical_cast/detail/converter_lexical.hpp:54:

      rna_majiq/src/internals/boost/lexical_cast/detail/converter_lexical_streams.hpp:310:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

                          sprintf(begin,

                          ^

      /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here

      __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")

      ^

      /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

              #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))

                                                            ^

      In file included from rna_majiq/src/build.cpp:792:

      rna_majiq/src/internals/io_bam.hpp:8:10: fatal error: 'htslib/sam.h' file not found

      #include "htslib/sam.h"

               ^~~~~~~~~~~~~~

      3 warnings and 1 error generated.

      error: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1

      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.

  ERROR: Failed building wheel for rna-majiq

  Building wheel for rna-voila (pyproject.toml) ... done

  Created wheel for rna-voila: filename=rna_voila-2.4.dev102+g2cae1507-py3-none-any.whl size=2476503 sha256=35e2abd8c5ef2e89693f72f1c2f7d3418924373a884cd607a65e505937ecd12e

  Stored in directory: /private/var/folders/3g/2vpn0z5d7q72w_1qhn2t4b7r0000gn/T/pip-ephem-wheel-cache-7ceu5cj7/wheels/c7/83/d6/d982192fabec916a10ce1c275957b585f1c4dc11d5eaeda3ab

Successfully built rna-majiq-meta rna-voila

Failed to build rna-majiq

ERROR: Could not build wheels for rna-majiq, which is required to install pyproject.toml-based projects

San Jewell

unread,
Aug 9, 2023, 6:18:18 PM8/9/23
to Biociphers
Hello Ansalna,

The relevant part of the error message is: rna_majiq/src/internals/io_bam.hpp:8:10: fatal error: 'htslib/sam.h' file not found   ;   this indicates that HTSLIB was unable to be found.

You can install htslib at a system level, with your package manager, in which case, you should have no need to set any environment variables, OR you can install and compile htslib manually.

For the former option it's probably something like $ brew install htslib  , but you'd need to verify that as I'm a little less familiar with OSX, but it's probably the easier option.

If you are doing the latter option, In this case, when compiling htslib, you can specify an installation directory.. (after downloading from http://www.htslib.org/) For example:

./configure --prefix=/home/user/htslib
make
make install

After this is complete, then you can set the two variables as you have mentioned in otder to tell the majiq installer where to find htslib:

export HTSLIB_LIBRARY_DIR=/home/user/htslib/lib
export HTSLIB_INCLUDE_DIR=/home/user/htslib/include
pip install .

Please let me know if this helps, otherwise, please let me know your operating system, as well as the actual steps you took to install htslib on your system before and which command you are using for majiq. Please also let me know the python version.

Thanks,
-San
Reply all
Reply to author
Forward
0 new messages