zsh-workers
 help / color / mirror / code / Atom feed
From: "Edgar Sánchez Grajeda" <edgarsanchezg@gmail.com>
To: zsh-workers@zsh.org
Subject: builtins.c does not compile under latest cygwin
Date: Fri, 2 Aug 2013 14:14:26 -0500	[thread overview]
Message-ID: <CAFX4wC0q-BgWtY+RW3z7Nnz0arGgTCc9hbKRJyms16FamsZ6TQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

Hello,

When installing Cygwin I tried installing zsh from the source, and the
builtin.c module
​was not compiling.

Here
​​
the output from make:

rm -f libzsh-5.0.2.dll
gcc  -s -shared -Wl,--export-all-symbols -o libzsh-5.0.2.dll  `cat
stamp-modobjs` -ldl -lncursesw -lrt -lm  -lc
builtin.o:builtin.c:(.text+0xa98c): undefined reference to
`cygwin_conv_to_posix_path'
builtin.o:builtin.c:(.text+0xa98c): relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `cygwin_conv_to_posix_path'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld:
builtin.o: bad reloc address 0x8 in section `.data'
collect2: error: ld returned 1 exit status
Makefile:230: recipe for target `libzsh-5.0.2.dll' failed
make[1]: *** [libzsh-5.0.2.dll] Error 1
make[1]: Leaving directory `/zsh-5.0.2/Src'

I
​ looked up the missing function, and cygwin_conv_to_posix_path() function
was deprecated and replaced with cygwin_conv_path().

In builtins.c:cd_do_chdir()​

​I fixed it with:

#ifndef _SYS_CYGWIN_H
    void cygwin_conv_path(cygwin_conv_path_t what, const void * from, void
* to, size_t size);
#endif

    cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, dest, buf,
PATH_MAX);​


​   dest = buf;​


​There's still some comptests failing when running make check, but at least
now it's compiling without errors​.

--
~ Ed
​gar​

             reply	other threads:[~2013-08-02 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 19:14 Edgar Sánchez Grajeda [this message]
2013-08-02 20:00 ` Peter Stephenson

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=CAFX4wC0q-BgWtY+RW3z7Nnz0arGgTCc9hbKRJyms16FamsZ6TQ@mail.gmail.com \
    --to=edgarsanchezg@gmail.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).