class 'fd_set' has no member 'fds_bits'

Compiling ACE+TAO+CIAO with pgCC comes up with an error that the class “fd_set” has no member

pgCC -O3 -g -D_REENTRANT -DACE_HAS_AIO_CALLS -DACE_LACKS_LOG2 -I/home/storri/ACE_wrappers/ -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I… -DACE_HAS_STATIC_LIBS -c -o .obj/ACE.o ACE.cpp

“/home/storri/ACE_wrappers/ace/Handle_Set.inl”, line 84: error: class “fd_set” has no member “fds_bits”

Host OS: Ubuntu 7.10
pgCC: 7.1-6 32-bit target on x86 Linux -tp core2

Hi,

Per thread:

ACE+TAO+CIAO is not yet ported for pgCC. The configuration you have may not work with pgCC.

Hongyon

I am attempting to port ACE+TAO+CIAO to the Portland Compiler. I am looking for answers to the problem not statements saying it has not been done.

Hi,

We don’t have Ubuntu system to test on. We run on RHEL4 and Fedora8 using 32-bit 7.1-6 compiler. It seems to run fine. Not sure why you got that error message. Perhaps one of those -D causes it.

I copy a small program in configure file to check for FD_ISSET and it runs fine.

% pgcpp testme.cpp
“testme.cpp”, line 10: warning: expression has no effect
FD_ISSET(0, temp );
^

% a.out
134837392
% cat testme.cpp
#include <sys/time.h>
#include <iostream.h>
int
main ()
{

//const fd_set* temp = new fd_set();
//FD_ISSET(0, const_cast< fd_set* >( temp ) );
const fd_set* temp = new fd_set();
FD_ISSET(0, temp );
cout << temp << endl;
;
return 0;
}


Hongyon

Also I downloaded and tried to configure but failed to get it done. It says the configuration is unusable. I don’t know where at which point the configuration fail or make it unusable because the configure seems to run through the end instead of stopping where it fails.

Are you one of the authors, if yes you probably know where the problem is.

If not, how do you get to the point where you compile and how to you know which flags (-D) to use because each compiler may not have the same flags.

Hongyon

You cannot use the autotools configure script to compile with pgCC. I have found in compiling other projects that there are some default flags that the autotools want to use are specific to gcc. I have not investigated autotools to see how to make pgCC to work with it.

You need to follow the instructions in the INSTALL.html for building with the traditional Makefiles.

I made a header, ACE_wrappers/ace/config.h that contains:

include “ace/config-linux.h”

I made a macro file, ACE_wrappers/include/makeinclude/platform_macros.GNU that contains:

include $(ACE_ROOT)/include/makeinclude/platform_linux_pgi.GNU

In the platform_linux_pgi.GNU file I made a few changes:

CC = pgcc
CXX = pgCC

removed -one_instantiation_per_object -prelink_objects flags

My gcc version is gcc 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2).

In order to quickly replicate this problem I would suggest using a VM to install a version of Ubuntu 7.10 and then ACE+TAO+CIAO. I believe the problem will be the same on any other Linux distribution and a similar version of gcc.

Here is the full build output:

make[1]: Entering directory `/home/storri/ACE_wrappers/ace’

GNUmakefile: /home/storri/ACE_wrappers/ace/GNUmakefile.ACE MAKEFLAGS=w

pgCC -O3 -g -D_REENTRANT -DACE_HAS_AIO_CALLS -DACE_LACKS_LOG2 -I/home/storri/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I… -DACE_AS_STATIC_LIBS -c -o .obj/ACE.o ACE.cpp
“/usr/include/pthread.h”, line 650: warning: attribute “regparm” ignored
__cleanup_fct_attribute;
^

“/usr/include/pthread.h”, line 661: warning: attribute “regparm” ignored
__cleanup_fct_attribute;
^

“/usr/include/pthread.h”, line 701: warning: attribute “regparm” ignored
__cleanup_fct_attribute attribute ((noreturn))
^

“/home/storri/ACE_wrappers/ace/Handle_Set.inl”, line 84: error: class “fd_set”
has no member “fds_bits”
return FD_ISSET (handle,
^

“/home/storri/ACE_wrappers/ace/Handle_Set.inl”, line 118: error: class “fd_set”
has no member “fds_bits”
FD_SET (handle,
^

“/home/storri/ACE_wrappers/ace/Handle_Set.inl”, line 138: error: class “fd_set”
has no member “fds_bits”
FD_CLR ((ACE_SOCKET) handle,
^

3 errors detected in the compilation of “ACE.cpp”.
make[1]: *** [.obj/ACE.o] Error 2
make[1]: Leaving directory `/home/storri/ACE_wrappers/ace’
make: *** [ACE] Error 2

The problem seems to be with the FD_ISSET macro which I cannot find in the ACE code. I will ask the ACE developers where this macro is defined.

FD_ISSET macro is actually defined in /usr/include/linux/time.h

define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)

__FD_ISSET macro is defined in /usr/include/asm-i386/posix_types.h

#undef __FD_ISSET
define __FD_ISSET(fd,fdsetp) (extension ({
unsigned char __result;
asm volatile(“btl %1,%2 ; setb %0”
:“=q” (__result) :“r” ((int) (fd)),
“m” (*(__kernel_fd_set *) (fdsetp)));
__result; }))

Hi,

There are other people who also try to port this application as well. Our technical service will be able to help you with porting problem.

Please contact trs@pgroup.com with detail.

Thank you,
Hongyon