Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

31 character module name limit?

SOLVED
Go to solution
Phil Naecker
Occasional Visitor

31 character module name limit?

We are porting a Linux C++ application to VMS and have encountered the 31 character limit in module names. We will try /NAMES=SHORTENED. But does anyone know of any plans by OpenVMS engineering to address this issue more properly? Who can we beat on to ask for such support?
8 REPLIES
John Gillings
Honored Contributor

Re: 31 character module name limit?

Phil,

I don't think there are any plans to increase the module name limit. I'm curious why the *MODULE* name limit matters as it's largely an OpenVMS construct of interest only to the librarian, linker and DEBUG.

I thought C++ solved the problem of unlimited symbol length by "mangling" names? If not, /NAMES=SHORTENED should generate unique names in a transparent and consistent manner.

That said, if you have a business need for increased symbol lengths, please log a case against your service contract and ask to have the issue elevated into engineering.
A crucible of informative mistakes
Willem Grooters
Honored Contributor

Re: 31 character module name limit?

, and, as Guy Peleg has explained, image activator. So pretty basic..., though the change in itself wouldn't be a big issue in itself...(That's my interpretation)

This is a wish that is shared by a lot of, if not all developers - for years already. I can live with the limitation (gives me enough room for distictive, sensable names) but that may not be valid for all systems - would be great if this limitation was FINALLY lifted....
Willem Grooters
OpenVMS Developer & System Manager
Phil Naecker
Occasional Visitor

Re: 31 character module name limit?

Willem, this is not an issue of preference for constructing names. We are porting software from another platform - the choice of naming style has already been made, and the software is in use, with external APIs used by dozens of other applications.

Guy Peleg
Respected Contributor
Solution

Re: 31 character module name limit?

OpenVMS on Itanium allows modules
names up to 1024 characters.

Guy
Kris Clippeleyr
Honored Contributor

Re: 31 character module name limit?


Guy,

As Phil said

We are porting software from another platform...


There is more to it than just lifting the length limit on module names, even if you say that

OpenVMS on Itanium allows modules names up to 1024 characters.


AFAIK, the C compiler by default will truncate definitions & references of external symbols to 31 characters. Furthermore, if you specify preservation of case (/NAMES=AS_IS) then e.g. MMS gets confused, especially when you put "lowercase" modules in libraries.

An excerpt of the log file of the first build of Jam 2.4 should give some clarification.
(see also http://www.quadratrix.be/products/open_source_material.html )

> set default OPENSOURCE$ROOT:[JAM.JAM-2_4]
> cc /prefix=all/name=(as_is)/warn/reent=multi /define=("QPORT=1,VMS=1") /include=(OPENSOURCE$ROOT:[JAM.JAM-2_4],OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q]) /object=OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.OBJ]hash.obj OPENSOURCE$ROOT:[JAM.JAM-2_4]hash.c
> if f$search("OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.LIBlibjam.olb") .eqs. "" then library/create/object OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.LIB]libjam.olb
> library/replace/object OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.LIB]libjam.olb OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.OBJ]hash.obj

%MMS-W-GWKACTNOUPD, Actions didn't update OPENSOURCE$ROOT:[JAM.JAM-2_4.CONTRIB.Q.IA64.LIB]LIBJAM.OLB(HASH=HASH.OBJ)

So, what I'm trying to say is that, when porting to VMS, naming conventions from other platforms (e.g. U**x) can play tricks on you.

Just my 2 cents,
Kris (aka Qkcl)




I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Guy Peleg
Respected Contributor

Re: 31 character module name limit?

Kris,

OpenVMS (on Itanium) uses industry standard format for images and debug information
(aka ELF/DWARF)

All the compilers and tools (should be) aware of it.

Linux on Itanium uses the same standards...
so if it worked on Linux it *should* work
on VMS on Itanium....

Guy
Phil Naecker
Occasional Visitor

Re: 31 character module name limit?

We'll try Itanium. If it has lifted the 31 character limit and also made object formats more compatible, that should be a huge step in the direction of portability.
Guy Peleg
Respected Contributor

Re: 31 character module name limit?

Note that the librarian shipping with V8.2
has a bug and will not allow module
names with more than 31 characters. If you
are using the librarian, file a call with
your local support center to get the
fixed librarian.

Guy