Skip to content

3.0b1 build error on wcwidth in Cygwin #5423

@andrew-schulman

Description

@andrew-schulman

fish-3.0b1
CYGWIN_NT-10.0 LZ77E1AASCHULMA 2.11.2(0.329/5/3) 2018-11-08 14:34 x86_64 Cygwin

With fish-3.0b1.tar.gz and ffab420, cmake; make chokes on wcwidth in fallback.cpp:

[ 56%] Building CXX object CMakeFiles/fishlib.dir/src/fish_version.cpp.o
In file included from /home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/parse_util.h:10:0,
                 from /home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/expand.cpp:45:
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/parse_tree.h:74:5: warning: multi-line comment [-Wcomment]
     ///   echo abc | \
     ^
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/expand.cpp: In function ‘size_t parse_slice(const wchar_t*, wchar_t**, std::vector<long int>&, std::vector<long unsigned int>&, size_t)’:
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/expand.cpp:245:22: warning: suggest parentheses around comparison in operand of ‘!=’ [-Wparentheses]
             if (tmp1 > -1 != tmp > -1) {
                 ~~~~~^~~~
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/fallback.cpp: In function ‘int fish_wcwidth(wchar_t)’:
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/fallback.cpp:294:20: error: ‘wcwidth’ was not declared in this scope
             return wcwidth(wc);
                    ^~~~~~~
/home/ASchulma/dev/cygwin/fish/fish-3.0b1-1.x86_64/src/fish-3.0b1/src/fallback.cpp:294:20: note: suggested alternative: ‘width’
             return wcwidth(wc);
                    ^~~~~~~
                    width
make[2]: *** [CMakeFiles/fishlib.dir/build.make:1122: CMakeFiles/fishlib.dir/src/fallback.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

wcwidth is declared in /usr/include/wchar.h:

int    wcwidth (const wchar_t);

So I guess we need to include wchar.h. But I don't know enough about cmake to know how to do that. Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions