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

compilation failed #5

Open
lmanchon opened this issue Aug 23, 2022 · 1 comment
Open

compilation failed #5

lmanchon opened this issue Aug 23, 2022 · 1 comment

Comments

@lmanchon
Copy link

--Hi,
with gcc-7.2.0:

make CC=g++
bison -d awkgram.y
awkgram.y: warning: 44 shift/reduce conflicts [-Wconflicts-sr]
awkgram.y: warning: 85 reduce/reduce conflicts [-Wconflicts-rr]
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o awkgram.tab.o awkgram.tab.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o b.o b.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o main.o main.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o parse.o parse.c
gcc -g -Wall -pedantic -Wcast-qual -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" maketab.c -o maketab
./maketab awkgram.tab.h >proctab.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o proctab.o proctab.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o tran.o tran.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o lib.o lib.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o run.o run.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o lex.o lex.c
g++ -O2 -g -DBIO_VERSION=""1.1.1-26-g1930"" -c -o addon.o addon.c
addon.c: In function ‘void set_colnm_aux(const char*, int)’:
addon.c:35:13: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
r = malloc(strlen(p) + 2);
~~~~~~^~~~~~~~~~~~~~~
addon.c: In function ‘void bio_set_colnm()’:
addon.c:95:47: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
if (tab_delim[bio_fmt] == 'y') FS = OFS = "\t";
^~~~
addon.c:96:35: warning: ISO C++ forbids converting a string constant to ‘char
’ [-Wwrite-strings]
if (bio_fmt == BIO_FASTX) FS = "\037";
^~~~~~
addon.c: In function ‘Cell
bio_func(int, Cell
, Node**)’:
addon.c:507:21: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
out = calloc(strlen(buf), sizeof(char));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [addon.o] Error 1

Which version of gcc do i need ?

@ctSkennerton
Copy link
Owner

you are compiling with g++ which is a C++ compiler, bioawk is written in C so try compiling with make CC=gcc or just make

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

2 participants