skyhover / Deckard

Code clone detection; clone-related bug detection; sematic clone analysis
Other
209 stars 78 forks source link

build fails #9

Open sils opened 9 years ago

sils commented 9 years ago

Hi, I'm getting:

a - token-counter.o
a - sq-tree.o
a - node-vec-gen.o
a - vector-output.o
a - vector-merger.o
a - tree-accessor.o
a - token-tree-map.o
a - clone-context-php.o
rm -f vectorsort dispatchvectors computeranges *~ *.o
gcc -O3  -O3  vectorsort.c  -lm -o vectorsort
gcc -O3  -O3  dispatchvectors.c  -lm -o dispatchvectors
gcc -O3  -O3  computeranges.c  -lm -o computeranges
rm -f *.o cvecgen jvecgen cbugfilters jbugfilters out2html phpvecgen phpbugfilters out2xml cParseTreeMain jParseTreeMain phpParseTreeMain
g++  -o ptreeC.o -O3 -I../include -I../vgen/treeTra -c -DCLANG ptree.cc
make: *** No rule to make target '../ptgen/gcc/gccptgen.a', needed by 'cvecgen'.  Stop.
Error: main make failed. Exit.
./build.sh  7.49s user 0.35s system 85% cpu 9.207 total

by just executing the build.sh in src/main

sils commented 9 years ago

Here;s a fix for you, you need to explicitly use python2 since python3 is now getting default on mre and more systems:

diff --git a/src/ptgen/gcc/mainc.py b/src/ptgen/gcc/mainc.py
index 9226bba..fdcf253 100755
--- a/src/ptgen/gcc/mainc.py
+++ b/src/ptgen/gcc/mainc.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2

 #
 # 
sils commented 9 years ago

this must also be applied to other python files of course

tomgu1991 commented 8 years ago

Hi, I met the same problem. But I found this, https://github.com/skyhover/Deckard/issues/2 Currently, it works fine on my Ubuntu 15.04.

skyhover commented 8 years ago

Thanks for the fix suggestion for the issue with python 3!

FroilanYue commented 7 years ago

While installing on windows, use Cygwin instead of MinGW(-64). And install packages:

Hope helpful for this issue.

Lawliar commented 7 years ago

Hi all, I met exactly the same problem as I was running build.sh in src/main/, in version 1.2

rm -f *.o cvecgen jvecgen cbugfilters jbugfilters out2html phpvecgen phpbugfilters out2xml cParseTreeMain jParseTreeMain phpParseTreeMain g++ -I../include -I../vgen/treeTra -o ptreeC.o -O3 -c -DCLANG ptree.cc make: *** No rule to make target ../ptgen/gcc/gccptgen.a', needed bycvecgen'. Stop. Error: main make failed. Exit.

And I took all the fixes mentioned above,but it still wouldn't work(Install Bison,Flex and so on, specify python2 in/src/ptgen/gcc/mainc.py ). My Ubuntu version is ubuntu 14.04 LTS, any suggestion with this?