[Gmsh] compilation error in Fltk

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Oct 17 22:06:15 CEST 2008


Orlando.Rivera at lrz.de wrote:
> Hi
> 
> I have a weird error by compiling under linux,   my configure is:
> 
> ./configure CC=icc CXX=icpc CFLAGS="-O3 -ipo" CXXFLAGS="-O3 -ipo"
> F77=ifort FFLAGS="-O3 -ipo"
> --prefix=/lustre_projects/pr28fa/a2815ag/gmsh/2.5
> --with-fltk-prefix=/lustre_projects/pr28fa/a2815ag/gmsh/fltk-1.1.9
> --with-gsl-prefix=/lrz/sys/libraries/gsl/1.11 --enable-cgns
> --with-cgns-prefix=/lustre_projects/pr28fa/a2815ag/gmsh/cgnslib-2.5
> --with-hdf5-prefix=/lrz/sys/HDF5/5-1.6.5-amd-gcc
> --with-fftw3-prefix=/lrz/sys/libraries/fftw/3.1.1
> 
> 
> Specifically Fltk/GmshServer.h
> the error is around  line 106
> 
> 
> #if defined(HAVE_NO_SOCKLEN_T)
>      int len;
>     // I replaced by socklen_t len;
> #else
>     socklen_t len;
> #endif
>     if(_portno < 0){
> #if !defined(WIN32) || defined(__CYGWIN__)
>       struct sockaddr_un from_un;
>       len = sizeof(from_un);
>       return accept(s, (struct sockaddr *)&from_un, &len); //<< error here
> #else
>       return -7; // Unix sockets not available on Windows without Cygwin
> #endif
> 
> 
> when HAVE_NO_SOCKLEN_T is defined  len is integer   and accept(s, (struct
> sockaddr *)&from_un, &len)  expects  a &socklen_t  as 3rd parameter and
> not an integer
> 
> 
> so I just replaced to be len as sockeln_t  ,and I went  through   and  it
> seems to work ,

Looks like the configure script didn't detect that your system actually 
has socklen_t.

Could you send your config.log file?



>  the question is :  is this a time bomb that will affect
> me in the future ,  what  GmshServer.h actually do?
> 

It's harmless: GmshServer.h is used to manage communications over 
sockets with external programs (e.g. solvers).



> 
> Regards
> 
> Orlando
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine