Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fish 3.4.0 not building on OpenIndiana #8780

Closed
balrog-nona opened this issue Mar 13, 2022 · 1 comment
Closed

fish 3.4.0 not building on OpenIndiana #8780

balrog-nona opened this issue Mar 13, 2022 · 1 comment
Labels
bug Something that's not working as intended
Milestone

Comments

@balrog-nona
Copy link

Hi, I'm trying to build the latest fish version (3.4.0) on OpenIndiana. When runnnig gmake build I get this error:

In file included from /export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/../common.h:23:0,
                 from /export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/../io.h:15,
                 from /export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/set_color.h:8,
                 from /export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/set_color.cpp:4:
/export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/../fallback.h:71:15: error: conflicting declaration of 'char* tparm_solaris_kludge(char*, long int, long int, long int, long int, long int, long int, long int, long int, long int)' with 'C' linkage
 #define tparm tparm_solaris_kludge
               ^
/export/home/nona/oi-userland/components/shell/fish/fish-3.4.0/src/builtins/../fallback.h:72:7: note: previous declaration with 'C++' linkage
 char *tparm_solaris_kludge(char *str, long p1 = 0, long p2 = 0, long p3 = 0, long p4 = 0,
       ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/fishlib.dir/build.make:1284: CMakeFiles/fishlib.dir/src/builtins/set_color.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/export/home/nona/oi-userland/components/shell/fish/build/amd64'
make[2]: *** [CMakeFiles/Makefile2:610: CMakeFiles/fishlib.dir/all] Error 2
make[2]: Leaving directory '/export/home/nona/oi-userland/components/shell/fish/build/amd64'
make[1]: *** [Makefile:136: all] Error 2
make[1]: Leaving directory '/export/home/nona/oi-userland/components/shell/fish/build/amd64'
gmake: *** [/export/home/nona/oi-userland/make-rules/cmake.mk:179: /export/home/nona/oi-userland/components/shell/fish/build/amd64/.built] Error 2

I see that char *tparm_solaris_kludge isn't something new in the latest release and I believe that it worked in the previous version (3.3.1) because it was successfully built for OpenIndiana.
uname -a gives me: SunOS openindiana 5.11 illumos-bf41048984 i86pc i386 i86pc
echo $TERM gives me: xterm-256color

@faho
Copy link
Member

faho commented Mar 13, 2022

What happens here is that:

  1. Solaris' tparm is awkward and only takes a fixed number of arguments
  2. We try to hack around it by defining a C++-function that takes a large number of arguments with defaults and then calls the system tparm
  3. We redefine tparm to call that function
  4. Something changed so that we redefine tparm too much or too little, and so the compiler sees two definitions of that function
  5. Essentially nobody runs fish on OpenIndiana, especially not prerelease code
  6. BOOM

@faho faho added the bug Something that's not working as intended label Mar 13, 2022
@faho faho added this to the fish-future milestone Mar 13, 2022
@faho faho closed this as completed in a76ed99 Mar 14, 2022
@faho faho modified the milestones: fish-future, fish 3.4.1 Mar 14, 2022
faho added a commit that referenced this issue Mar 14, 2022
This just defines a constant to whichever tparm implementation we're
using (either the actual, working one the system provides, or our
kludge to paper over Solaris' inadequacies).

This means that there won't be so much ping-ponging of what "tparm"
stands for. "tparm" is the system's function. Only we don't use it,
just like we don't use wcstod directly.

Fixes #8780

(cherry picked from commit a76ed99)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants