{"action":"created","issue":{"url":"https://api.github.com/repos/TGAC/KAT/issues/94","repository_url":"https://api.github.com/repos/TGAC/KAT","labels_url":"https://api.github.com/repos/TGAC/KAT/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/TGAC/KAT/issues/94/comments","events_url":"https://api.github.com/repos/TGAC/KAT/issues/94/events","html_url":"https://github.com/TGAC/KAT/issues/94","id":316572680,"number":94,"title":"scripts/setup.py does not respect DESTDIR variable when installing file (to a temporary location)","user":{"login":"mmokrejs","id":3297852,"avatar_url":"https://avatars1.githubusercontent.com/u/3297852?v=4","gravatar_id":"","url":"https://api.github.com/users/mmokrejs","html_url":"https://github.com/mmokrejs","followers_url":"https://api.github.com/users/mmokrejs/followers","following_url":"https://api.github.com/users/mmokrejs/following{/other_user}","gists_url":"https://api.github.com/users/mmokrejs/gists{/gist_id}","starred_url":"https://api.github.com/users/mmokrejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmokrejs/subscriptions","organizations_url":"https://api.github.com/users/mmokrejs/orgs","repos_url":"https://api.github.com/users/mmokrejs/repos","events_url":"https://api.github.com/users/mmokrejs/events{/privacy}","received_events_url":"https://api.github.com/users/mmokrejs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":65,"created_at":"2018-04-22T11:51:31Z","updated_at":"2018-04-28T17:43:26Z","closed_at":null,"author_association":"NONE","body":"Unfortunately the scripts try to fidlle with the site-wide directories (escaping the building sandbox subdirectories).This was denied by the build system:\r\n\r\n```\r\nmake[3]: Entering directory '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999/scripts'\r\nexport PYTHONPATH=/usr/lib/python3/site-packages && \\\r\nmkdir -p /usr/lib/python3/site-packages/ && \\\r\npython3 setup.py install --prefix=/usr --record install_files.txt\r\n * ACCESS DENIED:  mkdir:        /usr/lib64/python3\r\nmkdir: cannot create directory '/usr/lib/python3': Permission denied\r\nmake[3]: *** [Makefile:490: install-exec-hook] Error 1\r\nmake[3]: Leaving directory '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999/scripts'\r\nmake[2]: *** [Makefile:432: install-exec-am] Error 2\r\nmake[2]: Leaving directory '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999/scripts'\r\nmake[1]: *** [Makefile:380: install-am] Error 2\r\nmake[1]: Leaving directory '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999/scripts'\r\nmake: *** [Makefile:470: install-recursive] Error 1\r\n * ERROR: sci-biology/kat-9999::science failed (install phase):\r\n *   emake failed\r\n * \r\n * If you need support, post the output of `emerge --info '=sci-biology/kat-9999::science'`,\r\n * the complete build log and the output of `emerge -pqv '=sci-biology/kat-9999::science'`.\r\n * The complete build log is located at '/scratch/var/tmp/portage/sci-biology/kat-9999/temp/build.log'.\r\n * The ebuild environment file is located at '/scratch/var/tmp/portage/sci-biology/kat-9999/temp/environment'.\r\n * Working directory: '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999'\r\n * S: '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999'\r\n * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------\r\n * LOG FILE: \"/var/log/sandbox/sandbox-27386.log\"\r\n * \r\nVERSION 1.0\r\nFORMAT: F - Function called\r\nFORMAT: S - Access Status\r\nFORMAT: P - Path as passed to function\r\nFORMAT: A - Absolute Path (not canonical)\r\nFORMAT: R - Canonical Path\r\nFORMAT: C - Command Line\r\n\r\nF: mkdir\r\nS: deny\r\nP: python3\r\nA: /usr/lib64/python3\r\nR: /usr/lib64/python3\r\nC: mkdir -p /usr/lib/python3 site-packages/ \r\n * --------------------------------------------------------------------------------\r\n```\r\n\r\nHmm, the command should have been `python3 setup.py install --prefix=\"${ED}\"/usr --record install_files.txt`. Somehow the setup.py does not respect `DESTDIR` variable like other python tools. The `DESTDIR` should have expanded into `\"${ED}\"/usr`.\r\n\r\nA bit above in the log one can see other parts of KAT building respected the DESTDIR properly:\r\n\r\n```\r\nmake[2]: Entering directory '/scratch/var/tmp/portage/sci-biology/kat-9999/work/kat-9999/src'\r\n /bin/mkdir -p '/scratch/var/tmp/portage/sci-biology/kat-9999/image//usr/bin'\r\n```\r\n\r\n[build.log.txt](https://github.com/TGAC/KAT/files/1935493/build.log.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/TGAC/KAT/issues/comments/385193524","html_url":"https://github.com/TGAC/KAT/issues/94#issuecomment-385193524","issue_url":"https://api.github.com/repos/TGAC/KAT/issues/94","id":385193524,"user":{"login":"mmokrejs","id":3297852,"avatar_url":"https://avatars1.githubusercontent.com/u/3297852?v=4","gravatar_id":"","url":"https://api.github.com/users/mmokrejs","html_url":"https://github.com/mmokrejs","followers_url":"https://api.github.com/users/mmokrejs/followers","following_url":"https://api.github.com/users/mmokrejs/following{/other_user}","gists_url":"https://api.github.com/users/mmokrejs/gists{/gist_id}","starred_url":"https://api.github.com/users/mmokrejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmokrejs/subscriptions","organizations_url":"https://api.github.com/users/mmokrejs/orgs","repos_url":"https://api.github.com/users/mmokrejs/repos","events_url":"https://api.github.com/users/mmokrejs/events{/privacy}","received_events_url":"https://api.github.com/users/mmokrejs/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T17:43:26Z","updated_at":"2018-04-28T17:43:26Z","author_association":"NONE","body":"There is one more issue. On a host where \"gentoo\" is installed into /apps/gentoo path (so `/apps/gentoo/{bin,lib,var,usr}` exist) jellyfishin building fails as it tries to fiddle with the host-wide stuff in /usr/include. There must be some change you did.\r\n\r\nThere are some tricks in https://github.com/gentoo/sci/tree/master/sci-biology/jellyfish but I do not see them relevant to the compile step. I do not remember problems or patches with jellyfish-2.1.x nor 2.6.x, see the github tree.\r\n\r\n```\r\nmake[3]: Entering directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999/deps/jellyfish-2.2.0'\r\nMaking all in .\r\nmake[4]: Entering directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999/deps/jellyfish-2.2.0'\r\nx86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -I/usr/include -I. -I./include   -g -O2 -std=c++0x -Wall -Wnon-virtual-dtor -Wno-deprecated-declarations -O2 -pipe -O2 -pipe -march=native -ftree-vectorize -c -o sub_commands/jellyfish.o sub_commands/jellyfish.cc\r\nIn file included from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:75:0,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ext/string_conversions.h:41,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/basic_string.h:6349,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/string:52,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/locale_classes.h:40,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/ios_base.h:41,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ios:42,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ostream:38,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/iostream:39,\r\n                 from sub_commands/jellyfish.cc:18:\r\n/apps/gentoo/usr/include/stdlib.h:183:17: error: missing binary operator before token \"(\"\r\n #if __GLIBC_USE (IEC_60559_BFP_EXT)\r\n                 ^\r\nIn file included from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ext/string_conversions.h:41:0,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/basic_string.h:6349,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/string:52,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/locale_classes.h:40,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/bits/ios_base.h:41,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ios:42,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/ostream:38,\r\n                 from /apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/iostream:39,\r\n                 from sub_commands/jellyfish.cc:18:\r\n/apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:131:11: error: '::at_quick_exit' has not been declared\r\n   using ::at_quick_exit;\r\n           ^~~~~~~~~~~~~\r\n/apps/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7/cstdlib:154:11: error: '::quick_exit' has not been declared\r\n   using ::quick_exit;\r\n           ^~~~~~~~~~\r\nmake[4]: *** [Makefile:1355: sub_commands/jellyfish.o] Error 1\r\nmake[4]: Leaving directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999/deps/jellyfish-2.2.0'\r\nmake[3]: *** [Makefile:1870: all-recursive] Error 1\r\nmake[3]: Leaving directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999/deps/jellyfish-2.2.0'\r\nmake[2]: *** [Makefile:904: all] Error 2\r\nmake[2]: Leaving directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999/deps/jellyfish-2.2.0'\r\nmake[1]: *** [Makefile:480: all-recursive] Error 1\r\nmake[1]: Leaving directory '/apps/gentoo/var/tmp/portage/sci-biology/kat-9999/work/KAT-Release-9999'\r\nmake: *** [Makefile:404: all] Error 2\r\n * ERROR: sci-biology/kat-9999::science failed (compile phase):\r\n *   emake failed\r\n```"}}
{"actor":{"display_login":"mmokrejs"}}