zsh-workers
 help / color / mirror / code / Atom feed
* Compile errors on AIX 5.2
@ 2007-06-19 18:01 Daniel Qarras
  2007-06-19 18:10 ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Qarras @ 2007-06-19 18:01 UTC (permalink / raw)
  To: zsh-workers

Hi!

I got a temporary access to an AIX 5.2 system and of course I tried to
compile latest zsh from CVS. configure passed ok but during compilation
I get this error:

gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o module.o
module.cmodule.c: In function `dyn_setup_module':
module.c:1344: error: too many arguments to function
module.c: In function `dyn_features_module':
module.c:1351: error: too many arguments to function
module.c: In function `dyn_enables_module':
module.c:1358: error: too many arguments to function
module.c: In function `dyn_boot_module':
module.c:1365: error: too many arguments to function
module.c: In function `dyn_cleanup_module':
module.c:1372: error: too many arguments to function
module.c: In function `dyn_finish_module':
module.c:1379: error: too many arguments to function
gmake[2]: *** [module.o] Error 1
gmake[2]: Leaving directory `/home/csc/myllynen/zsh-ibmsc/Src'
gmake[1]: *** [modobjs] Error 2
gmake[1]: Leaving directory `/home/csc/myllynen/zsh-ibmsc/Src'
gmake: *** [all] Error 1
zsh: exit 2     gmake

There seems to be some AIX specific code, fix would be probably rather
easy but as I do not understand the code I'm reporting in hope if
someone could provide a hint how to fix the code in question?

Thanks.




       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC


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

* Re: Compile errors on AIX 5.2
  2007-06-19 18:01 Compile errors on AIX 5.2 Daniel Qarras
@ 2007-06-19 18:10 ` Peter Stephenson
  2007-06-19 18:19   ` Daniel Qarras
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2007-06-19 18:10 UTC (permalink / raw)
  To: zsh-workers, Daniel Qarras

On Tue, 19 Jun 2007 11:01:44 -0700 (PDT)
Daniel Qarras <dqarras@yahoo.com> wrote:
> Hi!
> 
> I got a temporary access to an AIX 5.2 system and of course I tried to
> compile latest zsh from CVS. configure passed ok but during
> compilation I get this error:
> 
> gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
> module.o module.cmodule.c: In function `dyn_setup_module':
> module.c:1344: error: too many arguments to function
...

Yes, sorry, I knew this was a problem because I changed the interface and
couldn't test it on AIX.  Try the following.  (There could still be a
problem even if it compiles, although I hope not.)

Index: Src/module.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/module.c,v
retrieving revision 1.29
diff -u -r1.29 module.c
--- Src/module.c	29 May 2007 21:39:32 -0000	1.29
+++ Src/module.c	19 Jun 2007 18:08:00 -0000
@@ -1341,42 +1341,42 @@
 static int
 dyn_setup_module(Module m)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(0, m, NULL);
+    return ((int (*)_((int,Module, void*))) m->u.handle)(0, m, NULL);
 }
 
 /**/
 static int
 dyn_features_module(Module m, char ***features)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(4, m, features);
+    return ((int (*)_((int,Module, void*))) m->u.handle)(4, m, features);
 }
 
 /**/
 static int
 dyn_enables_module(Module m, int **enables)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(5, m, enables);
+    return ((int (*)_((int,Module, void*))) m->u.handle)(5, m, enables);
 }
 
 /**/
 static int
 dyn_boot_module(Module m)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(1, m, NULL);
+    return ((int (*)_((int,Module, void*))) m->u.handle)(1, m, NULL);
 }
 
 /**/
 static int
 dyn_cleanup_module(Module m)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(2, m, NULL);
+    return ((int (*)_((int,Module, void*))) m->u.handle)(2, m, NULL);
 }
 
 /**/
 static int
 dyn_finish_module(Module m)
 {
-    return ((int (*)_((int,Module))) m->u.handle)(3, m, NULL);
+    return ((int (*)_((int,Module,void *))) m->u.handle)(3, m, NULL);
 }
 
 /**/



To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: Compile errors on AIX 5.2
  2007-06-19 18:10 ` Peter Stephenson
@ 2007-06-19 18:19   ` Daniel Qarras
  2007-06-19 18:21     ` Daniel Qarras
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Qarras @ 2007-06-19 18:19 UTC (permalink / raw)
  To: zsh-workers

Hi!

> > I got a temporary access to an AIX 5.2 system and of course I tried
> > 
> > gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
> > module.o module.cmodule.c: In function `dyn_setup_module':
> > module.c:1344: error: too many arguments to function

Thanks for you prompt reply, it worked! Next stop is below :)

gcc -c -I.  -DHAVE_CONFIG_H -DMODULE -Wall -Wmissing-prototypes -O2  -o
modentry..o modentry.c
modentry.c:12: error: conflicting types for 'modentry'
modentry.c:7: error: previous declaration of 'modentry' was here
modentry.c:12: error: conflicting types for 'modentry'
modentry.c:7: error: previous declaration of 'modentry' was here
gmake[2]: *** [modentry..o] Error 1

Cheers!




       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/


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

* Re: Compile errors on AIX 5.2
  2007-06-19 18:19   ` Daniel Qarras
@ 2007-06-19 18:21     ` Daniel Qarras
  2007-06-19 18:55       ` Daniel Qarras
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Qarras @ 2007-06-19 18:21 UTC (permalink / raw)
  To: zsh-workers

> Thanks for you prompt reply, it worked! Next stop is below :)
> 
> gcc -c -I.  -DHAVE_CONFIG_H -DMODULE -Wall -Wmissing-prototypes -O2 
> -o
> modentry..o modentry.c
> modentry.c:12: error: conflicting types for 'modentry'
> modentry.c:7: error: previous declaration of 'modentry' was here

Sorry about the noise, that was obvious, the prototype just didn't
match the function. But this one seems more hairy:

( echo '#!'; cat cap.syms  | sed -n '/^X/{s/^X//;p;}' | sort -u ) >
cap.export
rm -f cap.so
gcc  -s -shared -o cap.so -Wl,-bI:../../Src/zsh.export
-Wl,-bE:cap.export -emodentry cap..o  ../../Src/modentry..o  -liconv
-ldl -lcurses -lm  -lc 
cap..o(.pr+0x32):cap.c: relocation truncated to fit: 0x03
module_features
cap..o(.pr+0x92):cap.c: relocation truncated to fit: 0x03
module_features
cap..o(.pr+0x10a):cap.c: relocation truncated to fit: 0x03
module_features
collect2: ld returned 1 exit status
gmake[3]: *** [cap.so] Error 1



       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 


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

* Re: Compile errors on AIX 5.2
  2007-06-19 18:21     ` Daniel Qarras
@ 2007-06-19 18:55       ` Daniel Qarras
  2007-06-19 20:31         ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Qarras @ 2007-06-19 18:55 UTC (permalink / raw)
  To: zsh-workers

> Sorry about the noise, that was obvious, the prototype just didn't
> match the function. But this one seems more hairy:
> 
> gcc  -s -shared -o cap.so -Wl,-bI:../../Src/zsh.export
> -Wl,-bE:cap.export -emodentry cap..o  ../../Src/modentry..o  -liconv
> -ldl -lcurses -lm  -lc 
> cap..o(.pr+0x32):cap.c: relocation truncated to fit: 0x03
> module_features

Well, this one seems to be caused by GNU binutils-2.15 ld, native AIX
ld works ok here. But after this a problem comes up from AIX specific
defines that I cannot grok.

( echo '#!'; cat newuser.syms  | sed -n '/^X/{s/^X//;p;}' | sort -u ) >
newuser.export
rm -f newuser.so
gcc  -s -shared -o newuser.so -Wl,-bI:../../Src/zsh.export
-Wl,-bE:newuser.export -emodentry newuser..o  ../../Src/modentry..o 
-liconv -ldl -lcurses -lm  -lc 
ld: 0711-317 ERROR: Undefined symbol: .enables_
ld: 0711-317 ERROR: Undefined symbol: .features_
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
gmake[3]: *** [newuser.so] Error 1

I tried manually both defines to no avail, not sure where to look at.


Thanks.




       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/


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

* Re: Compile errors on AIX 5.2
  2007-06-19 18:55       ` Daniel Qarras
@ 2007-06-19 20:31         ` Peter Stephenson
  2007-06-19 20:37           ` Daniel Qarras
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2007-06-19 20:31 UTC (permalink / raw)
  To: Daniel Qarras, zsh-workers

Daniel Qarras wrote:
> > Sorry about the noise, that was obvious, the prototype just didn't
> > match the function.

Another one I should have spotted; I've fixed that.

> But this one seems more hairy:
> > 
> > gcc  -s -shared -o cap.so -Wl,-bI:../../Src/zsh.export
> > -Wl,-bE:cap.export -emodentry cap..o  ../../Src/modentry..o  -liconv
> > -ldl -lcurses -lm  -lc 
> > cap..o(.pr+0x32):cap.c: relocation truncated to fit: 0x03
> > module_features
> 
> Well, this one seems to be caused by GNU binutils-2.15 ld, native AIX
> ld works ok here.

module_features is file static, so I don't see a lot I can do about this
anyway, but if renaming it or something such helps I can do it.

> But after this a problem comes up from AIX specific
> defines that I cannot grok.
> 
> ld: 0711-317 ERROR: Undefined symbol: .enables_
> ld: 0711-317 ERROR: Undefined symbol: .features_

I didn't update the newuser module for feature support; most systems
don't care but AIX insists on linking all module functions.  This
should fix it.

Index: Src/Modules/newuser.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/newuser.c,v
retrieving revision 1.5
diff -u -r1.5 newuser.c
--- Src/Modules/newuser.c	7 Feb 2006 05:19:21 -0000	1.5
+++ Src/Modules/newuser.c	19 Jun 2007 20:26:37 -0000
@@ -40,6 +40,20 @@
 }
 
 /**/
+int
+features_(Module m, char ***features)
+{
+    return 1;
+}
+
+/**/
+int
+enables_(Module m, int **enables)
+{
+    return 0;
+}
+
+/**/
 static int
 check_dotfile(const char *dotdir, const char *fname)
 {

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


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

* Re: Compile errors on AIX 5.2
  2007-06-19 20:31         ` Peter Stephenson
@ 2007-06-19 20:37           ` Daniel Qarras
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Qarras @ 2007-06-19 20:37 UTC (permalink / raw)
  To: zsh-workers

Hi!

> > ld: 0711-317 ERROR: Undefined symbol: .enables_
> > ld: 0711-317 ERROR: Undefined symbol: .features_
> 
> I didn't update the newuser module for feature support; most systems
> don't care but AIX insists on linking all module functions.  This
> should fix it.

Yes, thanks, now it compiles, install, and run all ok (at least few
minutes)! Didn't yet try the tests or anything fancier, perhaps a bit
later.

Cheers!



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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

end of thread, other threads:[~2007-06-19 20:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19 18:01 Compile errors on AIX 5.2 Daniel Qarras
2007-06-19 18:10 ` Peter Stephenson
2007-06-19 18:19   ` Daniel Qarras
2007-06-19 18:21     ` Daniel Qarras
2007-06-19 18:55       ` Daniel Qarras
2007-06-19 20:31         ` Peter Stephenson
2007-06-19 20:37           ` Daniel Qarras

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).