[Mauiusers] compiling Maui on Caos NSA Linux: mktime problem?

Mehdi AMINI amini at unistra.fr
Tue Apr 21 10:57:53 MDT 2009


Hello,

Grigory Shamov a écrit :
> Dear All,
> 
> I've tried to build Maui from sources, on my newly installed Caos NSA v.1.0.8 Linux. It has a new version of GCC (here is the output of gcc -v)
> 
> ====
> Using built-in specs.
> Target: x86_64-caos-linux-gnu
> Configured with: ../configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --libexecdir=/usr/lib64 --with-slib=/lib64 --infodir=/usr/share/info --mandir=/usr/share/man --enable-shared --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.3.3 --enable-languages=c,c++,fortran --disable-checking --enable-nls --enable-c-mbchar --enable-long-long --enable-__cxa_atexit --host=x86_64-caos-linux-gnu --build=x86_64-caos-linux-gnu --target=x86_64-caos-linux-gnu
> Thread model: posix
> gcc version 4.3.3 (GCC) 
> ====


I won't help you for your configure script, but I just want to mention 
that I had many problem with maui compiled by GCC 4. I had to went back 
to GCC 3 in order to have a proper build of maui.

The reason is that maui use sprintf with overlapping memory acces : the 
use of sprintf() to append to a buffer, as in sprintf(buf, "%sEntry: 
%d\n", buf, i) is not valid according to C99 ("If copying takes place 
between objects that overlap, the behavior is undefined.") which can 
result to undefined result according to C standard.

And GCC4 seems to handle that differently than GCC3.

-- 
------------------------------------------
  Mehdi AMINI
  Département Expertise pour la Recherche
  Université de Strasbourg / Direction Informatique
------------------------------------------


More information about the mauiusers mailing list