f



[ace-users]: ACE 5.4.2 and ACE 5.4.3 compile failed on Solaris 9 x86 and Solaris 10 x86

Hi,all

    ACE VERSION: 5.4.3

    HOST MACHINE and OPERATING SYSTEM:
         Solaris10  X86   
    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
    COMPILER NAME AND VERSION (AND PATCHLEVEL):
        Compiler:  SUN CC 5.6     
        Make:      GNU make 3.80

    CONTENTS OF $ACE_ROOT/ace/config.h [if you use a link to a
platform-
    specific file, simply state which one]:
        #include "ace/config-sunos5.9.h"

    CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU
(unless
    this isn't used in this case, e.g., with Microsoft Visual C++):
        include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU


    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
    (used by MPC when you generate your own makefiles):

    AREA/CLASS/EXAMPLE AFFECTED:
[What example failed?  What module failed to compile?]
    "ace/OS_NS_sys_stat.cpp"

    DOES THE PROBLEM AFFECT:
        COMPILATION?
        yes

        LINKING?
            On Unix systems, did you run make realclean first?
        yes

        EXECUTION?
        OTHER (please specify)?
[Please indicate whether ACE, your application, or both are affected.]

    SYNOPSIS:
[Brief description of the problem]
    fail to compile "OS_NS_sys_stat.cpp"

    DESCRIPTION:
[Detailed description of problem.  Don't just say "<blah>
doesn't work, here's a fix," explain what your program does
to get to the <blah> state. ]
    when i compile ACE package,i type
    make inline=0 -f GNUmakefile.ACE
there are several files fail to compiled,and the complier have the
following output:

CC -mt -g -instances=explicit 
-DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -DSUN_CC_HAS_PVFC_BUG  
-I/export/home/hua/DevTools/ACE_wrappers -DACE_HAS_EXCEPTIONS
-DACE_NO_INLINE -I.. -DACE_HAS_ACE_TOKEN -DACE_HAS_ACE_SVCCONF
-DACE_BUILD_DLL  -c -KPIC -o .shobj/OS_NS_sys_stat.o
OS_NS_sys_stat.cpp
"/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_stat.inl", line
37: Error: fstat(int, stat*) is not a member of ACE_OS.
"/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_stat.inl", line
120: Error: fstat is not a member of ACE_OS.
"/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_stat.inl", line
142: Error: "ACE_OS::lstat(const char*, stat*)" was previously
declared "ACE_OS::lstat(const wchar_t*, stat*)".
"/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_stat.inl", line
163: Error: Formal argument file of type const wchar_t* in call to
ACE_OS::lstat(const wchar_t*, stat*) is being passed char*.

CC -mt -g -instances=explicit 
-DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -DSUN_CC_HAS_PVFC_BUG  
-I/export/home/hua/DevTools/ACE_wrappers -DACE_HAS_EXCEPTIONS
-DACE_NO_INLINE -I.. -DACE_HAS_ACE_TOKEN -DACE_HAS_ACE_SVCCONF
-DACE_BUILD_DLL  -c -KPIC -o .shobj/OS_NS_Thread.o OS_NS_Thread.cpp
"/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_utsname.inl",
line 14: Error: uname(utsname*) is not a member of ACE_OS.

I try to compile ACE  5.4.2 on Solaris 9 for X86,and have the same
problems.


    REPEAT BY:
[What you did to get the error; include test program or session
transcript if at all possible.  ]

    SAMPLE FIX/WORKAROUND:
[If available ]
0
qhjin2000
1/2/2005 5:21:13 PM
comp.soft-sys.ace 20326 articles. 1 followers. marlow.andrew (167) is leader. Post Follow

1 Replies
1263 Views

Similar Articles

[PageSpeed] 13

This is a compiler bug. You can duplicate the result w/:

#include <cstdio>

static int foo(int);

namespace FOO {
int foo(int);
}

int
FOO::foo(int)
{
return 1;
}

static int foo(int)
{
return 0;
}

int
main(int argc, char* argv[])
{
FOO::foo(1);
return EXIT_SUCCESS;
}

which results in:

Error: foo(int) is not a member of FOO

using Sun C++ 5.6 Patch 117550-01 which is the most recent patched C++
compiler in Sun Studio. (Question: what is the relationship between the
Sun Studio and Forte C++ compilers? Same product?) I've had some people
tell me the above code was a known problem in the previous release and
was fixed in the current release; however, it certainly seems broken to
me and the patch is definitely applied.

As someone mentioned, this is only an issue in the x86 Solaris 9 (10
too, maybe) where various system calls, e.g. fstat, uname, etc., are
static inline functions, e.g.:

static int uname(struct utsname *_buf)
{
return _nuname(_buf));
}

The only workaround that I've considered is changing the system
headers, but that's a pretty awful thing to do. In the meantime, I'm
trying to get a hold of Sun's support. (I'm evaluating the product so
they aren't exactly giving w/ support, but how does one convince
management to purchase software when the software doesn't work?)

In any event: if someone has been able to compile ACE w/ x86 Solaris 9
and Sun C++ 5.6 or higher, I'd love to hear about it. Or, for that
matter, if someone who has the patched C++ compiler could try the above
code fragment, I'd love to know that it fails (or succeeds).

(It occurs to me that this is a listserv being redirected to usenet so
I don't know if this will actually be seen. I suppose I ought to
consider submitting this to the list instead...)

> CC -mt -g -instances=explicit
> -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -DSUN_CC_HAS_PVFC_BUG
> -I/export/home/hua/DevTools/ACE_wrappers -DACE_HAS_EXCEPTIONS
> -DACE_NO_INLINE -I.. -DACE_HAS_ACE_TOKEN -DACE_HAS_ACE_SVCCONF
> -DACE_BUILD_DLL  -c -KPIC -o .shobj/OS_NS_sys_stat.o
> OS_NS_sys_stat.cpp
> "/export/home/hua/DevTools/ACE_wrappers/ace/OS_NS_sys_stat.inl", line
> 37: Error: fstat(int, stat*) is not a member of ACE_OS.

0
akusai
1/21/2005 3:23:23 AM
Reply: