E401 rename __environ so it is compatible with static linking · Issue #2988 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

rename __environ so it is compatible with static linking #2988

@andrewrynhard

Description

@andrewrynhard

Building fish-shell against musl I get the following:

x86_64-musl-linux-g++ -static -L/test/lib64 -I/test/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fno-exceptions -Wall -Wno-sign-compare  -Ipcre2-10.21/src -iquote. -iquote./src/ -DLOCALEDIR=\"/test/share/locale\" -DPREFIX=L\"/test\" -DDATADIR=L\"/test/share\" -DSYSCONFDIR=L\"/test/etc\" -DBINDIR=L\"/test/bin\" -DDOCDIR=L\"/test/share/doc/fish\"  -DFISH_BUILD_VERSION=\"2.3b1\" 
 -rdynamic obj/function.o obj/builtin.o obj/complete.o obj/env.o obj/exec.o obj/expand.o obj/highlight.o obj/history.o obj/kill.o obj/parser.o obj/proc.o obj/reader.o obj/sanity.o obj/tokenizer.o obj/wildcard.o obj/wgetopt.o obj/wutil.o obj/input.o obj/output.o obj/intern.o obj/env_universal_common.o obj/input_common.o obj/event.o obj/signal.o obj/io.o obj/parse_util.o obj/common.o obj/screen.o obj/path.o obj/autoload.o obj/parser_keywords.o obj/iothread.o obj/color.o obj/postfork.o obj/builtin_string.o obj/builtin_test.o obj/parse_tree.o obj/parse_productions.o obj/parse_execution.o obj/pager.o obj/utf8.o obj/fish_version.o obj/wcstringutil.o obj/fish.o -lncursesw  -Lpcre2-10.21/.libs -lpcre2-32 -o fish
/test/bin/../lib/gcc/x86_64-linux-musl/5.3.0/../../../../x86_64-linux-musl/lib/libc.a(__environ.o):(.bss+0x0): multiple definition of `__environ'
obj/common.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [fish] Error 1

I have made the changes in the source to get passed this but before I make a PR, is there a reason fish-shell uses __environ instread of something like __environ_?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedcleanup

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0