lh3 / hickit

TAD calling, phase imputation, 3D modeling and more for diploid single-cell Hi-C (Dip-C) and general Hi-C
100 stars 11 forks source link

compiling error #16

Closed zhang-jiankun closed 5 years ago

zhang-jiankun commented 5 years ago

I have errors in compiling hickit (make gl=1).

pair.c: In function ‘hk_pair2loop’:
 pair.c:488:49: warning: variable ‘best_j’ set but not used [-Wunused-but-set-variable]
  int j, d = hk_ppos2(p) - hk_ppos1(p), best_k, best_j;

bin.c: In function ‘hk_bmap_gen’:
bin.c:142:10: warning: variable ‘n_del’ set but not used [-Wunused-but-set-variable]
  int32_t n_del, m_pairs = 0;

fdg.c: In function ‘hk_fdg’:
fdg.c:368:6: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  tmp = CALLOC(int32_t, m->n_pairs);
In file included from fdg.c:1:0:

/usr/include/stdlib.h:541:14: note: in a call to allocation function ‘calloc’ declared here
 extern void *calloc (size_t __nmemb, size_t __size)
view3d.c:32:3: warning: non-local variable ‘global’ with anonymous type is questionable in C++ [-Wc++-compat]
 } global;

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libglut.a(libglut_la-freeglut_state.o): undefined reference to symbol 'XGetWindowAttributes'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'hickit' failed
make: *** [hickit] Error 1

After I modified the Makefile, the last error about libglut & libX11 is gone while others still exist. How can these errors be corrected? thanks

lh3 commented 5 years ago

Others are warnings, not errors.

zhang-jiankun commented 5 years ago

this line in th Makefile has been modified as follows

LIBS_GL = -Wl,-Bstatic -Wl,-Bdynamic -lglut -lGLU -lGL -lXi

zhang-jiankun commented 5 years ago

but hickit-gl still doesn't work

lh3 commented 5 years ago

Makefile doesn't compile hickit-gl. Only hickit.

zhang-jiankun commented 5 years ago

Problem solved. Thanks again.