Therefore I thought it would be nice to have an rpm package to integrate with the openSUSE build service. There was already some work done (https://build.opensuse.org/package/live_build_log/home:hcooh/FreeFileSync/openSUSE_12.3/x86_64). But currently there are some compilation problems.
To debug this I tried to compile FreeFileSync_5.23_Source.zip on my openSUSE 12.3 64 Bit machine and I identified some sources of compilation errors in the code:
"1." In /Source/lib/dir_exist_async.h / line 33 I removed these lines
- std::list<std::pair<Zstring, boost::unique_future<bool>>> futureInfo;
- for (const Zstring& dirname : dirnames)
- if (!dirname.empty()) //skip empty dirs
- futureInfo.push_back(std::make_pair(dirname, async2<bool>([=]() -> bool
- {
-#ifdef ZEN_WIN
- //1. login to network share, if necessary
- loginNetworkShare(dirname, allowUserInteraction);
-#endif
- //2. check dir existence
- return dirExists(dirname);
- })));
[ 30s] In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0,
[ 30s] from /usr/include/c++/4.7/bits/char_traits.h:41,
[ 30s] from /usr/include/c++/4.7/string:42,
[ 30s] from ./zen/i18n.h:10,
[ 30s] from <command-line>:0:
[ 30s] /usr/include/c++/4.7/bits/stl_pair.h: In instantiation of 'struct std::pair<zen::Zbase<char, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked>, boost::unique_future<bool> >':
[ 30s] /usr/include/c++/4.7/bits/stl_pair.h:268:5: required from 'constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = const zen::Zbase<char, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked>&; _T2 = boost::unique_future<bool>; typename std::__decay_and_strip<_T2>::__type = boost::unique_future<bool>; typename std::__decay_and_strip<_Tp>::__type = zen::Zbase<char, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked>]'
[ 30s] lib/dir_exist_async.h:44:11: required from here
[ 30s] /usr/include/c++/4.7/bits/stl_pair.h:119:17: error: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = zen::Zbase<char, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked>; _T2 = boost::unique_future<bool>; std::pair<_T1, _T2> = std::pair<zen::Zbase<char, zen::StorageRefCountThreadSafe, AllocatorFreeStoreChecked>, boost::unique_future<bool> >]' declared to take const reference, but implicit declaration would take non-const
"2." In /Source/ui/progress_indicator.cpp / line 1086
- _P("1 sec", "%x sec", numeric::round(timeElapsed)) :
+ wxString(_P("1 sec", "%x sec", numeric::round(timeElapsed))) :
Same thing on line 1869:
- const wxString overallBytesPerSecond = timeDelta == 0 ? wxString() : filesizeToShortString(dataCurrent * 1000 / timeDelta) + _("/sec");
- const wxString overallItemsPerSecond = timeDelta == 0 ? wxString() : replaceCpy(_("%x items/sec"), L"%x", formatThreeDigitPrecision(itemsCurrent * 1000.0 / timeDelta));
+ const wxString overallBytesPerSecond = timeDelta == 0 ? wxString() : wxString(filesizeToShortString(dataCurrent * 1000 / timeDelta) + _("/sec"));
+ const wxString overallItemsPerSecond = timeDelta == 0 ? wxString() : wxString(replaceCpy(_("%x items/sec"), L"%x", formatThreeDigitPrecision(itemsCurrent * 1000.0 / timeDelta)));
Replacing the first two lines with the last two fixes the compilation errors.
Thanks for help.