Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619498 - openbabel-python-2.4.1 tries to install files outside of prefix
Summary: openbabel-python-2.4.1 tries to install files outside of prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-24 05:24 UTC by nanikata15
Modified: 2017-06-20 12:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=sci-chemistry/openbabel-python-2.4.1::gentoo' (emerge-info.log,5.52 KB, text/x-log)
2017-05-24 05:32 UTC, nanikata15
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nanikata15 2017-05-24 05:24:24 UTC
When emerging openbabel-python in my gentoo-rap prefix,
I get the following error:

>>> Completed installing openbabel-python-2.4.1 into /home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/image/

 * Final size of build directory: 117288 KiB
 * Final size of installed tree: 8180 KiB

 * QA Notice: the following files are outside of the prefix:
 * /lib64
 * /lib64/python2.7
 * /lib64/python2.7/site-packages
 * /lib64/python2.7/site-packages/_openbabel.so
 * /lib64/python2.7/site-packages/openbabel.py
 * /lib64/python2.7/site-packages/pybel.py
 * /lib64/python3.4
 * /lib64/python3.4/site-packages
 * /lib64/python3.4/site-packages/_openbabel.so
 * /lib64/python3.4/site-packages/openbabel.py
 * /lib64/python3.4/site-packages/pybel.py
 * ERROR: sci-chemistry/openbabel-python-2.4.1::gentoo failed:
 *   Aborting due to QA concerns: there are files installed outside the prefix
 * 
 * Call stack:
 *   misc-functions.sh, line 603:  Called install_qa_check
 *   misc-functions.sh, line 217:  Called source 'install_symlink_html_docs'
 *            05prefix, line 114:  Called install_qa_check_prefix
 *            05prefix, line  27:  Called die
 * The specific snippet of code:
 *   			die "Aborting due to QA concerns: there are files installed outside the prefix"
 * 
 * If you need support, post the output of `emerge --info '=sci-chemistry/openbabel-python-2.4.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-chemistry/openbabel-python-2.4.1::gentoo'`.
 * The complete build log is located at '/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/temp/build.log'.
 * The ebuild environment file is located at '/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/temp/environment'.
 * Working directory: '/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/image/home/nanikata/gentoorap'
 * S: '/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/work/openbabel-2.4.1'



I was able to emerge this package without problem
when I changed "${D}" to "${ED}" in -DLIB_INSTALL_DIR and -DCMAKE_INSTALL_PREFIX arguments to cmake inside the ebuild,
but I don't have enough knowledge about cmake to say if it is the correct solution.

I did not have this problem with openbabel-python-2.3.2,
so maybe this is caused by the new -DCMAKE_INSTALL_PREFIX parameter
in openbabel-python-2.4.1?
Comment 1 nanikata15 2017-05-24 05:32:06 UTC
Created attachment 474000 [details]
emerge --info '=sci-chemistry/openbabel-python-2.4.1::gentoo'
Comment 2 Fabian Groffen gentoo-dev 2017-05-24 06:26:01 UTC
Have you tried this without the install_prefix changed, e.g. like this:?

--- a/sci-chemistry/openbabel-python/openbabel-python-2.4.1.ebuild
+++ b/sci-chemistry/openbabel-python/openbabel-python-2.4.1.ebuild
@@ -54,11 +54,11 @@ src_configure() {
                        -DBINDINGS_ONLY=ON
                        -DBABEL_SYSTEM_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libopenbabel.so"
                        -DOB_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}"
-                       -DLIB_INSTALL_DIR="${D}$(python_get_sitedir)"
+                       -DLIB_INSTALL_DIR="${ED}$(python_get_sitedir)"
                        -DPYTHON_BINDINGS=ON
                        -DPYTHON_EXECUTABLE=${PYTHON}
-                       -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-                       -DPYTHON_INCLUDE_PATH="$(python_get_includedir)"
+                       -DPYTHON_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)"
+                       -DPYTHON_INCLUDE_PATH="${EPREFIX}$(python_get_includedir)"
                        -DPYTHON_LIBRARY="$(python_get_library_path)"
                        -DENABLE_TESTS=ON
                        -DCMAKE_INSTALL_PREFIX="${D}"

Could you run emerge with above patch and report the collisions please?
Comment 3 nanikata15 2017-05-24 07:54:08 UTC
It did not compile with the additional "${EPREFIX}" in DPYTHON_INCLUDE_DIR and DPYTHON_INCLUDE_PATH, because it couldn't find Python.h.
Apparently prefix already gets appended in python_get_includedir,
so you get double-prefixed paths.

I re-emerged the package with only -DLIB_INSTALL_DIR="${ED}$(python_get_sitedir)" changed, and got the same error message as in the initial report.

I compared build.logs of both the vanilla ebuild and the one with -DLIB_INSTALL_DIR="${ED}$(python_get_sitedir)", and they appeared identical, except the outputted LIB_INSTALL_DIR in the latter ebuild had a too many prefixes in the path:
-DLIB_INSTALL_DIR=/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/image//home/nanikata/gentoorap/usr/lib64/python3.4/site-packages
-DLIB_INSTALL_DIR=/home/nanikata/gentoorap/var/tmp/portage/sci-chemistry/openbabel-python-2.4.1/image/home/nanikata/gentoorap//home/nanikata/gentoorap/usr/lib64/python3.4/site-packages

Is LIB_INSTALL_DIR getting ignored?
Comment 4 Fabian Groffen gentoo-dev 2017-05-24 16:18:33 UTC
Thanks for testing and reporting.  This feels like the options aren't respected very well indeed.
Comment 5 Fabian Groffen gentoo-dev 2017-06-20 12:44:38 UTC
thanks, pushed.