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

Broken compilation #6

Open
mimame opened this issue Feb 8, 2019 · 14 comments
Open

Broken compilation #6

mimame opened this issue Feb 8, 2019 · 14 comments

Comments

@mimame
Copy link

mimame commented Feb 8, 2019

Hi @andypohl

libbeato can't be compiled with the last changes

The bad commit found using git bisect is: 5be49be

Thanks a lot in advance

Making all in beato
make[2]: Entering directory '/tmp/libbeato/beato'
gcc -DHAVE_CONFIG_H -I. -I..    -I.. -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -fno-strict-aliasing -g -O2 -MT bbiAugment.o -MD -MP -MF .deps/bbiAugment.Tpo -c -o bbiAugment.o bbiAugment.c
In file included from bbiAugment.c:1:
../beato/bbiAugment.h:9:52: error: unknown type name ‘bits32’
 struct bbiFile* bbiFileOpenWithDir(char* fileName, bits32 sig, char* typeName, char* udcDir);
                                                    ^~~~~~
In file included from bbiAugment.c:2:
../jkweb/bPlusTree.h:57:5: error: unknown type name ‘bits32’
     bits32 blockSize;  /* Size of block. */
     ^~~~~~
../jkweb/bPlusTree.h:58:5: error: unknown type name ‘bits32’
     bits32 keySize;  /* Size of keys. */
     ^~~~~~
../jkweb/bPlusTree.h:59:5: error: unknown type name ‘bits32’
     bits32 valSize;  /* Size of values. */
     ^~~~~~
../jkweb/bPlusTree.h:60:5: error: unknown type name ‘bits64’
     bits64 itemCount;  /* Number of items indexed. */
     ^~~~~~
../jkweb/bPlusTree.h:61:5: error: unknown type name ‘boolean’
     boolean isSwapped;  /* If TRUE need to byte swap everything. */
     ^~~~~~~
../jkweb/bPlusTree.h:62:5: error: unknown type name ‘bits64’
     bits64 rootOffset;  /* Offset of root block. */
     ^~~~~~
../jkweb/bPlusTree.h:77:1: error: unknown type name ‘boolean’
 boolean bptFileFind(struct bptFile *bpt, void *key, int keySize, void *val, int valSize);
 ^~~~~~~
../jkweb/bPlusTree.h:96:39: error: unknown type name ‘bits64’
 void bptKeyAtPos(struct bptFile *bpt, bits64 itemPos, void *result);
                                       ^~~~~~
../jkweb/bPlusTree.h:102:45: error: unknown type name ‘bits64’
 void bptStringKeyAtPos(struct bptFile *bpt, bits64 itemPos, char *result, int maxResultSize);
                                             ^~~~~~
../jkweb/bPlusTree.h:109:2: error: unknown type name ‘bits64’
  bits64 itemCount,  /* Number of elements in array. */
  ^~~~~~
../jkweb/bPlusTree.h:110:2: error: unknown type name ‘bits32’
  bits32 blockSize, /* B+ tree block size - # of children for each node. */
  ^~~~~~
../jkweb/bPlusTree.h:112:2: error: unknown type name ‘bits32’
  bits32 keySize,      /* Size of key */
  ^~~~~~
../jkweb/bPlusTree.h:114:2: error: unknown type name ‘bits32’
  bits32 valSize,      /* Size of value */
  ^~~~~~
../jkweb/bPlusTree.h:118:64: error: unknown type name ‘bits64’
 void bptFileBulkIndexToOpenFile(void *itemArray, int itemSize, bits64 itemCount, bits32 blockSize,
                                                                ^~~~~~
../jkweb/bPlusTree.h:118:82: error: unknown type name ‘bits32’
 void bptFileBulkIndexToOpenFile(void *itemArray, int itemSize, bits64 itemCount, bits32 blockSize,
                                                                                  ^~~~~~
../jkweb/bPlusTree.h:119:50: error: unknown type name ‘bits32’
  void (*fetchKey)(const void *va, char *keyBuf), bits32 keySize,
                                                  ^~~~~~
../jkweb/bPlusTree.h:120:37: error: unknown type name ‘bits32’
  void* (*fetchVal)(const void *va), bits32 valSize, FILE *f);
                                     ^~~~~~
../jkweb/bPlusTree.h:120:53: error: unknown type name ‘FILE’
  void* (*fetchVal)(const void *va), bits32 valSize, FILE *f);
                                                     ^~~~
../jkweb/bPlusTree.h:120:53: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
../jkweb/bPlusTree.h:1:1:
+#include <stdio.h>
 /* bptFile - B+ Trees.  These are a method of indexing data similar to binary trees, but
../jkweb/bPlusTree.h:120:53:
  void* (*fetchVal)(const void *va), bits32 valSize, FILE *f);
                                                     ^~~~
In file included from ../jkweb/bbiFile.h:6,
                 from bbiAugment.c:3:
../jkweb/cirTree.h:20:5: error: unknown type name ‘boolean’
     boolean isSwapped;  /* If TRUE need to byte swap everything. */
     ^~~~~~~
../jkweb/cirTree.h:21:5: error: unknown type name ‘bits64’
     bits64 rootOffset;  /* Offset of root block. */
     ^~~~~~
../jkweb/cirTree.h:22:5: error: unknown type name ‘bits32’
     bits32 blockSize;  /* Size of block. */
     ^~~~~~
../jkweb/cirTree.h:23:5: error: unknown type name ‘bits64’
     bits64 itemCount;  /* Number of items indexed. */
     ^~~~~~
../jkweb/cirTree.h:24:5: error: unknown type name ‘bits32’
     bits32 startChromIx; /* First chromosome in file. */
     ^~~~~~
../jkweb/cirTree.h:25:5: error: unknown type name ‘bits32’
     bits32 startBase;  /* Starting base position. */
     ^~~~~~
../jkweb/cirTree.h:26:5: error: unknown type name ‘bits32’
     bits32 endChromIx;  /* Ending chromosome in file. */
     ^~~~~~
../jkweb/cirTree.h:27:5: error: unknown type name ‘bits32’
     bits32 endBase;  /* Ending base position. */
     ^~~~~~
../jkweb/cirTree.h:28:5: error: unknown type name ‘bits64’
     bits64 fileSize;  /* Total size of index file. */
     ^~~~~~
../jkweb/cirTree.h:29:5: error: unknown type name ‘bits32’
     bits32 itemsPerSlot; /* Max number of items to put in each index slot at lowest level. */
     ^~~~~~
../jkweb/cirTree.h:46:2: error: unknown type name ‘bits32’
  bits32 chromIx, bits32 start, bits32 end);
  ^~~~~~
../jkweb/cirTree.h:46:18: error: unknown type name ‘bits32’
  bits32 chromIx, bits32 start, bits32 end);
                  ^~~~~~
../jkweb/cirTree.h:46:32: error: unknown type name ‘bits32’
  bits32 chromIx, bits32 start, bits32 end);
                                ^~~~~~
../jkweb/cirTree.h:54:5: error: unknown type name ‘bits32’
     bits32 chromIx; /* Chromosome id. */
     ^~~~~~
../jkweb/cirTree.h:55:5: error: unknown type name ‘bits32’
     bits32 start; /* Start position in chromosome. */
     ^~~~~~
../jkweb/cirTree.h:56:5: error: unknown type name ‘bits32’
     bits32 end;  /* One past last base in interval in chromosome. */
     ^~~~~~
../jkweb/cirTree.h:60:33: error: unknown type name ‘bits64’
  void *itemArray, int itemSize, bits64 itemCount,
                                 ^~~~~~
../jkweb/cirTree.h:61:2: error: unknown type name ‘bits32’
  bits32 blockSize, bits32 itemsPerSlot,
  ^~~~~~
../jkweb/cirTree.h:61:20: error: unknown type name ‘bits32’
  bits32 blockSize, bits32 itemsPerSlot,
                    ^~~~~~
../jkweb/cirTree.h:64:2: error: unknown type name ‘bits64’
  bits64 (*fetchOffset)(const void *va, void *context),
  ^~~~~~
../jkweb/cirTree.h:65:2: error: unknown type name ‘bits64’
  bits64 endFileOffset, FILE *f);
  ^~~~~~
../jkweb/cirTree.h:65:24: error: unknown type name ‘FILE’
  bits64 endFileOffset, FILE *f);
                        ^~~~
../jkweb/cirTree.h:65:24: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
../jkweb/cirTree.h:1:1:
+#include <stdio.h>
 /* cirTree chromosome id r tree.  Part of a system to index chromosome ranges - things of
../jkweb/cirTree.h:65:24:
  bits64 endFileOffset, FILE *f);
                        ^~~~
../jkweb/cirTree.h:72:2: error: unknown type name ‘bits64’
  bits64 itemCount,  /* Number of elements in array. */
  ^~~~~~
../jkweb/cirTree.h:73:2: error: unknown type name ‘bits32’
  bits32 blockSize, /* R tree block size - # of children for each node. */
  ^~~~~~
../jkweb/cirTree.h:74:2: error: unknown type name ‘bits32’
  bits32 itemsPerSlot, /* Number of items to put in each index slot at lowest level. */
  ^~~~~~
../jkweb/cirTree.h:77:2: error: unknown type name ‘bits64’
  bits64 (*fetchOffset)(const void *va, void *context), /* Given item, return file offset */
  ^~~~~~
../jkweb/cirTree.h:78:2: error: unknown type name ‘bits64’
  bits64 endFileOffset,     /* Last position in file we index. */
  ^~~~~~
make[2]: *** [Makefile:419: bbiAugment.o] Error 1
make[2]: Leaving directory '/tmp/libbeato/beato'
make[1]: *** [Makefile:634: all-recursive] Error 1
make[1]: Leaving directory '/tmp/libbeato'
make: *** [Makefile:551: all] Error 2
@xingjianfeng100
Copy link

xingjianfeng100 commented Feb 22, 2019

Similar problem has been solved in CRG-Barcelona/bwtool#65; you should alter the firt order for "#include <jkweb/common.h>" in bbiAugment.c file.

@enidzy
Copy link

enidzy commented Feb 27, 2019

Similar problem has been solved in CRG-Barcelona/bwtool#65; you should alter the firt order for "#include <jkweb/common.h>" in bbiAugment.c file.
Could you explain it more clearly?
I have the same problem and do not know how to do
Thank you in advance

@xingjianfeng100
Copy link

open libbeato/beato/bbiAugment.c, write "
#include <jkweb/common.h>
#include <beato/bbiAugment.h>
#include <jkweb/bPlusTree.h>
#include <jkweb/bbiFile.h>
#include <jkweb/cirTree.h>
#include <jkweb/hash.h>
#include <jkweb/hmmstats.h>
#include <jkweb/linefile.h>
#include <jkweb/obscure.h>
#include <jkweb/sig.h>
#include <jkweb/udc.h>
#include <jkweb/zlibFace.h>
"
instead of "
#include <beato/bbiAugment.h>
#include <jkweb/bPlusTree.h>
#include <jkweb/bbiFile.h>
#include <jkweb/cirTree.h>
#include <jkweb/common.h>
#include <jkweb/hash.h>
#include <jkweb/hmmstats.h>
#include <jkweb/linefile.h>
#include <jkweb/obscure.h>
#include <jkweb/sig.h>
#include <jkweb/udc.h>
#include <jkweb/zlibFace.h>
"

Similar problem has been solved in CRG-Barcelona/bwtool#65; you should alter the firt order for "#include <jkweb/common.h>" in bbiAugment.c file.
Could you explain it more clearly?
I have the same problem and do not know how to do
Thank you in advance

open libbeato/beato/bbiAugment.c, write "
#include <jkweb/common.h>
#include <beato/bbiAugment.h>
#include <jkweb/bPlusTree.h>
#include <jkweb/bbiFile.h>
#include <jkweb/cirTree.h>
#include <jkweb/hash.h>
#include <jkweb/hmmstats.h>
#include <jkweb/linefile.h>
#include <jkweb/obscure.h>
#include <jkweb/sig.h>
#include <jkweb/udc.h>
#include <jkweb/zlibFace.h>
"
instead of "
#include <beato/bbiAugment.h>
#include <jkweb/bPlusTree.h>
#include <jkweb/bbiFile.h>
#include <jkweb/cirTree.h>
#include <jkweb/common.h>
#include <jkweb/hash.h>
#include <jkweb/hmmstats.h>
#include <jkweb/linefile.h>
#include <jkweb/obscure.h>
#include <jkweb/sig.h>
#include <jkweb/udc.h>
#include <jkweb/zlibFace.h>
"

@xymia
Copy link

xymia commented Mar 5, 2019

I fixed this error according to your prompts, and then I encountered a new error.

make all-recursive make[1]: Entering directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato'
Making all in jkweb
make[2]: Entering directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato/jkweb' make[2]: Nothing to be done for all'.
make[2]: Leaving directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato/jkweb' Making all in beato make[2]: Entering directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato/beato'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -fno-strict-aliasing -g -O0 -I/home/dell/include -MT fastq_stuff.o -MD -MP -MF .deps/fastq_stuff.Tpo -c -o fastq_stuff.o fastq_stuff.c
In file included from fastq_stuff.c:5:0:
../beato/fastq_stuff.h:22:1: error: unknown type name ‘boolean’
boolean read_fastq_auto(struct fastq_auto* fq, struct lineFile* lf, boolean just_seq_qual);
^
../beato/fastq_stuff.h:22:69: error: unknown type name ‘boolean’
boolean read_fastq_auto(struct fastq_auto* fq, struct lineFile* lf, boolean just_seq_qual);
^
../beato/fastq_stuff.h:27:31: error: unknown type name ‘FILE’
void fprint_fastq_auto_normal(FILE* f, struct fastq_auto fq, int wrap_len);
^
fastq_stuff.c: In function ‘read_fastq_auto’:
fastq_stuff.c:28:17: warning: variable ‘numWords’ set but not used [-Wunused-but-set-variable]
int numWords;
^
make[2]: *** [fastq_stuff.o] Error 1
make[2]: Leaving directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato/beato' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /media/dell/C14D581BDA18EBFA/dcNet/libbeato'
make: *** [all] Error 2
`
I think this is also a problem with the header file, but I don't know how to modify it.

@mimame
Copy link
Author

mimame commented Mar 5, 2019

@xymia , It's easier rollback to an old commit with
git checkout 0c30432
And then compile

@xymia
Copy link

xymia commented Mar 5, 2019

@xymia , It's easier rollback to an old commit with
git checkout 0c30432
And then compile

Sorry, can you explain in more detail. I still don't know what to do.
Thank you.

@mimame
Copy link
Author

mimame commented Mar 5, 2019

git clone https://github.com/CRG-Barcelona/libbeato.git
cd libbeato
git checkout 0c30432
./configure
make
sudo make install

@xymia
Copy link

xymia commented Mar 5, 2019

git clone https://github.com/CRG-Barcelona/libbeato.git
cd libbeato
git checkout 0c30432
./configure
make
sudo make install

Thank you very much. I successfully installed it.

@stewalsh04
Copy link

I had the same problem, your solution worked great! Thank you!
Also bwtool is great little program! :-)

@bobia9991
Copy link

I have followed your instruction and then i had a new error

metaBigBam.c:489:42: error: read-only variable is not assignable
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
metaBigBam.c:502:35: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[]
instead [-Wdeprecated-declarations]
op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly
marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro
'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))

error: error opening '.deps/metaBigBam.Tpo': Permission denied
4 warnings and 2 errors generated.
make[2]: *** [metaBigBam.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Please, help me!

git clone https://github.com/CRG-Barcelona/libbeato.git
cd libbeato
git checkout 0c30432
./configure
make
sudo make install

@mimame
Copy link
Author

mimame commented Nov 12, 2020

@bobia9991 Please repeat all instructions from zero again because the error you showed
error: error opening '.deps/metaBigBam.Tpo': Permission denied
it's not related to this

@bobia9991
Copy link

@bobia9991 Please repeat all instructions from zero again because the error you showed
error: error opening '.deps/metaBigBam.Tpo': Permission denied
it's not related to this

sorry, i have run again without sudo.
With sudo, i had a error:

sudo make
Password:
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in jkweb
make[2]: Nothing to be done for `all'.
Making all in beato
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -fno-strict-aliasing -g -O2 -MT bbiAugment.o -MD -MP -MF .deps/bbiAugment.Tpo -c -o bbiAugment.o bbiAugment.c
mv -f .deps/bbiAugment.Tpo .deps/bbiAugment.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -fno-strict-aliasing -g -O2 -MT metaBigBam.o -MD -MP -MF .deps/metaBigBam.Tpo -c -o metaBigBam.o metaBigBam.c
metaBigBam.c:485:12: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[]
instead [-Wdeprecated-declarations]
if (h->cigar_tab == 0)
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly
marked deprecated here
const int8_t cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro
'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))
^
metaBigBam.c:487:5: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[]
instead [-Wdeprecated-declarations]
h->cigar_tab = (int8_t
)calloc(128, sizeof(int8_t));
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly
marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro
'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))
^
metaBigBam.c:489:9: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[]
instead [-Wdeprecated-declarations]
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly
marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro
'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))
^
metaBigBam.c:489:42: error: read-only variable is not assignable
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
metaBigBam.c:502:35: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[]
instead [-Wdeprecated-declarations]
op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly
marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro
'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))
^
4 warnings and 1 error generated.
make[2]: *** [metaBigBam.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@mimame
Copy link
Author

mimame commented Nov 12, 2020

@bobia9991 Please only use sudo for the make install step as it's shown by the instructions

@bobia9991
Copy link

@bobia9991 Please only use sudo for the make install step as it's shown by the instructions

Thanks for your reply.
i run make, without sudo.
i had a Error:

metaBigBam.c:489:42: error: read-only variable is not assignable
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
metaBigBam.c:502:35: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[] instead
[-Wdeprecated-declarations]
op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
^
/usr/local/include/htslib/sam.h:76:29: note: 'cigar_tab' has been explicitly marked
deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro 'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) attribute ((deprecated (message)))
^
4 warnings and 1 error generated.
make[2]: *** [metaBigBam.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This error like #7

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

6 participants