The bug has been observed using GCC (>= 4.3) on Ubuntu, and the fix has been suggested here.
The bug lies in file file_spec.h, function Get_File_Spec() of the GIZA++ source code. More specifically in the lines:
char time_stmp[17];
sprintf(time_stmp, "%02d-%02d-%02d.%02d%02d%02d.", local->tm_year,
(local->tm_mon + 1), local->tm_mday, local->tm_hour,
local->tm_min, local->tm_sec);
To fix this bug, edit the file as follows:
*** file_spec.h 2009/07/10 21:38:39 1.1
--- file_spec.h 2009/07/13 11:37:21
***************
*** 37,49 ****
struct tm *local;
time_t t;
char *user;
! char time_stmp[17];
char *file_spec = 0;
t = time(NULL);
local = localtime(&t);
! sprintf(time_stmp, "%02d-%02d-%02d.%02d%02d%02d.", local->tm_year,
(local->tm_mon + 1), local->tm_mday, local->tm_hour,
local->tm_min, local->tm_sec);
user = getenv("USER");
--- 37,49 ----
struct tm *local;
time_t t;
char *user;
! char time_stmp[19];
char *file_spec = 0;
t = time(NULL);
local = localtime(&t);
! sprintf(time_stmp, "%04d-%02d-%02d.%02d%02d%02d.", 1900 + local->tm_year,
(local->tm_mon + 1), local->tm_mday, local->tm_hour,
local->tm_min, local->tm_sec);
user = getenv("USER");
and re-compile GIZA++.
Note that you do not need to recompile Moses.