[vim/vim] Building vim on Ubuntu (Issue #9432)

121 views
Skip to first unread message

kaddkaka

unread,
Dec 30, 2021, 5:45:33 AM12/30/21
to vim/vim, Subscribed

Steps to reproduce

I tried to https://www.vim.org/git.php so I performed these commands:

git clone https://github.com/vim/vim.git
cd vim
cd src
make
su rootuser
sudo make install

But I get this permission denied error at the last step: mv: cannot move 'tags' to 'tags.dist': Permission denied.

Not sure what I'm doing wrong or what tags.dist is referring to.

Expected behaviour

No error during build

Version of Vim

8.2.3941

Environment

GNU bash, version 4.4.20(1)-release on Ubuntu machine:

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

Logs and stack traces

Full output of `sudo make install` command:

$ sudo make install
if test -f /usr/local/bin/vim; then \
  mv -f /usr/local/bin/vim /usr/local/bin/vim.rm; \
  rm -f /usr/local/bin/vim.rm; \
fi
cp vim /usr/local/bin
strip /usr/local/bin/vim
chmod 755 /usr/local/bin/vim
cp vimtutor /usr/local/bin/vimtutor
chmod 755 /usr/local/bin/vimtutor
/bin/sh ./installman.sh install /usr/local/share/man/man1 "" /usr/local/share/vim /usr/local/share/vim/vim82 /usr/local/share/vim ../runtime/doc 644 vim vimdiff evim
installing /usr/local/share/man/man1/vim.1
installing /usr/local/share/man/man1/vimtutor.1
installing /usr/local/share/man/man1/vimdiff.1
installing /usr/local/share/man/man1/evim.1
cd ../runtime/doc; if test -z "" -a -f tags; then \
        mv -f tags tags.dist; fi
mv: cannot move 'tags' to 'tags.dist': Permission denied
Makefile:2431: recipe for target 'installrtbase' failed
make: *** [installrtbase] Error 1


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432@github.com>

lacygoill

unread,
Dec 30, 2021, 6:16:57 AM12/30/21
to vim/vim, Subscribed

What happens if you run this shell command:

$ mv -f tags tags.dist

While the current directory is runtime/doc/.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1002984474@github.com>

lacygoill

unread,
Dec 30, 2021, 6:20:21 AM12/30/21
to vim/vim, Subscribed

I can't make this command work:

$ su rootuser
No passwd entry for user 'rootuser'

And it should not be necessary considering you use sudo(8) in the next sudo make install command.

Try again without su rootuser.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1002985679@github.com>

Christian Brabandt

unread,
Dec 30, 2021, 8:11:37 AM12/30/21
to vim/vim, Subscribed

su rootuser

This command is not mentioned on https://www.vim.org/git.php and is also not required.

sudo make install

Not sure why this fails. mv -f tags tags.dist Please check the output of ls -l tags in your cloned runtime/doc folder.

Also, I would recommend to compile using ./configure <additional_args> --prefix=/home/user/local so that you do not need to run sudo make install but just make install and it will the be installed in your local /home/usr/local directory.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003022887@github.com>

kaddkaka

unread,
Dec 30, 2021, 8:22:30 AM12/30/21
to vim/vim, Subscribed

As my own user kaddkaka, I can perform mv -f tags tags.dist, but this user does not have super user privileges, thats why I change to a user that does have super user privileges, in this case rootuser.

As rootuser, mv -f tags tags.dist gives permission denied.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003026895@github.com>

kaddkaka

unread,
Dec 30, 2021, 8:24:32 AM12/30/21
to vim/vim, Subscribed

I cloned the repo as user kaddkaka and then switched to rootuser when building to allow for the sudo command. But perhaps this is not OK. I'm guessing I have to clone the repo with the same user with SUDO privileges. Thanks


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003027738@github.com>

Christian Brabandt

unread,
Dec 30, 2021, 8:31:20 AM12/30/21
to vim/vim, Subscribed

As rootuser, mv -f tags tags.dist gives permission denied.

That doesn't make sense. The root user can always write in any directory (perhaps with the exception of apparmor or selinux). Please show the output of ls -la in the runtime folder.

I'm guessing I have to clone the repo with the same user with SUDO privileges.

no, you shouldn't neither build nor clone as superuser. Just for installation this is needed to be able to write into system protected folders. But for a single user account, I would even then recommend to install into your home directory.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003030316@github.com>

kaddkaka

unread,
Dec 30, 2021, 8:32:51 AM12/30/21
to vim/vim, Subscribed

> ls -la tags*
-rw-r--r-- 1 kaddkaka users 362485 Dec 28 12:17 tags.dist
-rw-r--r-- 1 kaddkaka users  40278 Dec 28 12:17 tagsrch.txt


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003030904@github.com>

Bram Moolenaar

unread,
Dec 30, 2021, 8:38:55 AM12/30/21
to vim/vim, Subscribed

I assume that "rootuser" is not root, but a user that has privileges to become root and use "sudo".
Yes, you need to build as "rootuser", otherwise there are generated files owned by "kaddkaka" that can't be changed by "rootuser".


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003033140@github.com>

Bram Moolenaar

unread,
Dec 30, 2021, 8:38:58 AM12/30/21
to vim/vim, Subscribed

Closed #9432.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/9432/issue_event/5828006761@github.com>

kaddkaka

unread,
Dec 30, 2021, 8:41:28 AM12/30/21
to vim/vim, Subscribed

I assume that "rootuser" is not root, but a user that has privileges to become root and use "sudo". Yes, you need to build as "rootuser", otherwise there are generated files owned by "kaddkaka" that can't be changed by "rootuser".

Yes that's correct. If I git clone as kaddkaka and then switch to user rootuser and do

cd src
sudo make

It fails already on the sudo make step:

vim/src$ sudo make
Makefile:304: auto/config.mk: No such file or directory
rm -f auto/config.cache
if test "X" != "Xclean" \
        -a "X" != "Xdistclean" \
        -a "X" != "Xautoconf" \
        -a "X" != "Xreconfig"; then \
    GUI_INC_LOC="" GUI_LIB_LOC="" \
        CC="" CPPFLAGS="" CFLAGS="" \
        LDFLAGS=""  srcdir="." \
        ./configure    \
           \
           \
           \
           \
          \
          \
           \
          \
            \
           \
          \
          \
          ; \
fi
auto/configure: line 2288: auto/config.log: Permission denied
auto/configure: line 2298: auto/config.log: Permission denied
Makefile:2080: recipe for target 'auto/config.mk' failed
make: *** [auto/config.mk] Error 1


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003033923@github.com>

Gary Johnson

unread,
Dec 30, 2021, 11:31:51 AM12/30/21
to reply+ACY5DGGHKS6BMXQCAX...@reply.github.com, vim...@googlegroups.com
On 2021-12-30, kaddkaka wrote:
> I assume that "rootuser" is not root, but a user that has privileges to
> become root and use "sudo". Yes, you need to build as "rootuser", otherwise
> there are generated files owned by "kaddkaka" that can't be changed by
> "rootuser".
>
> Yes that's correct. If I git clone as kaddkaka and then switch to user rootuser
> and do
>
> cd src
> sudo make
>
> It fails already on the sudo make step:

Don't make it more difficult than it needs to be. You don't need to
run make as anyone special. Just pick a user and as that user do
the cloning so that user owns all the files, then as that same user
do:

cd vim
cd src # This is optional. I never do this.
make
sudo make install

That should install into /usr/local/bin and /usr/local/share/vim
just fine.

Regards,
Gary

vim-dev ML

unread,
Dec 30, 2021, 11:32:11 AM12/30/21
to vim/vim, vim-dev ML, Your activity


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9432/1003099431@github.com>

kaddkaka

unread,
Dec 30, 2021, 12:01:09 PM12/30/21
to vim/vim, vim-dev ML, Mention

@vim-ml As per Bram's reply, I need to do make as a user that has privileges to- use sudo for the sudo make install step.

I'm sorry about the sudo make, I edited my post to make which is the command that I did run.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you were mentioned.Message ID: <vim/vim/issues/9432/1003109389@github.com>

Reply all
Reply to author
Forward
0 new messages