Hi,
I'm unable to build vim 8.1.0001 on Ubuntu 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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
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
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 (-:
Closed #2928.