VINE1.0 installation error on ubuntu 18.04

39 views
Skip to first unread message

AIKATA

unread,
Jun 17, 2019, 12:55:43 PM6/17/19
to BitBlaze User Discussion group

Screenshot from 2019-06-17 11-54-09.png

Making all in VEX
make[1]: Entering directory '/home/aikata/bitblaze/vine-1.0/VEX'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/aikata/bitblaze/vine-1.0/VEX'
Making all in libasmir
make[1]: Entering directory '/home/aikata/bitblaze/vine-1.0/libasmir'
make  all-recursive
make[2]: Entering directory '/home/aikata/bitblaze/vine-1.0/libasmir'
Making all in src
make[3]: Entering directory '/home/aikata/bitblaze/vine-1.0/libasmir/src'
g++ -DHAVE_CONFIG_H -I. -I../../libasmir   -I...binutils../include -I/home/aikata/bitblaze/vine-1.0/VEX//pub -I./include -fPIC -g -O2 -MT asm_program.o -MD -MP -MF .deps/asm_program.Tpo -c -o asm_program.o `test -f './disasm/asm_program.cpp' || echo './'`./disasm/asm_program.cpp
./disasm/asm_program.cpp: In function ‘bfd_byte* get_ptr_to_instr(asm_program_t*, bfd_vma)’:
./disasm/asm_program.cpp:78:21: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘bfd_vma’ {aka ‘long unsigned int’} [-Wformat=]
     fprintf(stderr, "Segment for %llx not found\n", addr);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~
./disasm/asm_program.cpp: In function ‘int get_instr_length(asm_program_t*, bfd_vma)’:
./disasm/asm_program.cpp:223:49: error: cannot convert ‘bfd*’ to ‘bfd_architecture’
   disassembler_ftype disas = disassembler(prog->abfd);
                                           ~~~~~~^~~~
In file included from ./include/asm_program.h:31,
                 from ./disasm/asm_program.cpp:16:
/usr/include/dis-asm.h:319:63: note:   initializing argument 1 of ‘int (* disassembler(bfd_architecture, bfd_boolean, long unsigned int, bfd*))(bfd_vma, disassemble_info*)’
 extern disassembler_ftype disassembler (enum bfd_architecture arc,
                                         ~~~~~~~~~~~~~~~~~~~~~~^~~
./disasm/asm_program.cpp:225:51: error: reference to ‘ignore’ is ambiguous
   prog->disasm_info.fprintf_func = (fprintf_ftype)ignore;
                                                   ^~~~~~
In file included from /usr/include/c++/8/bits/stl_map.h:63,
                 from /usr/include/c++/8/map:61,
                 from ./include/asm_program.h:21,
                 from ./disasm/asm_program.cpp:16:
/usr/include/c++/8/tuple:1642:47: note: candidates are: ‘constexpr const std::_Swallow_assign std::ignore’
   _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{};
                                               ^~~~~~
./disasm/asm_program.cpp:217:12: note:                 ‘int ignore()’
 static int ignore() {
            ^~~~~~
./disasm/asm_program.cpp: In function ‘bfd* initialize_bfd(const char*)’:
./disasm/asm_program.cpp:522:18: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   char *target = "i686-pc-linux-gnu";
                  ^~~~~~~~~~~~~~~~~~~
./disasm/asm_program.cpp: In function ‘char* string_of_insn(asm_program_t*, Instruction*)’:
./disasm/asm_program.cpp:879:49: error: cannot convert ‘bfd*’ to ‘bfd_architecture’
   disassembler_ftype disas = disassembler(prog->abfd);
                                           ~~~~~~^~~~
In file included from ./include/asm_program.h:31,
                 from ./disasm/asm_program.cpp:16:
/usr/include/dis-asm.h:319:63: note:   initializing argument 1 of ‘int (* disassembler(bfd_architecture, bfd_boolean, long unsigned int, bfd*))(bfd_vma, disassemble_info*)’
 extern disassembler_ftype disassembler (enum bfd_architecture arc,
                                         ~~~~~~~~~~~~~~~~~~~~~~^~~
Makefile:354: recipe for target 'asm_program.o' failed
make[3]: *** [asm_program.o] Error 1
make[3]: Leaving directory '/home/aikata/bitblaze/vine-1.0/libasmir/src'
Makefile:224: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/aikata/bitblaze/vine-1.0/libasmir'
Makefile:167: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/aikata/bitblaze/vine-1.0/libasmir'
Makefile:236: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Stephen McCamant

unread,
Jun 17, 2019, 4:10:38 PM6/17/19
to bitblaz...@googlegroups.com
>>>>> "A" == aikata <aik...@iitbhilai.ac.in> writes:

You might have noticed that the Vine 1.0 release is from 2009 and was
designed for use with Ubuntu 9.04, so it's not really too surprising
that it doesn't compile out of the box on a much more modern system.

The problems you report here are all from the C++ "libasmir"
part. Since a version of this code is still used by the FuzzBALL
binary symbolic execution system that my group at Minnesota and I use,
we've made a variety of updates and compatibility fixes to it that you
might want to reuse even if you want to do something else Vine-based.
You may notice that Vine and FuzzBALL have similar directory
structures, so for the OCaml modules we dropped from Vine, you could
probably add them back into the FuzzBALL directory structure and
compile them without too many other changes. I haven't tried doing
this recently myself, though.

The FuzzBALl repository is at:

https://github.com/bitblaze-fuzzball/fuzzball

If you want to port Vine 1.0 itself, you might still want to look at
the changes to the FuzzBALL branch of the code for ideas about
fixes. For instance at least a couple of the compile errors you
mention look to me like the symptoms of things we've fixed in
FuzzBALL:

A> ./disasm/asm_program.cpp:223:49: error: cannot convert `bfd*' to
A> `bfd_architecture'
A> disassembler_ftype disas = disassembler(prog->abfd);
A> ~~~~~~^~~~
A> In file included from ./include/asm_program.h:31,
A> from ./disasm/asm_program.cpp:16:
A> /usr/include/dis-asm.h:319:63: note: initializing argument 1 of `int (*
A> disassembler(bfd_architecture, bfd_boolean, long unsigned int,
A> bfd*))(bfd_vma, disassemble_info*)'

C.f. https://github.com/bitblaze-fuzzball/fuzzball/commit/384d7be9

[...]
A> ./disasm/asm_program.cpp: In function `bfd* initialize_bfd(const char*)':
A> ./disasm/asm_program.cpp:522:18: warning: ISO C++ forbids converting a
A> string constant to `char*' [-Wwrite-strings]
A> char *target = "i686-pc-linux-gnu";
A> ^~~~~~~~~~~~~~~~~~~

The FuzzBALL version of this file declares the variable as a "const
char *", though it appears the change was too old (pre-2013?) for it
to appear separately in the FuzzBALL Git history.

Hope this helps,

-- Stephen
Reply all
Reply to author
Forward
0 new messages