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

sudo make install - failing with specified parameters #338

Open
heaventwig opened this issue Oct 6, 2023 · 14 comments
Open

sudo make install - failing with specified parameters #338

heaventwig opened this issue Oct 6, 2023 · 14 comments
Labels

Comments

@heaventwig
Copy link
Contributor

I've downloaded, built, tested, and run the software on a half dozen machines now. And now I'm wanting to make them easier to launch for other users of those machines, besides my admin account. Eg at an upcoming LAN party for my local hackerspace.

So I went to the directory in which I had previously built and verified the software, and ran the following series of commands

make mostly-clean
make DESTDIR= PREFIX=/usr/local
make DESTDIR= PREFIX=/usr/local models
make DESTDIR= PREFIX=/usr/local update-assets
sudo make DESTDIR= PREFIX=/usr/local install

And I got this error from the last of those commands:
Install: cannot stat 'share/snis/textures/planetary-ring1.png': No such file or directory
make: *** [Makefile:1374: install] Error 1

(The first time I got this, I thought maybe it was because a file hadn't yet been assembled by an updated make with the new destdir and prefix variables, which is what led me to rerun the whole thing with those variables set for the making of models and updating of assets, but that didn't fix it.)

@smcameron
Copy link
Owner

smcameron commented Oct 6, 2023

Yeah, the "install" and "uninstall" targets don't get much testing, I'm afraid, since I generally just run things from where they're built.

planetary-ring1.png is an old, unused texture, removed by 1cf6518

This commit should fix the problem you encountered: c541b12 Remove planetary-ring1.png from Makefile

It's possible there are more problems waiting behind that one though. Let me know how it goes.

Also good luck with the LAN party, hope it goes well. Not enough people are able to manage to play this game as it's meant to be played.

@smcameron
Copy link
Owner

Oh, BTW, if you do "make update-assets", then you don't need to do "make models", because "update-assets" downloads all the models anyway. That should save you some time.

@heaventwig
Copy link
Contributor Author

Thank you for making those patches so quickly! The LAN party was a success, our first since COVID shut everything down, and we're talking about doing it again in a few months. For this patch, though - there appear to be more of these missing files. Would it make sense to track them all down, or should I just make a practice of installing from the game user account rather than my admin account?

@smcameron
Copy link
Owner

It makes sense to track them down, "make install" is supposed to work. I'll take a look into it tomorrow.

@smcameron
Copy link
Owner

Couple of commits:

  • 7c0ff27 Make snis_launcher work with "make install"
  • 1134816 Make "make install" install snis_update_assets.sh

I noticed "make uninstall" leaves a bit of trash behind.

@smcameron
Copy link
Owner

Modified some documentation around "make install"

41e8d2d Added some notes about "make install"

@smcameron
Copy link
Owner

c09916a Document "install-assets" makefile target

@smcameron
Copy link
Owner

2d206d7 Do not install snis_update_assets.sh via "make install"

make install-assets does that job already.

@smcameron
Copy link
Owner

I think this should be more or less working now. Let me know if it works for you now.

The procedure should be:

make DESTDIR= PREFIX=/usr/local mostly-clean
make DESTDIR= PREFIX=/usr/local
make DESTDIR= PREFIX=/usr/local update-assets
make DESTDIR= PREFIX=/usr/local install
make DESTDIR= PREFIX=/usr/local install-assets

@heaventwig
Copy link
Contributor Author

It might be a few days before I'm back at the Lab to blow out a machine and reinstall everything from scratch, but I'll definitely test this.

@smcameron smcameron added the bug label Oct 15, 2023
@heaventwig
Copy link
Contributor Author

Okay, testing it now I'm finding this error from the "install" step:
touch: cannot touch '//usr/local/.canary-in-the-coal-mine.canary': Permission denied

@heaventwig
Copy link
Contributor Author

sudo fixes it. Then I get a bunch more permission-denied errors when running install-assets.
sudo fixes them too.

@smcameron
Copy link
Owner

Yep, sudo will be needed if installing in someplace like /usr/local, but not needed if installing someplace you already have appropriate permissions to -- in other words, I believe it's working as designed wrt "sudo".

@smcameron
Copy link
Owner

Thanks for testing it out and reporting your results.

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

No branches or pull requests

2 participants