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

typo: call to _set_perm() is misspelled #76

Closed
mwkrentel opened this issue Nov 13, 2017 · 1 comment
Closed

typo: call to _set_perm() is misspelled #76

mwkrentel opened this issue Nov 13, 2017 · 1 comment

Comments

@mwkrentel
Copy link

The function system_install() in xed_mbuild.py uses _set_perm() to set
the permissions of shared libraries to 755 (among other uses). But
when copying shared libraries (with --prefix), the call is misspelled
with 2 underscores on line 1818.

xed_mbuild.py:
1808 # copy the libraries
1809 libs = _gen_lib_names(env)
1810 if len(libs) == 0:
1811 xbc.cdie("No libraries found for install")
1812 for f in libs:
1813 mbuild.msgb("COPY", "{} <- {}".format(lib,f))
1814 if do_system_copy:
1815 mbuild.copy_file(f, lib)
1816 fn = mbuild.join(lib,os.path.basename(f))
1817 if env['shared']:
1818 __set_perm(fn)
1819 else:
1820 mbuild.make_read_only(fn)

As a result, './mfile.py --prefix=DIR --shared' fails with:

[STRIPPING] obj/libxed.so
[STRIP CMD] strip -x obj/libxed.so
[Making install dirs (if they do not exist)]
[MKDIR] /home/krentel/xed/prefix/include/xed
[MKDIR] /home/krentel/xed/prefix/lib
[COPY] /home/krentel/xed/prefix/lib <- obj/libxed.so
[COPY] /home/krentel/xed/prefix/lib <- obj/libxed.so
global name '__set_perm' is not defined

This code path only occurs when using both --prefix and --shared.
Curiously, this doesn't happen with 'install' target to make a kit.
Must be a different call to _set_perm().

Btw, both the caller and the callee of mbuild.copy_file() write a COPY
message, so all the COPY messages are written twice. You might want
to settle on one or the other.

--Mark

@markcharney
Copy link
Contributor

pushed fixes. Let me know if you encounter any other issues. Thank you for reporting this!

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