zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-workers@zsh.org>, Arnon Yaari <arnony@infinidat.com>
Subject: Re: Unable to compile zsh on AIX
Date: Mon, 24 Feb 2020 10:52:02 +0000	[thread overview]
Message-ID: <1582541522.4501.1.camel@samsung.com> (raw)
In-Reply-To: <9783161F-B87A-4732-B8ED-7A3633758546@infinidat.com>

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 != '/')


      reply	other threads:[~2020-02-24 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200224103625eucas1p1837b5b111e07832e3a85533107728289@eucas1p1.samsung.com>
2020-02-24 10:35 ` Arnon Yaari
2020-02-24 10:52   ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1582541522.4501.1.camel@samsung.com \
    --to=p.stephenson@samsung.com \
    --cc=arnony@infinidat.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).