Compiling of the file G4UIGainServer.cc failed due to: src/G4UIGainServer.cc: In method `void G4UIGainServer::WaitingConnection ()': src/G4UIGainServer.cc:407: cannot convert `int *' to `socklen_t *' for argument `3' to `accept (int, sockaddr *, socklen_t *)' The offending line of code reads: if((socketD[i] = accept(socketD[0], (struct sockaddr *)&caddr,(int *)&len))<0){ While searching through the net, I found this problem arises because the typedef of socklen_t is platform dependent (int on some systems, unsigned int on others). In my case, compilation was achieved by switching the above line to: if((socketD[i] = accept(socketD[0], (struct sockaddr *)&caddr,(unsigned int *)&len))<0){
This is a famous "philosophical" issue. Linux requires unsigned int for this argument, while other Unixen are sticked to the legacy signed int. We have decided to offer the codes accepted to the legacy Unixen, while Linux may warn this problem, knowing that gcc-2.95.x warns this, while gcc-3.x (including 2.96.x) report a compile error. For the temporary patch, please change (int *) to (socklen=t *) at the line 401 of the G4UIGainServer.cc. We are reluctant to introduce a conditional compilation, but in the near future, we have to do so. Any better solution is welcome. Hajime Yoshida
With the more recent compilers the problem looks now resolved, so we now can close this.