Adonay Felipe Nogueira skribis:
> Note: Sorry friends, I pressed the wrong reply button (private reply). Now,
> I'm
> replyng to the bugs mailing list.
>
> I'm running Guix on a foreign distribution, and $PYTHONPATH is
> unset. The foreign distribution in question is Trisquel 7 (which is
> based on the Ubuntu 14.04).
The interesting thing is that it opens the right libpython:
open("/gnu/store/7q9nn76r76hnxbfxyv6asishx58jc420-python-2.7.12/lib/libpython2.7.so.1.0",
O_RDONLY|O_CLOEXEC) = 3
but then it does this:
--8<---cut here---start->8---
stat64("/home/adfeno/.guix-profile/bin/python", 0xbf868d1c) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/sbin/python", 0xbf868d1c) = -1 ENOENT (No such file or
directory)
stat64("/usr/local/bin/python", 0xbf868d1c) = -1 ENOENT (No such file or
directory)
stat64("/usr/sbin/python", 0xbf868d1c) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/python", {st_mode=S_IFREG|0755, st_size=3156448, ...}) = 0
readlink("/usr/bin/python", "python2.7", 4096) = 9
readlink("/usr/bin/python2.7", 0xbf868d1c, 4096) = -1 EINVAL (Invalid argument)
stat64("/usr/bin/Modules/Setup", 0xbf868d1c) = -1 ENOENT (No such file or
directory)
stat64("/usr/bin/lib/python2.7/os.py", 0xbf868d1c) = -1 ENOENT (No such file or
directory)
stat64("/usr/bin/lib/python2.7/os.pyc", 0xbf868d1c) = -1 ENOENT (No such file
or directory)
stat64("/usr/lib/python2.7/os.py", {st_mode=S_IFREG|0644, st_size=25769, ...})
= 0
stat64("/usr/bin/pybuilddir.txt", 0xbf868d1c) = -1 ENOENT (No such file or
directory)
stat64("/usr/bin/lib/python2.7/lib-dynload", 0xbf868d1c) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/python2.7/lib-dynload", {st_mode=S_IFDIR|0755, st_size=12288,
...}) = 0
[...]
stat64("/usr/lib/python27.zip", 0xbf867a28) = -1 ENOENT (No such file or
directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=36864, ...}) = 0
stat64("/usr/lib/python27.zip", 0xbf8689e0) = -1 ENOENT (No such file or
directory)
stat64("/usr/lib/python2.7/", {st_mode=S_IFDIR|0755, st_size=28672, ...}) = 0
stat64("/usr/lib/python2.7/", {st_mode=S_IFDIR|0755, st_size=28672, ...}) = 0
stat64("/usr/lib/python2.7/site", 0xbf868b40) = -1 ENOENT (No such file or
directory)
open("/usr/lib/python2.7/site.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such
file or directory)
open("/usr/lib/python2.7/sitemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/usr/lib/python2.7/site.py", O_RDONLY|O_LARGEFILE) = 16
fstat64(16, {st_mode=S_IFREG|0644, st_size=20388, ...}) = 0
open("/usr/lib/python2.7/site.pyc", O_RDONLY|O_LARGEFILE) = 17
fstat64(17, {st_mode=S_IFREG|0644, st_size=19727, ...}) = 0
read(17, "\3\363\r\ncZ\210Uc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0sp\1\0\0d\0"...,
4096) = 4096
fstat64(17, {st_mode=S_IFREG|0644, st_size=19727, ...}) = 0
read(17, "\0(\0\0\0\0s\32\0\0\0/usr/lib/python2.7/si"..., 12288) = 12288
read(17, "\0\0aliasmbcs\333\1\0\0s\24\0\0\0\0\4\17\1\30\1\20\1\17\1\3\1"...,
4096) = 3343
read(17, "", 4096) = 0
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xaf304000
close(17) = 0
stat64("/usr/lib/python2.7/os", 0xbf868750) = -1 ENOENT (No such file or
directory)
open("/usr/lib/python2.7/os.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such
file or directory)
open("/usr/lib/python2.7/osmodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/usr/lib/python2.7/os.py", O_RDONLY|O_LARGEFILE) = 17
--8<---cut here---end--->8---
… and from there, chaos ensues.
I’m not sure where those /usr/lib file names come from though.
Note that Scribus hard-codes a whole bunch of program file names (not
that of ‘python’, though), which may lead to problems down the path, at
least on GuixSD:
--8<---cut here---start->8---
$ find -name \*.cpp |xargs grep --color /usr/
./scribus/ui/prefs_paths.cpp: profileDirLineEdit->setToolTip( "" + tr(
"Default ICC profiles directory. This cannot be changed with a document open.
By default, Scribus will look in the System Directories under Mac OSX and
Windows. On Linux and Unix, Scribus will search $home/.color/icc,
$home/.local/share/color/icc, /usr/share/color/icc and
/usr/local/share/color/icc" ) + "" );
./scribus/ui/prefs_externaltools.cpp:
<<"/usr/local/texlive/2009/bin/universal-darwin/pdflatex"
./scribus/ui/prefs_externaltools.cpp:
<<"/usr/local/texlive/2008/bin/universal-darwin/pdflatex";
./scribus/ui/prefs_externaltools.cpp: pdflatexPaths
<<"/usr/local/bin/pdflatex"
./scribus/ui/prefs_externaltools.cpp:
<<"/usr/bin/pdflatex";
./scribus/scpaths.cpp: QString