zsh-workers
 help / color / mirror / code / Atom feed
* Unable to compile zsh on AIX
@ 2020-02-24 10:35 ` Arnon Yaari
  2020-02-24 10:52   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Arnon Yaari @ 2020-02-24 10:35 UTC (permalink / raw)
  To: zsh-workers

I am trying to compile zsh on an AIX machine and I am getting errors about undefined symbols during linking, specifically:

ld: 0711-317 ERROR: Undefined symbol: .zgetcwd
ld: 0711-317 ERROR: Undefined symbol: .xsymlink

Operating system: AIX 7.1 (7100-04-06-1806)
Compiler: gcc 6.3.0 from IBM's AIX Toolbox for Linux Applications
Command and full output: https://gist.github.com/wiggin15/12900e64a3dd5711cd3a05f1f975825d

I don't know if I am using the right approach, but I was able to compile zsh after adding "mod_export" modifiers to the following functions:

zgetcwd
xsymlink
bin_typeset
redrawhook
backwardmetafiedchar
openkeymap

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

* Re: Unable to compile zsh on AIX
  2020-02-24 10:35 ` Unable to compile zsh on AIX Arnon Yaari
@ 2020-02-24 10:52   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2020-02-24 10:52 UTC (permalink / raw)
  To: zsh-workers, Arnon Yaari

On Mon, 2020-02-24 at 12:35 +0200, Arnon Yaari wrote:
> I am trying to compile zsh on an AIX machine and I am getting errors about undefined symbols during linking, specifically:
> 
> ld: 0711-317 ERROR: Undefined symbol: .zgetcwd
> ld: 0711-317 ERROR: Undefined symbol: .xsymlink
> 
> Operating system: AIX 7.1 (7100-04-06-1806)
> Compiler: gcc 6.3.0 from IBM's AIX Toolbox for Linux Applications
> Command and full output: https://protect2.fireeye.com/url?k=ce885d5c-93585590-ce89d613-000babff3793-05723340001ba74f&u=https://gist.github.com/wiggin15/12900e64a3dd5711cd3a05f1f975825d
> 
> I don't know if I am using the right approach, but I was able to compile zsh after adding "mod_export" modifiers to the following functions:
> 
> zgetcwd
> xsymlink
> bin_typeset
> redrawhook
> backwardmetafiedchar
> openkeymap

That's exactly the right approach, yes.  We used to do this for AIX but
it's rather fallen off the radar in recent years.  I'll get the following in ASAP.

pws


diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index d13aed594..2389ab754 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -404,7 +404,7 @@ scankeys(HashNode hn, UNUSED(int flags))
 /**************************/
 
 /**/
-Keymap
+mod_export Keymap
 openkeymap(char *name)
 {
     KeymapName n = (KeymapName) keymapnamtab->getnode(keymapnamtab, name);
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index be68f4722..8c0534708 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1056,7 +1056,7 @@ getrestchar(int inchar, char *outstr, int *outcount)
 #endif
 
 /**/
-void
+mod_export void
 redrawhook(void)
 {
     Thingy initthingy;
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index 155fda80d..3bafff3f1 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -166,7 +166,7 @@ decpos(int *pos)
  */
 
 /**/
-char *
+mod_export char *
 backwardmetafiedchar(char *start, char *endptr, convchar_t *retchr)
 {
 #ifdef MULTIBYTE_SUPPORT
diff --git a/Src/builtin.c b/Src/builtin.c
index aa5767cf1..407cad159 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2597,7 +2597,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
  */
 
 /**/
-int
+mod_export int
 bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func)
 {
     Param pm;
diff --git a/Src/compat.c b/Src/compat.c
index 8ab335aa1..74e426fba 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -496,7 +496,7 @@ zgetdir(struct dirsav *d)
  */
 
 /**/
-char *
+mod_export char *
 zgetcwd(void)
 {
     char *ret = zgetdir(NULL);
diff --git a/Src/utils.c b/Src/utils.c
index f5667f389..f9c2d4a2b 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1023,7 +1023,7 @@ xsymlinks(char *s, int full)
  */
 
 /**/
-char *
+mod_export char *
 xsymlink(char *s, int heap)
 {
     if (*s != '/')


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

end of thread, other threads:[~2020-02-24 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200224103625eucas1p1837b5b111e07832e3a85533107728289@eucas1p1.samsung.com>
2020-02-24 10:35 ` Unable to compile zsh on AIX Arnon Yaari
2020-02-24 10:52   ` Peter Stephenson

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