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

Unable to build vim 8.1 on Ubuntu on Windows Subsystem for Linux #2928

Closed
christianfosli opened this issue May 18, 2018 · 2 comments
Closed

Comments

@christianfosli
Copy link

christianfosli commented May 18, 2018

Hi,

I'm unable to build vim 8.1.0001 on Ubuntu 18.04 on Windows Subsystem for Linux.
Not really sure the problem is with Vim or gcc, but I have tried reinstalling gcc with same results.
Any feedback would be very helpful.

Below are the errors I get when I try to do

sudo make VIMRUNTIMEDIR=/usr/local/share/vim/vim81

I get the same errors trying to run

sudo make install

:

/usr/bin/x86_64-linux-gnu-ld: objects/term_encoding.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_keyboard.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_mouse.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_parser.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_pen.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_screen.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_state.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: objects/term_vterm.o: relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
link.sh: Linking failed
@randall-fulton
Copy link

randall-fulton commented May 18, 2018

Looks like the error message is suggesting compiling with the -fPIC option.

Have you tried adding that to CFLAGS? The Unix section of src/INSTALL covers this in more detail, but the following should do the trick.

env CFLAGS=-fPIC make install

Unfortunately, I have been unable to reproduce this issue on a fresh install of 18.04 WSL. So I can't say for sure this will resolve your issue.

@christianfosli
Copy link
Author

Thanks @randall-fulton for the suggestion.

Unfortunately I still got the same error.

I figured it must be something wrong with my Ubuntu set up, so I uninstalled that and reinstalled a fresh Ubuntu 18.04 from the windows store. I was then able to build Vim with the defaults.

Thanks again (-:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants