CC> Hi,
CC> I followed the instructions for the Vine installation, and ran
CC> into problems almost immediately with a conflict between the
CC> declaration of basename() in libiberty.h and string.h.
CC> make[3]: Entering directory `/home/ubuntu/bitblaze/vine-1.0/libasmir/
CC> src'
CC> g++ -DHAVE_CONFIG_H -I. -I../../libasmir -I/home/ubuntu/bitblaze/
CC> vine-1.0/VEX//pub -I./include -fPIC -g -O2 -MT asm_program.o -MD -MP -
CC> MF .deps/asm_program.Tpo -c -o asm_program.o `test -f './disasm/
CC> asm_program.cpp' || echo './'`./disasm/asm_program.cpp
CC> In file included from ./disasm/asm_program.cpp:16:
CC> /usr/include/libiberty.h:106: error: new declaration `char*
CC> basename(const char*)'
CC> /usr/include/string.h:601: error: ambiguates old declaration `const
CC> char* basename(const char*)'
CC> Is this a known issue with Ubuntu 10.04 Lucid? Should I revert to
CC> Karmic instead?
Our recommended platform for building the TEMU and Vine 1.0 releases
is still Ubuntu 9.04 ("Jaunty"), since that's what they were tested
with.
However this is a known issue with a simple fix. The patch below is
copied from a previous message at:
http://groups.google.com/group/bitblaze-users/browse_thread/thread/66983b0ddce7827b/
Hope this helps,
-- Stephen
Index: libasmir/src/disasm/asm_program.cpp
===================================================================
--- libasmir/src/disasm/asm_program.cpp (older version)
+++ libasmir/src/disasm/asm_program.cpp (fixed version)
@@ -7,6 +7,11 @@
#include "debug.h"
#include "asm_program.h"
#include "objdump.h"
+/* Some versions of glibc and the binutils libiberty library give
+ conflicting prototypes for basename(). We don't use that function
+ anyway, but to work around the problem, make libliberty.h think
+ that it has already been declared. */
+#define HAVE_DECL_BASENAME 1
#include "libiberty.h"