[Box Backup] compile failure on fedora 9

Chris Wilson boxbackup at fluffy.co.uk
Tue Jul 1 09:36:13 BST 2008


Hi Alex,

On Mon, 30 Jun 2008, Alex Howansky wrote:

> Ok, I can see where this is going. After a ton more similar failures,
> I ended up adding "#include <stdlib.h>" to these files:
...
> bin/bbackupquery/bbackupquery.cpp
> bin/bbackupctl/bbackupctl.cpp
> lib/raidfile/RaidFileRead.cpp

Are you sure? My copies of these files already include stdlib.h.

> and "#include <string.h>" to these files:
> 
> bin/bbstoreaccounts/bbstoreaccounts.cpp

same here.

> test/basicserver/TestContext.cpp

This file doesn't even do very much. What was the error that you got here?

> (Most of the _main.cpp files in test just had "#include <string>", to which
> I added a trailing ".h".)

Those files are all auto-generated from 
infrastructure/buildenv-testmain-template.cpp. And <string> is the C++ 
string header which is nothing to do with <string.h>, and I'm pretty sure 
we need <string> on some platforms, so we should include both.

> [CXX]     BackupClientFileAttributes.cpp
> BackupClientFileAttributes.cpp: In static member function 'static void
> BackupClientFileAttributes::FillAttributesLink(StreamableMemBlock&, const
> char*, stat&)':
> BackupClientFileAttributes.cpp:489: error: 'memcpy' is not a member of 'std'
> 
> So, with very little clue as to what I was doing, I removed "std" from
> the start of all calls to std::memcpy and std::strlen in that file (since
> that's how they appear appear in other files.)

That is very odd. Ben, Martin, do either of you know why this code thinks 
that memcpy should be in std? ::memcpy I could understand, but not 
std::memcpy. And it appears to work on a lot of platforms.

> And that seems to have done it. It passed all tests, and I've got a 
> running daemon that is backing up and verifying successfully.

Thanks for your perseverance :) I'll apply the changes.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\ _/_/_/_//_/___/ | We are GNU : free your mind & your software |



More information about the Boxbackup mailing list