Bugs

82 views
Skip to first unread message

rach

unread,
Jul 4, 2011, 12:26:49 AM7/4/11
to BitBlaze User Discussion group
Dear all,

I have the following when I try to compile it ("make").

=====================
In file included from ./disasm/asm_program.cpp:16:
/usr/include/libiberty.h:106: error: new declaration ‘char*
basename(const char*)’
/usr/include/string.h:601: error: ambiguates old declaration ‘const
char* basename(const char*)’
./disasm/asm_program.cpp: In function ‘bfd* initialize_bfd(const
char*)’:
./disasm/asm_program.cpp:520: warning: deprecated conversion from
string constant to ‘char*’
make[3]: *** [asm_program.o] Error 1
make[3]: Leaving directory `/home/rachid/Desktop/bitblaze/vine-1.0/
libasmir/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rachid/Desktop/bitblaze/vine-1.0/
libasmir'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/rachid/Desktop/bitblaze/vine-1.0/
libasmir'
make: *** [all-recursive] Error 1
=====================

Could you please let me know if you know how to fix this.

Best regards.

Stephen McCamant

unread,
Jul 11, 2011, 2:14:09 PM7/11/11
to bitblaz...@googlegroups.com
>>>>> "RZ" == rach <rach....@gmail.com> writes:

RZ> Dear all,
RZ> I have the following when I try to compile it ("make").

RZ> =====================
RZ> In file included from ./disasm/asm_program.cpp:16:
RZ> /usr/include/libiberty.h:106: error: new declaration `char*
RZ> basename(const char*)'
RZ> /usr/include/string.h:601: error: ambiguates old declaration `const
RZ> char* basename(const char*)'
RZ> =====================

RZ> Could you please let me know if you know how to fix this.

Sorry for letting this question languish in the moderation queue.
(It's a necessary evil to reduce spam, but it sometimes makes for an
unfortunate bottleneck).

This error is one that we've seen before, and which has also affected
some other open-source projects; it's a header file incompatibility
between certain versions of the Binutils and glibc. You can work
around it by defining "HAVE_DECL_BASENAME" before including
"libiberty.h". Previous discussions on the list have more information,
including an explicit patch:

http://www.lmgtfy.com/?q=BitBlaze+Vine+basename

Hope this helps,

-- Stephen

roddam bramhini

unread,
May 6, 2013, 7:33:50 AM5/6/13
to bitblaz...@googlegroups.com
hi after adding that also i am getting same errors.. can anyone help me??
Thanks in advance

Stephen McCamant

unread,
May 6, 2013, 1:18:23 PM5/6/13
to bitblaz...@googlegroups.com
>>>>> "RB" == roddam bramhini <bramhin...@gmail.com> writes:

>> In file included from ./disasm/asm_program.cpp:16:
>> /usr/include/libiberty.h:106: error: new declaration 'char*
>> basename(const char*)'
>> /usr/include/string.h:601: error: ambiguates old declaration 'const
>> char* basename(const char*)'

RB> hi after adding that also i am getting same errors.. can anyone
RB> help me??

You've now repeated this question twice quoting the text from previous
people who have asked it, but it's not clear to me whether you
actually tried the fix that I had referenced in my replies to those
earlier messages (for instance because you didn't quote this latter
text). When you say "after adding that also i am getting [the] same
errors", it would help if you said explicitly what "that" was.

In my experience this problem is reliably fixed by making the small
change that I referenced in those previous emails, so if you're still
seeing the error, the most likely situation is that you're not making
the change correctly. But we'll only have a chance of helping you with
that sort of problem if you can explain in detail what you tried and
the error you're still seeing. Alternatively, if you're familiar with
C++ and understand the situation that's triggering the error, it seems
to me that you should be able to debug the problem yourself. Of course
teaching everything you might want to know about C++ or Linux software
development is beyond the scope of this mailing list, but if you can
formulate some specific questions you're more likely to get helpful
answers.
Reply all
Reply to author
Forward
0 new messages