-
Notifications
You must be signed in to change notification settings - Fork 275
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
[regression in 0.20.0] error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC #1146
Comments
Are you setting $CFLAGS or other similar environment variables? |
Yes: But this shouldn't affect the issue. |
You have encountered the same problem as the Bioconda pysam package build did in bioconda/bioconda-recipes#37686. As discussed in #1112 and PR #1140, when using the bundled htslib, pysam 0.20.0 uses HTSlib's Makefile to build libhts.a rather than listing htslib/*.c as extension module source files and having them compiled via setuptools's infrastructure. Prior to this, $CFLAGS/etc were used only to provide information for I realised rather late in the 0.20.0 development cycle (see e23c7fe) that in general it is necessary to add That commit explicitly adds $CCSHARED to $CFLAGS when the latter comes from This problem will go away in a future pysam version when running configure uses settings as set up by --- a/setup.py
+++ b/setup.py
@@ -170,6 +170,8 @@ def set_compiler_envvars():
tmp_vars = []
for var in ['CC', 'CFLAGS', 'LDFLAGS']:
if var in os.environ:
+ if var == 'CFLAGS' and 'CCSHARED' in sysconfig.get_config_vars():
+ os.environ[var] += ' ' + sysconfig.get_config_var('CCSHARED')
print("# pysam: (env) {}={}".format(var, os.environ[var]))
elif var in sysconfig.get_config_vars():
value = sysconfig.get_config_var(var) Alternatively you should simply set the option yourself: |
clang-14
Python-3.9
OS: FreeBSD 13.1
The text was updated successfully, but these errors were encountered: