zsh-workers
 help / color / mirror / code / Atom feed
* AIX and .export files again
@ 1999-12-14 17:31 Oliver Kiddle
  1999-12-15 18:12 ` Bart Schaefer
  1999-12-16 16:07 ` PATCH: " Oliver Kiddle
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Kiddle @ 1999-12-14 17:31 UTC (permalink / raw)
  To: Zsh workers

When linking compctl.so, the compiler complained that complete.export
and zle.export couldn't be found. The problem was that they hadn't been
generated yet. I couldn't see any dependencies in the Makefiles which
state the order that different modules are compiled. To fix it, I've 
hacked mkmakemod.sh to add the .export files to the dso's dependencies.

The trouble with this solution is that I can't get it to make any
.export files in a different directory so I've had to limit it to any
in the same directory. This is sufficient to allow everything to
compile but there must be a better way. Surely, if a module lists
another in its moddeps, it should be built after it. At the moment, the
modules seem to get built in alphabetical order in each directory.

I also got a few unresolved symbols. The patch sorts these out aswell.

Unfortunately, though this will now compile on AIX, it won't work: I get
messages of the form 'failed to load module: rlimits'. pws-10 has this
problem aswell but I haven't had much time to investigate why.

Oliver

diff -ur zsh-3.1.6-pws-11/Src/Zle/compcore.c zsh-3.1.6-pws-11.new/Src/Zle/compcore.c
--- zsh-3.1.6-pws-11/Src/Zle/compcore.c	Wed Dec  8 19:37:58 1999
+++ zsh-3.1.6-pws-11.new/Src/Zle/compcore.c	Tue Dec 14 14:38:56 1999
@@ -145,7 +145,7 @@
 /**/
 mod_export int nmatches;
 /**/
-int smatches;
+mod_export int smatches;
 
 /* != 0 if only explanation strings should be printed */
 
diff -ur zsh-3.1.6-pws-11/Src/Zle/compresult.c zsh-3.1.6-pws-11.new/Src/Zle/compresult.c
--- zsh-3.1.6-pws-11/Src/Zle/compresult.c	Wed Dec  8 19:32:29 1999
+++ zsh-3.1.6-pws-11.new/Src/Zle/compresult.c	Tue Dec 14 14:39:45 1999
@@ -1491,7 +1491,7 @@
 }
 
 /**/
-int asklist(void)
+mod_export int asklist(void)
 {
     /* Set the cursor below the prompt. */
     trashzle();
diff -ur zsh-3.1.6-pws-11/Src/Zle/zle_thingy.c zsh-3.1.6-pws-11.new/Src/Zle/zle_thingy.c
--- zsh-3.1.6-pws-11/Src/Zle/zle_thingy.c	Fri Dec  3 19:10:12 1999
+++ zsh-3.1.6-pws-11.new/Src/Zle/zle_thingy.c	Tue Dec 14 14:29:15 1999
@@ -49,7 +49,7 @@
 /* Hashtable of thingies.  Enabled nodes are those that refer to widgets. */
 
 /**/
-HashTable thingytab;
+mod_export HashTable thingytab;
 
 /**********************************/
 /* hashtable management functions */
diff -ur zsh-3.1.6-pws-11/Src/Zle/zle_tricky.c zsh-3.1.6-pws-11.new/Src/Zle/zle_tricky.c
--- zsh-3.1.6-pws-11/Src/Zle/zle_tricky.c	Tue Dec  7 22:20:04 1999
+++ zsh-3.1.6-pws-11.new/Src/Zle/zle_tricky.c	Tue Dec 14 14:30:01 1999
@@ -334,7 +334,7 @@
 /* Parameter pointer for completing keys of an assoc array. */
 
 /**/
-Param keypm;
+mod_export Param keypm;
 
 /* 1 if we are completing in a quoted string (or inside `...`) */
 
diff -ur zsh-3.1.6-pws-11/Src/mkmakemod.sh zsh-3.1.6-pws-11.new/Src/mkmakemod.sh
--- zsh-3.1.6-pws-11/Src/mkmakemod.sh	Fri Dec  3 19:10:12 1999
+++ zsh-3.1.6-pws-11.new/Src/mkmakemod.sh	Tue Dec 14 15:34:44 1999
@@ -183,9 +183,12 @@
 	dobjects=`echo $objects '' | sed 's,\.o ,..o ,g'`
 	modhdeps=
 	imports=
+	depimports=
 	for dep in $moddeps; do
 	    eval "loc=\$loc_$dep"
 	    imports="$imports \$(IMPOPT)\$(dir_top)/$loc/$dep.export"
+	    test "$loc" = "$the_subdir" &&
+	        depimports="$depimports $dep.export"
 	    case $the_subdir in
 		$loc)
 		    mdh="${dep}.mdh"
@@ -228,7 +231,7 @@
 	echo "	echo '' \$(MODOBJS_${module}) $modobjs_sed>> \$(dir_src)/stamp-modobjs.tmp"
 	echo
 	if test -z "$alwayslink"; then
-	    echo "${module}.\$(DL_EXT): \$(MODDOBJS_${module}) ${module}.export"
+	    echo "${module}.\$(DL_EXT): \$(MODDOBJS_${module}) ${module}.export $depimports"
 	    echo '	rm -f $@'
 	    echo "	\$(DLLINK) \$(@E@XPIMP_$module) \$(@E@NTRYOPT) \$(MODDOBJS_${module}) \$(LIBS)"
 	    echo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AIX and .export files again
  1999-12-14 17:31 AIX and .export files again Oliver Kiddle
@ 1999-12-15 18:12 ` Bart Schaefer
  1999-12-16 16:07 ` PATCH: " Oliver Kiddle
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-12-15 18:12 UTC (permalink / raw)
  To: Zsh workers

On Dec 14,  5:31pm, Oliver Kiddle wrote:
} Subject: AIX and .export files again
}
} [...]  I couldn't see any dependencies in the Makefiles which
} state the order that different modules are compiled. To fix it, I've 
} hacked mkmakemod.sh to add the .export files to the dso's dependencies.

Unfortunately, this patch won't apply after Zefram's monster in 9046.
Is something like it still needed with 9046 in place?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: Re: AIX and .export files again
  1999-12-14 17:31 AIX and .export files again Oliver Kiddle
  1999-12-15 18:12 ` Bart Schaefer
@ 1999-12-16 16:07 ` Oliver Kiddle
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Kiddle @ 1999-12-16 16:07 UTC (permalink / raw)
  To: Zsh workers

I wrote:
> Unfortunately, though this will now compile on AIX, it won't work: I get
> messages of the form 'failed to load module: rlimits'. pws-10 has this
> problem aswell but I haven't had much time to investigate why.

I've now investigated this problem. The problem results from the changes
in 8770 - the modules list containing both linked and dynamic modules
meant that load_and_bind tried to call AIX's loadbind for staticly
linked modules. The patch against module.c below fixes this.

Compiling pws-12 gave me one unresolved for zutil.so which was in
complete.so. The patch adds complete to zutil's dependencies. This
actually causes problems again with the .export file dependencies
because the complete module is in a different directory to zutil.
Hopefully Zefram's latest patch (9083) will sort that out though.

Oliver

*** Src/module.c.bak	Mon Dec  6 23:15:45 1999
--- Src/module.c	Thu Dec 16 15:48:55 1999
***************
*** 296,302 ****
  	int err = loadbind(0, (void *) addbuiltin, ret);
  	for (node = firstnode(modules); !err && node; incnode(node)) {
  	    Module m = (Module) getdata(node);
! 	    if (m->u.handle)
  		err |= loadbind(0, m->u.handle, ret);
  	}
  
--- 296,302 ----
  	int err = loadbind(0, (void *) addbuiltin, ret);
  	for (node = firstnode(modules); !err && node; incnode(node)) {
  	    Module m = (Module) getdata(node);
! 	    if (m->u.handle && !(m->flags & MOD_LINKED))
  		err |= loadbind(0, m->u.handle, ret);
  	}
  
*** Src/Modules/zutil.mdd.bak	Fri Dec 10 19:39:40 1999
--- Src/Modules/zutil.mdd	Thu Dec 16 14:06:21 1999
***************
*** 1,3 ****
--- 1,5 ----
+ moddeps="complete"
+ 
  objects="zutil.o"
  
  autobins="zformat zstyle"


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-16 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-14 17:31 AIX and .export files again Oliver Kiddle
1999-12-15 18:12 ` Bart Schaefer
1999-12-16 16:07 ` PATCH: " Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).