[vim/vim] Unable to build vim 8.1 on Ubuntu on Windows Subsystem for Linux (#2928)

16 views
Skip to first unread message

Christian Fosli

unread,
May 18, 2018, 4:13:17 PM5/18/18
to vim/vim, Subscribed

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

Randall Fulton

unread,
May 18, 2018, 7:51:41 PM5/18/18
to vim/vim, Subscribed

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

Christian Fosli

unread,
May 19, 2018, 10:45:00 AM5/19/18
to vim/vim, Subscribed

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 (-:

Christian Fosli

unread,
May 19, 2018, 10:45:35 AM5/19/18
to vim/vim, Subscribed

Closed #2928.

Reply all
Reply to author
Forward
0 new messages