>>>>> "ZM" == Zhang Mike <
telne...@gmail.com> writes:
ZM> I don't know why, when I ./configure the vine-1.0 with
ZM> bitblaze-additional-2010-06's content, it told me it needs the --with-vex,
ZM> so I gave it
ZM> ./configure --with-vex=./VEX (if I ./configure the vine-1.0 only, it
ZM> doesn't need the --with-vex, and can make sucessfully.)
ZM> then it gave me the following error.
I haven't yet tried reproducing this failure, so let me start by
giving some general comments.
The Vine portion of the additional source-code release doesn't share
the same relation to the 1.0 release as the TEMU portion does: it is
more self contained. So I would first try compiling it on its own,
before mixing it with the Vine 1.0 release. If you are going to mix
them, you might be better off moving individual source files rather
than overlaying the build systems wholesale. However I don't have a
theory as to how that might be causing your problem.
The copy of "VEX" shipped with Vine 1.0 is almost the same as the SVN
revision r1856. Here's how it's described in the VINE.README file we
added:
This is VEX version 1856 (per priv/main/vex_svnversion.h) with
orig_amd64/, orig_arm/, orig_ppc32/, orig_x86/, test/, and
nanoarm.orig removed. -fPIC compiler option is also added to the
Makefile.
And here's the full diff:
diff -ur -x .svn r1856/Makefile vine-1.0/VEX/Makefile
--- r1856/Makefile 2013-05-09 17:19:30.869935000 -0500
+++ vine-1.0/VEX/Makefile 2013-03-27 18:48:05.570783000 -0500
@@ -56,6 +56,11 @@
priv/guest-arm/toIR.o \
priv/guest-ppc/toIR.o
+EXTRA_DIST= HACKING.README \
+ LICENSE.GPL \
+ LICENSE.README \
+ VINE.README
+
PUB_INCLUDES = -Ipub
# Do not add any priv/host-ARCH or priv/guest-ARCH directories to this
@@ -76,7 +81,7 @@
CCFLAGS = -Wall -Wmissing-prototypes -Wshadow \
-Wpointer-arith -Wbad-function-cast -Wcast-qual \
-Wcast-align -Wmissing-declarations \
- $(EXTRA_CFLAGS) -g -O2 -fstrict-aliasing
+ $(EXTRA_CFLAGS) -g -O2 -fstrict-aliasing -fPIC
#CC = icc
#CCFLAGS = -g -Wall -wd981 -wd279 -wd1287 -wd869 -wd111 -wd188 -wd186
@@ -165,6 +170,14 @@
cat quote.txt >> priv/main/vex_svnversion.h
cat newline.txt >> priv/main/vex_svnversion.h
+distdir: pub/libvex_guest_offsets.h
+ cp --parents -t $(distdir) $(PUB_HEADERS) $(PRIV_HEADERS) \
+ $(EXTRA_DIST) \
+ priv/main/vex_svnversion.h \
+ test_main.c test_main.h \
+ Makefile \
+ `echo $(LIB_OBJS) | sed "s/\.o/\.c/g"`
+
minidist: version
rm -f vex--minidist-2005MMDD.tar
tar cf vex--minidist-2005MMDD.tar $(PUB_HEADERS) $(PRIV_HEADERS) \
@@ -298,3 +311,6 @@
priv/guest-ppc/toIR.o: $(ALL_HEADERS) priv/guest-ppc/toIR.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-ppc/toIR.o \
-c priv/guest-ppc/toIR.c
+
+doc:
+ @# No documentation, so nothing to do
Only in r1856: nanoarm.orig
Only in r1856: orig_amd64
Only in r1856: orig_arm
Only in r1856: orig_ppc32
Only in r1856: orig_x86
Only in vine-1.0/VEX/priv/main: vex_svnversion.h
Only in r1856: test
Only in vine-1.0/VEX: VINE.README
ZM> Is this meaning we need download the r1856 version VEX and install
ZM> it, anyway? Though there's some necessary VEX files in the
ZM> vine-1.0/VEX folder. But it seems that version VEX cannot be
ZM> downloaded from svn, I tried hours. If we really need that
ZM> specific r1856 VEX, then is there any other way to get the
ZM> package?
Could you say more about the problems you were having with the VEX
SVN? I tried it just now with the command:
% svn checkout -r 1856 svn://
svn.valgrind.org/vex/trunk r1856
and it worked fine for me.
However, as mentioned above, the Vine-1.0 and r1856 versions of VEX
really are almost identical, so you should be able to use either one.
ZM> **********************************************************************
ZM> g++ -I../src/include -I./VEX/pub -g -O2 -L../src -L./VEX -o disassembler
ZM> disassembler.o -lasmir -lvex -lbfd -liberty -lopcodes -liberty -lbfd
ZM> */usr/bin/ld: cannot find -lvex*
ZM> collect2: error: ld returned 1 exit status
ZM> make[3]: *** [disassembler] Error 1
ZM> **********************************************************************
This error message sounds like you did not manage to compile your
version of VEX correctly. With the options -L./VEX and -lvex, the
linker should be looking for a file named ./VEX/libvex.a, which is
supposed to be the result of compiling VEX. Does that file exist in
your copy? Specifically the VEX Makefile target "make libvex.a", as
the name suggests, is supposed to create that file. You mentioned in
another email that you had run that command: did you see any errors
from that?
-- Stephen