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

DESTDIR is not respected #52

Closed
blshkv opened this issue Jul 28, 2017 · 5 comments
Closed

DESTDIR is not respected #52

blshkv opened this issue Jul 28, 2017 · 5 comments

Comments

@blshkv
Copy link
Contributor

blshkv commented Jul 28, 2017

I'm building the tool in a sandbox env is getting the following message:

>>> Install cli-visualizer-1.6 into /var/tmp/portage/media-sound/cli-visualizer-1.6/image/ category media-sound
make -j4 DESTDIR=/var/tmp/portage/media-sound/cli-visualizer-1.6/image/ install 
which: no ccache in (/usr/lib/portage/python2.7/ebuild-helpers/xattr:/usr/lib/portage/python2.7/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-gnu/gcc-bin/6.3.0)
Found libpulse-simple, enabling pulseaudio support
cp /var/tmp/portage/media-sound/cli-visualizer-1.6/work/cli-visualizer-1.6/build/vis /bin/
 * ACCESS DENIED:  open_wr:      /bin/vis
cp: cannot create regular file '/bin/vis': Permission denied
make: *** [Makefile:225: install] Error 1
 * ERROR: media-sound/cli-visualizer-1.6::local-overlay failed (install phase):

Please fix installation by adding a DESTDIR variable:

install: 
  cp $(BUILD_DIR)/$(TARGET) $(DESTDIR)/$(PREFIX)

For more details, see the following doc:
https://www.gnu.org/prep/standards/html_node/DESTDIR.html

@blshkv
Copy link
Contributor Author

blshkv commented Jul 28, 2017

You might also need to make sure that the directory exist because the next error I'm facing is the following:

cp /var/tmp/portage/media-sound/cli-visualizer-1.6/work/cli-visualizer-1.6/build/vis /var/tmp/portage/media-sound/cli-visualizer-1.6/image//bin/
cp: cannot create regular file '/var/tmp/portage/media-sound/cli-visualizer-1.6/image//bin/': Not a direct

@dpayne dpayne closed this as completed Jul 10, 2018
@blshkv
Copy link
Contributor Author

blshkv commented Jul 11, 2018

Did you fix the bug or just ignored my request?

@dpayne
Copy link
Owner

dpayne commented Jul 11, 2018

Sorry I'm not always responsive as I should be on github. To give you more detail, I don't really consider this to be a bug. A user can already specify PREFIX to whatever directory they want so I don't see the need for an additional variable. Additionally I'm not sure I like auto creating install directories. When the directory is ~/bin it might make sense but if it's something like /usr/bin/ that might be bad since the script could be creating the directory with wrong permissions.

@blshkv
Copy link
Contributor Author

blshkv commented Jul 11, 2018

Please read the link which I gave. You are confusing these two variables. In short, PREFIX is set to /usr in many distros (and /usr/local/ by default).

DESTDIR has a totally different meaning. It allows to install the entire tool in that directory, choot into it and run from. Its value is not set (empty) by default, however it is useful for many distro like Gentoo where they install tool in a sandbox environment first.

As for the bin folder, it goes along with DISTDIR. Gentoo compiles all tools in /var/tmp and fails to install all bins by default.

P.S. Disclaimer: I'm a Pentoo developer and wrote an ebuild. That should help other Gentoo users like this guys #83.

@dpayne
Copy link
Owner

dpayne commented Jul 11, 2018

I am pretty unfamiliar with the gentoo build process and with GNU standards. When I originally created the install script, it was mostly meant for people building it themselves. I had assumed, incorrectly, that distros would build with distro specific scripts (e.g. deb package, or PKGBUILD). You appear to be very knowledgable on the subject, especially with Gentoo. If you want to improve the project, please feel free to make a PR.

blshkv added a commit to blshkv/cli-visualizer that referenced this issue Jul 11, 2018
@blshkv blshkv mentioned this issue Jul 11, 2018
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