Closed Bug 76740 Opened 24 years ago Closed 23 years ago

minor change to arch.mk for OpenVMS (define OS_TARGET)

Categories

(NSS :: Libraries, defect)

3.2.1
DEC
OpenVMS
defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 81181

People

(Reporter: colin, Assigned: wtc)

Details

Attachments

(1 file)

In all the recent integration changes for PSM2, something somewhere has changed so that OS_CONFIG was no longer defined correctly and so a build from security/manager would fail because it couldn't include the $(OS_CONFIG) file. OS_CONFIG is defined as $(OS_TARGET)$(OS_RELEASE) In previous builds of PSM2, OS_TARGET was defined the same as OS_ARCH, namely OpenVMS. I'm not sure where this getting defined before, but in order to make it work now, I am setting OS_TARGET along with OS_ARCH in the OpenVMS section of arch.mk. I will attach the patch just as soon as my build has completed successfully.
colin, What's the branch? The NSS tip shows that OS_CONFIG has always been defined as $(OS_TARGET)$(OS_RELEASE). There a should be a line in arch.mk which reads: ifndef OS_TARGET OS_TARGET = $(OS_ARCH) endif If that line is there, then the question is, who is setting OS_TARGET on you for Open VMS builds (is it a command line arg, or is one of the other 'ARCH' confused and thinks it is getting invoked. bob
Yes, I have the part: ifndef OS_TARGET OS_TARGET = $(OS_ARCH) endif But OS_TARGET is set in my config/autoconf.mk file (as is OS_ARCH), and so the above OS_TARGET define is never taken. My aim is to change both OS_TARGET and OS_ARCH from what uname reports. It reports "POSIX_for_OpenVMS_AXP" and all I want is "OpenVMS".
OK, now I'm confused, why is OS_TARGET defined in autoconf.mk? The reason I'm asking all these questions is I'd like to fix this in a way that benefits all the platforms. bob
OS_TARGET and OS_ARCH are defined in configure when cross compiling (--enable-cross-compile)
Adding Wan-Teh... So the question is way does configure set OS_TARGET to such a weird value? Wan-Teh does NSPR require some weird OS_TARGET? Is this just an OpenVMS issue are will we have problems on other platforms as well. bob
Technically "POSIX_for_OpenVMS_AXP" is the OS_TARGET and OS_ARCH - its what uname -s returns. But I've always used "OpenVMS" as the platform name because its so much easier to type. And so when I added a platform-specific file in coreconf for OpenVMS, I used "OpenVMS" as the root of the name and not "POSIX_for_OpenVMS_AXP". And so I then needed the patch to get NSS to find my platform file in coreconf. That's how we got here. My NSPR platform-specific file also used "OpenVMS" as its root and not "POSIX_for_OpenVMS_AXP". You'll see similar "trickery" setting OS_ARCH in http://lxr.mozilla.org/mozilla/source/nsprpub/config/arch.mk#85 so that NSPR finds the right platform-specific file.
Bob: Apparently Colin is using the "unofficial" NSS autoconf build system, which has autoconf.mk :-) Colin: what cvs tag do you pull NSS with?
I don't think I'm using NSS autoconf. The only autoconf.mk files in my entire build tree are: /m09opt/nsprpub/config/autoconf.mk /m09opt/config/autoconf.mk /m09opt/directory/c-sdk/ldap/build/autoconf.mk I pull NSS as per client.mk; security/manager and security/psm come from the tip while security/nss and security/coreconf come from NSS_CLIENT_TAG. [BTW - welcome back Wan-Teh]
Colin: Now I understand. Mozilla's autoconf.mk sets OS_TARGET to "POSIX_for_OpenVMS_AXP". Then, Mozilla does a sub-make in NSS, and the value of OS_TARGET is passed to NSS's makefiles (by make). Since NSS's makefiles (coreconf) set OS_TARGET only if OS_TARGET is not defined, NSS sees this weird value. One way to fix this is to modify Mozilla's configure script so that it sets OS_TARGET to "OpenVMS" in autoconf.mk, which is the value you want for NSS makefiles too. Does this sound okay?
Well, yeah, I guess I could change it in Mozilla's configure script, but that might break something else that I would then have to fix. Why the big objection to one additional line in the OpenVMS-specific section of NSS's arch.mk?
Since someone else ran into this in the news group, it seems to me that it's best that configure set OS_TARGET to the same as OS_ARCH in the autoconf script unless there is a reason not to. At the very least it should set OS_TARGET to OS_ARCH before invoking NSS. I don't mind the change you've made, colin, but I'm trying to see how we prevent lots of special case settings of OS_TARGET here. bob
Colin: I'm trying to understand why the value of OS_TARGET in mozilla/config/autoconf.mk is passed to the makefiles of NSS. Is OS_TARGET set in your environment? I found that GNU make passes a make variable to sub-makes if it is set in the environment. So, things may work in unexpected ways if the parent makefile modifies the value of that environment variable. Bob: you said that someone else ran into this in the news group. What platform was he on? Was OS_TARGET also the problematic make variable?
> Is OS_TARGET set in your environment? No. Its only set by configure.
So, how are we going to fix this? Should I set OS_TARGET in Mozilla's configure script and hope it get carried on down, or should I set OS_TARGET in the OpenVMS-specific section of coreconf/arch.mk? Which is preferred? I have about 24hrs to get this checked in :-)
Assignee: relyea → wtc
My patch for bug #81181 fixed this bug too. *** This bug has been marked as a duplicate of 81181 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Just to confirm that I am building fine now without my proposed change.
Thank you for the verification.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: