CXX on X86 : stream.h missing

Post Reply

Topic author
joukj
Master
Posts: 184
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

CXX on X86 : stream.h missing

Post by joukj » Mon Jun 19, 2023 6:26 am

Hi I get a missing stream.h in C++ on X86 (On IA64 and AXP it just works)

Code: Select all

rumba-jj) cxx/vers
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git d469fd71c59
f33c7d998debe420a69abb31f1f57)
Build date: 06-16-2023
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: RUMBA$DKA100:[SYS0.SYSCOMMON.][SYSEXE]
rumba-jj) ty test.cxx
#include <stream.h>
int main()
{
}
  19-JUN-2023 12:24:35
rumba-jj) cxx test.cxx
$DISK0:[JOUKJ.test]test.cxx;34:1:10: fatal error: 'stream.h' file not found
#include <stream.h>
         ^~~~~~~~~~
1 error generated.
Added in 13 minutes 35 seconds:
same with <generic.h>


jreagan
VSI Expert
Master
Posts: 146
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX on X86 : stream.h missing

Post by jreagan » Mon Jun 19, 2023 10:32 am

Ah, we missed those. They are not from a standard so we didn't pick those up from the libcxx component in LLVM and not on my Linux box. However, since we have them on Itanium and we want to "recompile and go", we'll have to figure out something to provide (if anything).


jreagan
VSI Expert
Master
Posts: 146
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX on X86 : stream.h missing

Post by jreagan » Wed Sep 27, 2023 1:28 pm

We've been talking about this more internally. On Itanium, there were several headers with ".h" suffix that were inserted into the CXXL$ANSI_DEF.TLB file. Ones like new.h or string.h might have been inserted to be "helpful" to C programs moving to C++. However, for a header like stream.h, we're not sure why that would have been in the TLB file. No C program could have ever used a stream.h file. So C++ programs should be using <stream> or <stream.hxx>

There are many headers in the Itanium TLB that are not provided with C++ on x86. Many are internal RogueWave headers that don't make sense on x86. If people included them, that would be something not portable to x86 as they are relying on the internal implementation.

If the Itanium stream.h header is identical to the Itanium stream.hxx header, we can look into providing it but we really can't imagine code would use/rely on those stream.h/generic.h headers.

I see no mention of a stream.h in the C++ docset.

User avatar

arne_v
Master
Posts: 374
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: CXX on X86 : stream.h missing

Post by arne_v » Wed Sep 27, 2023 6:41 pm

Before C++ 98 all the common (standard before the standard) C++ header files had .h extension.

I took a look at a very old g++ (on VMS Alpha!) and stream.h contains some stuff that are in ios in official standard C++ (dec, hex, oct manipulators etc.).

No - I am not saying that it makes sense to add it - I am just saying that there may be some C++ code older than 25 years that actually do use that header file.
Arne
arne@vajhoej.dk
VMS user since 1986


Topic author
joukj
Master
Posts: 184
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: CXX on X86 : stream.h missing

Post by joukj » Thu Sep 28, 2023 6:35 am

Looks like the stream.h on IA64 is just a "wrapper" :

#ifndef __STREAM_HXX
#include <ostream>
#include <stream.hxx>
#endif

However stream.hxx is also not present on X86. (and this is a .hxx file)

oh and generic.h seems to be wrapper for generic.hxx.
Last edited by joukj on Thu Sep 28, 2023 7:11 am, edited 1 time in total.


jreagan
VSI Expert
Master
Posts: 146
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX on X86 : stream.h missing

Post by jreagan » Thu Sep 28, 2023 3:43 pm

Yeah, some are wrappers, but others seem to be from the original Alpha C++ STL and probably would result in errors or bad behavior. We are still doing a study and will at least include some guidance in the release notes/documentation.

Some of the headers in that .TLB file seem to be meant for internal use only or use by other RogueWave headers. And there is no mention of a <stream.h> in any of the Alpha or Itanium documentation (did I miss something?)

My fear is that some future revision of the STL will add a header like <stream.hxx> There is no such header defined by C++ STL. Today you have ios, streambuf, ostream, istream, fstream, sstream, spanstream, strstream (deprecated), and synchstream.

With the goal of providing a modern C++ build environment on OpenVMS to aid the porting of code, adding our own headers to the namespace of headers is risky.

Post Reply