vanheeringen-lab / gimmemotifs

Suite of motif tools, including a motif prediction pipeline for ChIP-seq experiments. See full GimmeMotifs documentation for detailed installation instructions and usage examples.
https://gimmemotifs.readthedocs.io/en/master
MIT License
110 stars 33 forks source link

Cannot install package #320

Open DrNamwob opened 4 months ago

DrNamwob commented 4 months ago

I cannot install gimmemotifs in my anaconda environment with pip, conda, or from source code. I get the same error regardless. Can someone please help? Thank you!

The error occurs here: building 'gimmemotifs.c_metrics' extension Here is a printout of the error mesage: gimmemotifs/c_metrics.c: In function 'get_truncate_len': gimmemotifs/c_metrics.c:315:5: error: type of 'len1' defaults to 'int' [-Wimplicit-int] 315 | int get_truncate_len(len1, len2, pos) { | ^~~~ gimmemotifs/c_metrics.c:315:5: error: type of 'len2' defaults to 'int' [-Wimplicit-int] gimmemotifs/c_metrics.c:315:5: error: type of 'pos' defaults to 'int' [-Wimplicit-int] gimmemotifs/c_metrics.c: In function 'c_metrics_pwmscan': gimmemotifs/c_metrics.c:564:16: warning: unused variable 'pwm_min' [-Wunused-variable] 564 | double pwm_min = -50; | ^~~ gimmemotifs/c_metrics.c:563:13: warning: unused variable 'c' [-Wunused-variable] 563 | int c; | ^ gimmemotifs/c_metrics.c: At top level: gimmemotifs/c_metrics.c:901:22: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 901 | {NULL, NULL, NULL, 0, NULL} | ^~~~ gimmemotifs/c_metrics.c:901:22: note: (near initialization for 'CoreMethods[4].ml_flags') gimmemotifs/c_metrics.c:901:31: warning: excess elements in struct initializer 901 | {NULL, NULL, NULL, 0, NULL} | ^~~~ gimmemotifs/c_metrics.c:901:31: note: (near initialization for 'CoreMethods[4]')

ebasto commented 2 months ago

Hi mate, I downgraded my GCC and it worked for me. While I'm not sure what's the most appropriate version to use, I did the following:

brew install gcc@12 export CC=/opt/homebrew/bin/gcc-12 then installation