heathsc / gemBS

gemBS is a bioinformatics pipeline designed for high throughput analysis of DNA methylation from Whole Genome Bisulfite Sequencing data (WGBS).
GNU General Public License v3.0
32 stars 21 forks source link

Cannot install gemBS #78

Closed wynstep closed 3 years ago

wynstep commented 4 years ago

Hi there, I am trying to install gemBS from singularity base ubuntu:rolling (20.10). All dependencies are satisfied in my recipe:

apt-get -y install python3 python3-pip python3-dev apt-get install -y build-essential git pigz apt-get install -y zlib1g-dev libbz2-dev apt-get install -y libncurses5-dev liblzma-dev libssl-dev libcurl4-openssl-dev apt-get install -y autoconf pip3 install matplotlib multiprocess git clone --recursive https://github.com/heathsc/gemBS.git cd gemBS && python3 setup.py install

version of gcc and g++ is 10

This is the error I have:

make[1]: Entering directory '/gemBS/tools/utils'
gcc -O3 -g -I. -Icommon     -o ../bin/gemBS_cat gemBS_cat.c common/utils.c    -lm 
gcc -O3 -g -I. -Icommon     -o ../bin/readNameClean readNameClean/readNameClean.c common/utils.c    -lm 
gcc -O3 -g -I. -Icommon     -o ../bin/md5_fasta md5_fasta.c common/utils.c    -lm -lcrypto
gcc -O3 -g -I. -Icommon     -o ../bin/mextr mextr/mextr.c mextr/calc_gt_prob.c mextr/output.c mextr/output_utils.c mextr/output_headers.c mextr/command_line.c mextr/init_params.c mextr/files.c mextr/stats.c mextr/unpack.c mextr/rec.c mextr/bbi.c common/utils.c -I../htslib -Imextr  ../htslib/libhts.a -lcurl -lcrypto -llzma -lz -lbz2 -lpthread  -lm
mextr/command_line.c: In function ‘handle_command_line’:
mextr/command_line.c:304:31: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  304 |    memcpy(treg + i, reg->regs + j, sizeof(struct _region_t));
      |                               ^
mextr/command_line.c:310:13: warning: assignment to ‘struct bcf_sr_region_t *’ from incompatible pointer type ‘struct _region_t *’ [-Wincompatible-pointer-types]
  310 |   reg->regs = treg;
      |             ^
mextr/command_line.c:343:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  343 |     reg->regs[i].creg = -1;
      |              ^
mextr/command_line.c:343:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  343 |     reg->regs[i].creg = -1;
      |                 ^
mextr/command_line.c:344:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  344 |     reg->regs[i].nregs = reg->regs[i].mregs = 1;
      |              ^
mextr/command_line.c:344:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  344 |     reg->regs[i].nregs = reg->regs[i].mregs = 1;
      |                 ^
mextr/command_line.c:344:35: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  344 |     reg->regs[i].nregs = reg->regs[i].mregs = 1;
      |                                   ^
mextr/command_line.c:344:38: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  344 |     reg->regs[i].nregs = reg->regs[i].mregs = 1;
      |                                      ^
mextr/command_line.c:345:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  345 |     reg->regs[i].regs = malloc(sizeof(region1_t));
      |              ^
mextr/command_line.c:345:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  345 |     reg->regs[i].regs = malloc(sizeof(region1_t));
      |                 ^
mextr/command_line.c:346:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  346 |     reg->regs[i].regs->start = 0;
      |              ^
mextr/command_line.c:346:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  346 |     reg->regs[i].regs->start = 0;
      |                 ^
mextr/command_line.c:347:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  347 |     reg->regs[i].regs->end = ctgs[i].len - 1;
      |              ^
mextr/command_line.c:347:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  347 |     reg->regs[i].regs->end = ctgs[i].len - 1;
      |                 ^
mextr/command_line.c:361:32: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  361 |  args->cumul_len[0] = reg->regs[0].regs->end + 1;
      |                                ^
mextr/command_line.c:361:35: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  361 |  args->cumul_len[0] = reg->regs[0].regs->end + 1;
      |                                   ^
mextr/command_line.c:362:88: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  362 |  for(int i = 1; i < nctgs; i++) args->cumul_len[i] = args->cumul_len[i - 1] + reg->regs[i].regs->end + 1;
      |                                                                                        ^
mextr/command_line.c:362:91: error: invalid use of undefined type ‘struct bcf_sr_region_t’
  362 |  for(int i = 1; i < nctgs; i++) args->cumul_len[i] = args->cumul_len[i - 1] + reg->regs[i].regs->end + 1;
      |                                                                                           ^
mextr/unpack.c: In function ‘process’:
mextr/unpack.c:155:22: warning: too many arguments for format [-Wformat-extra-args]
  155 |       fprintf(stderr,"Reading %s\n", args->sr->regions->seq_names[id], complete);
      |                      ^~~~~~~~~~~~~~
make[1]: *** [Makefile:71: ../bin/mextr] Error 1
make[1]: Leaving directory '/gemBS/tools/utils'
make: *** [Makefile:49: _utils] Error 2

Error while compiling gemBS. That is very unfortunate.
A possible reason might be a missing dependency. Please take a look at the lines
before this one. You need the following programs and libraries installed to compile
the gemBS.
Programms needed:
    * make
    * gcc
Libraris needed:
    * python-dev (the python headers and include files)
    * libbz2-dev (for bz compression support)
On a Debian/Ubuntu system you should be able to get all needed dependencies with:
sudo apt-get install make gcc python-dev libbz2-dev

Could someone please help?

heathsc commented 4 years ago

Thank you for the report. I have not yet tried with Ubuntu 20.10, but there are some issues with gcc 10. I will look in to the problem.

Simon

On Sat, 31 Oct 2020, 12:53 Stefano Pirrò, notifications@github.com wrote:

Hi there, I am trying to install gemBS from singularity base ubuntu:rolling (20.10). All dependencies are satisfied in my recipe:

apt-get -y install python3 python3-pip python3-dev apt-get install -y build-essential git pigz apt-get install -y zlib1g-dev libbz2-dev apt-get install -y libncurses5-dev liblzma-dev libssl-dev libcurl4-openssl-dev apt-get install -y autoconf pip3 install matplotlib multiprocess git clone --recursive https://github.com/heathsc/gemBS.git cd gemBS && python3 setup.py install

version of gcc and g++ is 10

This is the error I have:

make[1]: Entering directory '/gemBS/tools/utils'

gcc -O3 -g -I. -Icommon -o ../bin/gemBS_cat gemBS_cat.c common/utils.c -lm

gcc -O3 -g -I. -Icommon -o ../bin/readNameClean readNameClean/readNameClean.c common/utils.c -lm

gcc -O3 -g -I. -Icommon -o ../bin/md5_fasta md5_fasta.c common/utils.c -lm -lcrypto

gcc -O3 -g -I. -Icommon -o ../bin/mextr mextr/mextr.c mextr/calc_gt_prob.c mextr/output.c mextr/output_utils.c mextr/output_headers.c mextr/command_line.c mextr/init_params.c mextr/files.c mextr/stats.c mextr/unpack.c mextr/rec.c mextr/bbi.c common/utils.c -I../htslib -Imextr ../htslib/libhts.a -lcurl -lcrypto -llzma -lz -lbz2 -lpthread -lm

mextr/command_line.c: In function ‘handle_command_line’:

mextr/command_line.c:304:31: error: invalid use of undefined type ‘struct bcf_sr_region_t’

304 | memcpy(treg + i, reg->regs + j, sizeof(struct _region_t));

  |                               ^

mextr/command_line.c:310:13: warning: assignment to ‘struct bcf_sr_region_t ’ from incompatible pointer type ‘struct _region_t ’ [-Wincompatible-pointer-types]

310 | reg->regs = treg;

  |             ^

mextr/command_line.c:343:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’

343 | reg->regs[i].creg = -1;

  |              ^

mextr/command_line.c:343:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’

343 | reg->regs[i].creg = -1;

  |                 ^

mextr/command_line.c:344:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’

344 | reg->regs[i].nregs = reg->regs[i].mregs = 1;

  |              ^

mextr/command_line.c:344:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’

344 | reg->regs[i].nregs = reg->regs[i].mregs = 1;

  |                 ^

mextr/command_line.c:344:35: error: invalid use of undefined type ‘struct bcf_sr_region_t’

344 | reg->regs[i].nregs = reg->regs[i].mregs = 1;

  |                                   ^

mextr/command_line.c:344:38: error: invalid use of undefined type ‘struct bcf_sr_region_t’

344 | reg->regs[i].nregs = reg->regs[i].mregs = 1;

  |                                      ^

mextr/command_line.c:345:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’

345 | reg->regs[i].regs = malloc(sizeof(region1_t));

  |              ^

mextr/command_line.c:345:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’

345 | reg->regs[i].regs = malloc(sizeof(region1_t));

  |                 ^

mextr/command_line.c:346:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’

346 | reg->regs[i].regs->start = 0;

  |              ^

mextr/command_line.c:346:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’

346 | reg->regs[i].regs->start = 0;

  |                 ^

mextr/command_line.c:347:14: error: invalid use of undefined type ‘struct bcf_sr_region_t’

347 | reg->regs[i].regs->end = ctgs[i].len - 1;

  |              ^

mextr/command_line.c:347:17: error: invalid use of undefined type ‘struct bcf_sr_region_t’

347 | reg->regs[i].regs->end = ctgs[i].len - 1;

  |                 ^

mextr/command_line.c:361:32: error: invalid use of undefined type ‘struct bcf_sr_region_t’

361 | args->cumul_len[0] = reg->regs[0].regs->end + 1;

  |                                ^

mextr/command_line.c:361:35: error: invalid use of undefined type ‘struct bcf_sr_region_t’

361 | args->cumul_len[0] = reg->regs[0].regs->end + 1;

  |                                   ^

mextr/command_line.c:362:88: error: invalid use of undefined type ‘struct bcf_sr_region_t’

362 | for(int i = 1; i < nctgs; i++) args->cumul_len[i] = args->cumul_len[i - 1] + reg->regs[i].regs->end + 1;

  |                                                                                        ^

mextr/command_line.c:362:91: error: invalid use of undefined type ‘struct bcf_sr_region_t’

362 | for(int i = 1; i < nctgs; i++) args->cumul_len[i] = args->cumul_len[i - 1] + reg->regs[i].regs->end + 1;

  |                                                                                           ^

mextr/unpack.c: In function ‘process’:

mextr/unpack.c:155:22: warning: too many arguments for format [-Wformat-extra-args]

155 | fprintf(stderr,"Reading %s\n", args->sr->regions->seq_names[id], complete);

  |                      ^~~~~~~~~~~~~~

make[1]: *** [Makefile:71: ../bin/mextr] Error 1

make[1]: Leaving directory '/gemBS/tools/utils'

make: *** [Makefile:49: _utils] Error 2

Error while compiling gemBS. That is very unfortunate.

A possible reason might be a missing dependency. Please take a look at the lines

before this one. You need the following programs and libraries installed to compile

the gemBS.

Programms needed:

* make

* gcc

Libraris needed:

* python-dev (the python headers and include files)

* libbz2-dev (for bz compression support)

On a Debian/Ubuntu system you should be able to get all needed dependencies with:

sudo apt-get install make gcc python-dev libbz2-dev

Could someone please help?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/heathsc/gemBS/issues/78, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY4653T7IGH5MCNDSXBNZ3SNP3D7ANCNFSM4TF3EHFQ .

heathsc commented 4 years ago

Apologies - this was my mistake. The move to htslib 1.11 was incomplete and lacked the necessary changes to mextr and snpxtr. I have push the required changes and bumped the version to 3.5.2. I have not tried this on Ubuntu 20.10, but a clean install on Arch linux with gcc 10 installs without errors.

wynstep commented 3 years ago

I can confirm this new version now works on ubuntu 20.10