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

Error when trying to install on gentoo because of ldconfig invocation #29

Closed
simonvanderveldt opened this issue May 25, 2017 · 3 comments

Comments

@simonvanderveldt
Copy link
Contributor

simonvanderveldt commented May 25, 2017

Hi Mark, first of all it was very nice meeting you @ LAC!
As I already mentioned there thanks for this tool. I'm working on packaging it for gentoo and ran into the following issue when building it:

...
Install the project...
-- Install configuration: "Gentoo"
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/lib/libstoat.so
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/bin/stoat
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/bin/stoat-compile
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/bin/stoat-compile++
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/callgraph.rb
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/deductions.rb
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/graph.rb
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/load-callgraph.rb
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/whitelist.txt
-- Installing: /var/tmp/portage/dev-util/stoat-9999/image/usr/share/stoat/blacklist.txt
 * ACCESS DENIED:  open_wr:      /etc/ld.so.cache~
CMake Warning at /var/tmp/portage/dev-util/stoat-9999/work/stoat-9999/cmake/InstallScript.cmake:8 (message):
  Warning: ldconfig 1

Call Stack (most recent call first):
  cmake_install.cmake:76 (include)


CMake Warning at /var/tmp/portage/dev-util/stoat-9999/work/stoat-9999/cmake/InstallScript.cmake:9 (message):
           You may need to manually specify --llvm-passes
Call Stack (most recent call first):
  cmake_install.cmake:76 (include)


>>> Completed installing stoat-9999 into /var/tmp/portage/dev-util/stoat-9999/image/

 * Final size of build directory: 971 KiB
 * Final size of installed tree: 10 KiB

 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-7282.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /etc/ld.so.cache~
A: /etc/ld.so.cache~
R: /etc/ld.so.cache~
C: ldconfig 
 * --------------------------------------------------------------------------------

The error you're seeing is from the gentoo sandbox which is there to guarantee a clean build environment and ensure the build doesn't do anything with files it shouldn't have access to. In this case ldconfig is trying to write to /etc/ld.so.cache, which is not allowed in the sandbox.

This is caused by this script https://github.com/fundamental/stoat/blob/master/cmake/InstallScript.cmake

Was there any particular reason you added this? Normally the package manager would run ldconfig if new libraries are installed, it's not something the build system normally does.

@fundamental
Copy link
Owner

I use slackware on my systems without much of a sandbox. While using this setup I tend to occasionally forget to manually run 'ldconfig' after running 'make install'. It should be easy enough to disable the ldconfig call if the cache isn't writeable though (e.g. some checking technique like https://stackoverflow.com/questions/32436246/check-permissions-of-the-destination-directory-before-installing )

@simonvanderveldt
Copy link
Contributor Author

@fundamental so the goal is to automatically run ldconfig? I'll see if I can whip up a fix.

Do you use makepkg? From what I remember from my brief period with slackware the doinst.sh script should take care of running ldconfig.
See https://www.slackwiki.com/Doinst.sh

@fundamental
Copy link
Owner

fundamental commented May 27, 2017 via email

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

No branches or pull requests

2 participants