Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

builtins.c does not compile under latest cygwin


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

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
builtin.o:builtin.c:(.text+0xa98c): relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `cygwin_conv_to_posix_path'
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'

​ 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);

    cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, dest, buf,

​   dest = buf;​

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

~ Ed

Messages sorted by: Reverse Date, Date, Thread, Author