You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Scott Zhong <Sc...@roguewave.com> on 2008/02/06 22:26:26 UTC

HP-UX 11.23 aCC 3.73

Hi while compiling executables with stdcxx I ran into the following
warnings during linking with +nostl flag:

ld: (Warning) Unsatisfied symbol "ostream::operator <<(const char *)" in
file /usr/lib/pa20_64/libstd.sl
ld: (Warning) Unsatisfied symbol "Class tables [Vtable] for type
"bad_alloc"" in file /usr/lib/pa20_64/libstd.sl
ld: (Warning) Unsatisfied symbol "Class tables [Vtable] dependent on key
function: "exception::~exception()"" in file /usr/lib/pa20_64/libstd.sl
ld: (Warning) Unsatisfied symbol "typeid<exception>" in file
/usr/lib/pa20_64/libstd.sl
ld: (Warning) Unsatisfied symbol "exception::~exception()" in file
/usr/lib/pa20_64/libstd.sl
ld: (Warning) Unsatisfied symbol "istream::do_ipfx(int)" in file
/usr/lib/pa20_64/libstd.sl

after some research, I found that the compile lines needed +nostl as
well to not include the stl that was shipped with HP-UX compiler.  But
doing this I ran into compiler issues such as these:

# aCC +DD64 -D_RWSTD_USE_CONFIG -D_RWCONFIG=11d -I/build/include -AA -g
-DRWDEBUG  +nostl +w +W229 +W361 +W392 +W431 +W655 +W684 +W818 +W819
+W849 +W889 +W887 +W921 -D_RWSTDDEBUG -c  sizeof.cpp
Error 112: "sizeof.cpp", line 4 # Include file <stdio.h> not found.
    #include <stdio.h>
             ^^^^^^^^^
Error 328: "sizeof.cpp", line 16 # Function 'printf' has not been
defined yet; cannot call.
        printf ("/**/\n#undef RW_SIZEOF\n");
        ^^^^^^
Error 328: "sizeof.cpp", line 44 # Function 'size_t' has not been
defined yet; cannot call.
        do_print (                (size_t)(0), "SIZE_T");
                                   ^^^^^^

After some searching, this macro seems to be the cause of the error:

_RWSTD_NO_DEPRECATED_C_HEADERS

It is defined in the file include/rw/_config-acc.h. Is there any reason
behind the definition for that macro on HP UX platform or was it simply
being defined because hp compiler ships with a version of stdcxx
library?

Re: HP-UX 11.23 aCC 3.73

Posted by Martin Sebor <se...@roguewave.com>.
Scott Zhong wrote:
> Hi while compiling executables with stdcxx I ran into the following
> warnings during linking with +nostl flag:
> 
> ld: (Warning) Unsatisfied symbol "ostream::operator <<(const char *)" in
> file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] for type
> "bad_alloc"" in file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] dependent on key
> function: "exception::~exception()"" in file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "typeid<exception>" in file
> /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "exception::~exception()" in file
> /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "istream::do_ipfx(int)" in file
> /usr/lib/pa20_64/libstd.sl
> 
> after some research, I found that the compile lines needed +nostl as
> well to not include the stl that was shipped with HP-UX compiler.  But
> doing this I ran into compiler issues such as these:
> 
> # aCC +DD64 -D_RWSTD_USE_CONFIG -D_RWCONFIG=11d -I/build/include -AA -g
> -DRWDEBUG  +nostl +w +W229 +W361 +W392 +W431 +W655 +W684 +W818 +W819
> +W849 +W889 +W887 +W921 -D_RWSTDDEBUG -c  sizeof.cpp
> Error 112: "sizeof.cpp", line 4 # Include file <stdio.h> not found.
>     #include <stdio.h>
>              ^^^^^^^^^
> Error 328: "sizeof.cpp", line 16 # Function 'printf' has not been
> defined yet; cannot call.
>         printf ("/**/\n#undef RW_SIZEOF\n");
>         ^^^^^^
> Error 328: "sizeof.cpp", line 44 # Function 'size_t' has not been
> defined yet; cannot call.
>         do_print (                (size_t)(0), "SIZE_T");
>                                    ^^^^^^
> 
> After some searching, this macro seems to be the cause of the error:
> 
> _RWSTD_NO_DEPRECATED_C_HEADERS
> 
> It is defined in the file include/rw/_config-acc.h. Is there any reason
> behind the definition for that macro on HP UX platform or was it simply
> being defined because hp compiler ships with a version of stdcxx
> library?

There is a reason. There is some (brief) background in STDCXX-501:
   http://issues.apache.org/jira/browse/STDCXX-501

Martin

> 


Re: HP-UX 11.23 aCC 3.73

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
> 
> 
> Travis Vitek wrote:
>>
>>
>> Scott Zhong-2 wrote:
>>> Hi while compiling executables with stdcxx I ran into the following
>>> warnings during linking with +nostl flag:
>>>
>>> ld: (Warning) Unsatisfied symbol "ostream::operator <<(const char *)" in
>>> file /usr/lib/pa20_64/libstd.sl
>>> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] for type
>>> "bad_alloc"" in file /usr/lib/pa20_64/libstd.sl
>>> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] dependent on key
>>> function: "exception::~exception()"" in file /usr/lib/pa20_64/libstd.sl
>>> ld: (Warning) Unsatisfied symbol "typeid<exception>" in file
>>> /usr/lib/pa20_64/libstd.sl
>>> ld: (Warning) Unsatisfied symbol "exception::~exception()" in file
>>> /usr/lib/pa20_64/libstd.sl
>>> ld: (Warning) Unsatisfied symbol "istream::do_ipfx(int)" in file
>>> /usr/lib/pa20_64/libstd.sl
>>>
>>> after some research, I found that the compile lines needed +nostl as
>>> well to not include the stl that was shipped with HP-UX compiler.  But
>>> doing this I ran into compiler issues such as these:
>>>
>> Scott,
>>
>> From my quick look at what you've posted above, it appears that you are
>> overlooking the actual problem.
>>
>> If you look at the original linker error, you'll see that the linker is
>> attempting to link using the native library [/usr/lib/pa20_64/libstd.sl].
>> If you're using +nostl, then you should not be linking to the native
>> library, right?
>>
>> I'd venture to guess that the build would go a little better if it were
>> trying to link to the stdcxx library.
>>
>> Travis
>>
> 
> I think I see where you are going with this. The compile line didn't have
> +nostl, so the native headers were used to compile. I don't see how the
> linker is getting the native library if the +nostl option is used...

He didn't show the link line but I wonder if both libraries have
the same base name, i.e., libstd and maybe the linker is getting
confused. /usr/lib/pa20_64/libstd.s has references to symbols
like istream::do_ipfx that are defined in /usr/lib/libstream.sl.

Otherwise, MSVC has a #pragma that, when found in a header, makes
the compiler communicate a dependency on a library to the linker
so that it then knows what library to link the .obj file with just
based on what headers were #included in the object's translation
unit. It's almost like black magic. If HP aCC had the same thing
and Scott's source contained the same #pragma it might explain
why the linker is linking the pre-standard library.

Martin

> 
> Travis


Re: HP-UX 11.23 aCC 3.73

Posted by Travis Vitek <vi...@roguewave.com>.


Travis Vitek wrote:
> 
> 
> 
> Scott Zhong-2 wrote:
>> 
>> Hi while compiling executables with stdcxx I ran into the following
>> warnings during linking with +nostl flag:
>> 
>> ld: (Warning) Unsatisfied symbol "ostream::operator <<(const char *)" in
>> file /usr/lib/pa20_64/libstd.sl
>> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] for type
>> "bad_alloc"" in file /usr/lib/pa20_64/libstd.sl
>> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] dependent on key
>> function: "exception::~exception()"" in file /usr/lib/pa20_64/libstd.sl
>> ld: (Warning) Unsatisfied symbol "typeid<exception>" in file
>> /usr/lib/pa20_64/libstd.sl
>> ld: (Warning) Unsatisfied symbol "exception::~exception()" in file
>> /usr/lib/pa20_64/libstd.sl
>> ld: (Warning) Unsatisfied symbol "istream::do_ipfx(int)" in file
>> /usr/lib/pa20_64/libstd.sl
>> 
>> after some research, I found that the compile lines needed +nostl as
>> well to not include the stl that was shipped with HP-UX compiler.  But
>> doing this I ran into compiler issues such as these:
>> 
> 
> Scott,
> 
> From my quick look at what you've posted above, it appears that you are
> overlooking the actual problem.
> 
> If you look at the original linker error, you'll see that the linker is
> attempting to link using the native library [/usr/lib/pa20_64/libstd.sl].
> If you're using +nostl, then you should not be linking to the native
> library, right?
> 
> I'd venture to guess that the build would go a little better if it were
> trying to link to the stdcxx library.
> 
> Travis
> 

I think I see where you are going with this. The compile line didn't have
+nostl, so the native headers were used to compile. I don't see how the
linker is getting the native library if the +nostl option is used...

Travis
-- 
View this message in context: http://www.nabble.com/HP-UX-11.23-aCC-3.73-tp15322076p15324848.html
Sent from the stdcxx-dev mailing list archive at Nabble.com.


Re: HP-UX 11.23 aCC 3.73

Posted by Travis Vitek <vi...@roguewave.com>.


Scott Zhong-2 wrote:
> 
> Hi while compiling executables with stdcxx I ran into the following
> warnings during linking with +nostl flag:
> 
> ld: (Warning) Unsatisfied symbol "ostream::operator <<(const char *)" in
> file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] for type
> "bad_alloc"" in file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "Class tables [Vtable] dependent on key
> function: "exception::~exception()"" in file /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "typeid<exception>" in file
> /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "exception::~exception()" in file
> /usr/lib/pa20_64/libstd.sl
> ld: (Warning) Unsatisfied symbol "istream::do_ipfx(int)" in file
> /usr/lib/pa20_64/libstd.sl
> 
> after some research, I found that the compile lines needed +nostl as
> well to not include the stl that was shipped with HP-UX compiler.  But
> doing this I ran into compiler issues such as these:
> 

Scott,

>From my quick look at what you've posted above, it appears that you are
overlooking the actual problem.

If you look at the original linker error, you'll see that the linker is
attempting to link using the native library [/usr/lib/pa20_64/libstd.sl]. If
you're using +nostl, then you should not be linking to the native library,
right?

I'd venture to guess that the build would go a little better if it were
trying to link to the stdcxx library.

Travis
-- 
View this message in context: http://www.nabble.com/HP-UX-11.23-aCC-3.73-tp15322076p15324288.html
Sent from the stdcxx-dev mailing list archive at Nabble.com.