Project

General

Profile

Bug #306

Don't require external ast msgcc

Added by Albert Lee about 9 years ago. Updated over 5 years ago.

Status:
In Progress
Priority:
Normal
Category:
tools - gate/build tools
Start date:
2010-10-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

External /usr/ast is required for the/usr/ast/bin/msgcc script and related executables msgcpp and msgen, which are run for the _msg target of the ast libraries. This is the only dependency on /usr/ast. These are the same as delivered by usr/src/cmd/ast/msgcc. The following trivial change uses the copies in proto.

diff --git a/usr/src/lib/Makefile.astmsg b/usr/src/lib/Makefile.astmsg
--- a/usr/src/lib/Makefile.astmsg
+++ b/usr/src/lib/Makefile.astmsg
@@ -47,8 +47,8 @@
 ASTMSGCATALOG= $(ROOT)/usr/lib/locale/C/LC_MESSAGES/$(MSGLIBNAME)

 $(DO_BUILD_AST_CATALOGS)ASTMSGCC= \
-       PATH="/usr/ast/bin/:/bin:/usr/bin" \
-               /usr/bin/ksh93 /usr/ast/bin/msgcc >>msgcc.out 2>&1
+       PATH="$(ROOT)/usr/ast/bin/:/bin:/usr/bin" \
+               /usr/bin/ksh93 $(ROOT)/usr/ast/bin/msgcc >>msgcc.out 2>&1

 ASTMSGS=  $(OBJECTS:%.o=msgs/%.mso)

History

#1

Updated by Rich Lowe about 9 years ago

Would it be a good idea to have $(ROOT)/usr/ast/bin and /usr/ast/bin? Otherwise, I like it. (consider that code review, if that helps)

#3

Updated by Garrett D'Amore about 9 years ago

I like it too, with the update. Please show a nightly build log with this and start the process to integrate. :-)

#4

Updated by Roland Mainz about 9 years ago

Erm...
1. ... the AST msg localisation tools are required for shell script localisation in ksh93 and bash, e.g. for $"..."-style literals and applications which use libast for localisation support. Removing them will pretty much kill such support
2. The tools could be moved to /usr/bin/. /usr/ast/bin/ was only chosen for political reasons (partially to declare to declare the tools and output formats as private, otherwise we would've to describe the whole POSIX l10n catalog format in an ARC case (the format itself is supported by libc but was never formally ARC'ed))
3. The reason why the tools and scripts for localisation are shipped with Solaris was that it is not allowed in OS/Net to execute binaries which are part of the proto area.

#5

Updated by Garrett D'Amore about 9 years ago

Answers to Roland's points:

1. We're not removing these utilities. so don't worry about that. In fact, what we're doing here is using the version of the tools that we just built rather than relying on whatever happens to be lying around on the build system.

2. We're not talking about moving tools. That's a totally different topic, and out of scope for this change.

3. I've never heard of any such rule, and even if I did, I'd say it sounds bunk. HOWEVER, normally this would be a bad idea because your proto area could (in theory, not ever possible with ON) be a cross-system where you can't run binaries. But this is a shell script.

In retrospect, I think the right answer is something different than proposed here: Specifically, we should "build" msgcc in the local directory, and use it from our source/build tree, not from the proto area. This build would be a "build-system-native" version of msgcc, whereas what we built for the proto area is a "target-system-native" version.

#6

Updated by Roland Mainz almost 9 years ago

In retrospect, I think the right answer is something different than proposed here: Specifically, we should
"build" msgcc in the local directory, and use it from our source/build tree, not from the proto area. This
build would be
a "build-system-native" version of msgcc, whereas what we built for the proto area is a "target-system-native"
version.

Erm... we would have to do the same with ksh93 then, too. There is no gurantee that new versions of "msgcc" in the tree work with old versions of ksh93. "msgcc" has a couple of old workarounds for old ksh93 bugs which are likely going to be pulled out next year. Depending on which ksh93 version then sits on the build system it may cause trouble (on the other side it is "only" used to build l10n catalogs... it is not exactly critical how the output looks in the case of missing workarounds as long as ksh93 doesn't dump core. Distributions are anyway needed to build OS/Net, then install the bits and then build+install again to make sure all stuff works properly).

That was one of the reasons why we shipped SUNWastdev as package - first OS/Net didn't had the utilities and then there was the fear that the use of newer features on older build machines may create issues. That's why JBeck enforced the rule described in [3] after April asked about this.

#7

Updated by Keith Wesolowski over 5 years ago

  • Category set to tools - gate/build tools
  • Status changed from New to In Progress
  • Assignee set to Keith Wesolowski
  • Difficulty set to Bite-size

Regardless of whether we want to build a separate native ksh93 and msgcc, Makefile.astmsg needs to stop hardcoding the path to the tools and learn to use $(MSGCC) and $(ASTBINDIR) from Makefile.master.

Also available in: Atom PDF