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

BUG: clang-9: error: -Wl,-export_dynamic: 'linker' input unused (OSX) #33314

Closed
2 of 3 tasks
xhochy opened this issue Apr 6, 2020 · 3 comments · Fixed by #38087
Closed
2 of 3 tasks

BUG: clang-9: error: -Wl,-export_dynamic: 'linker' input unused (OSX) #33314

xhochy opened this issue Apr 6, 2020 · 3 comments · Fixed by #38087
Labels
Bug Build Library building on various platforms
Milestone

Comments

@xhochy
Copy link
Contributor

xhochy commented Apr 6, 2020

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


conda environment

conda create -n pandas-compile-test compilers numpy cython

  binutils-meta      conda-forge/osx-64::binutils-meta-1.0.4-0
  c-compiler         conda-forge/osx-64::c-compiler-1.0.4-h1239861_0
  ca-certificates    conda-forge/osx-64::ca-certificates-2020.4.5.1-hecc5488_0
  cctools            conda-forge/osx-64::cctools-927.0.2-h5ba7a2e_4
  certifi            conda-forge/osx-64::certifi-2020.4.5.1-py38h32f6830_0
  clang              conda-forge/osx-64::clang-9.0.1-default_hf57f61e_0
  clang_osx-64       conda-forge/osx-64::clang_osx-64-9.0.1-h05bbb7f_0
  clangxx            conda-forge/osx-64::clangxx-9.0.1-default_hf57f61e_0
  clangxx_osx-64     conda-forge/osx-64::clangxx_osx-64-9.0.1-h05bbb7f_0
  compiler-rt        conda-forge/osx-64::compiler-rt-9.0.1-h6a512c6_3
  compiler-rt_osx-64 conda-forge/noarch::compiler-rt_osx-64-9.0.1-h99342c6_3
  compilers          conda-forge/osx-64::compilers-1.0.4-0
  cxx-compiler       conda-forge/osx-64::cxx-compiler-1.0.4-h707564b_0
  cython             conda-forge/osx-64::cython-0.29.16-py38hc84c608_0
  fortran-compiler   conda-forge/osx-64::fortran-compiler-1.0.4-he991be0_0
  gfortran_impl_osx~ conda-forge/osx-64::gfortran_impl_osx-64-7.3.0-hf4212f2_2
  gfortran_osx-64    conda-forge/osx-64::gfortran_osx-64-7.3.0-h22b1bf0_9
  gmp                conda-forge/osx-64::gmp-6.2.0-h4a8c4bd_2
  isl                conda-forge/osx-64::isl-0.19-0
  ld64               conda-forge/osx-64::ld64-450.3-h3c32e8a_4
  libblas            conda-forge/osx-64::libblas-3.8.0-16_openblas
  libcblas           conda-forge/osx-64::libcblas-3.8.0-16_openblas
  libcxx             conda-forge/osx-64::libcxx-9.0.1-1
  libffi             conda-forge/osx-64::libffi-3.2.1-h4a8c4bd_1007
  libgfortran        conda-forge/osx-64::libgfortran-4.0.0-2
  libiconv           conda-forge/osx-64::libiconv-1.15-h0b31af3_1006
  liblapack          conda-forge/osx-64::liblapack-3.8.0-16_openblas
  libllvm9           conda-forge/osx-64::libllvm9-9.0.1-ha1b3eb9_0
  libopenblas        conda-forge/osx-64::libopenblas-0.3.9-h3d69b6c_0
  llvm-openmp        conda-forge/osx-64::llvm-openmp-9.0.1-h28b9765_2
  mpc                conda-forge/osx-64::mpc-1.1.0-h4160ff4_1006
  mpfr               conda-forge/osx-64::mpfr-4.0.2-h44b798e_0
  ncurses            conda-forge/osx-64::ncurses-6.1-h0a44026_1002
  numpy              conda-forge/osx-64::numpy-1.18.1-py38h1f821a2_1
  openssl            conda-forge/osx-64::openssl-1.1.1f-h0b31af3_0
  pip                conda-forge/noarch::pip-20.0.2-py_2
  python             conda-forge/osx-64::python-3.8.2-hd5f0129_5_cpython
  python_abi         conda-forge/osx-64::python_abi-3.8-1_cp38
  readline           conda-forge/osx-64::readline-8.0-hcfe32e1_0
  setuptools         conda-forge/osx-64::setuptools-46.1.3-py38h32f6830_0
  sqlite             conda-forge/osx-64::sqlite-3.30.1-h93121df_0
  tapi               conda-forge/osx-64::tapi-1000.10.8-ha1b3eb9_4
  tk                 conda-forge/osx-64::tk-8.6.10-hbbe82c9_0
  wheel              conda-forge/noarch::wheel-0.34.2-py_1
  xz                 conda-forge/osx-64::xz-5.2.4-h0b31af3_1002
  zlib               conda-forge/osx-64::zlib-1.2.11-h0b31af3_1006

Error message:

clang-9: error: -Wl,-export_dynamic: 'linker' input unused [-Werror,-Wunused-command-line-argument]

Output of pip install -e ~/Development/pandas --no-deps --no-use-pep517 -vvv:

Non-user install because site-packages writeableCreated temporary directory: /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-ephem-wheel-cache-ehxkyhsg
Created temporary directory: /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv
Initialized build tracking at /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv
Created build tracker: /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv
Entered build tracker: /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv
Created temporary directory: /private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-install-5lvoa7_h
Obtaining file:///Users/uwe/Development/pandas
  Added file:///Users/uwe/Development/pandas to build tracker '/private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv'
    Running setup.py (path:/Users/uwe/Development/pandas/setup.py) egg_info for package from file:///Users/uwe/Development/pandas
    Running command python setup.py egg_info
    Compiling pandas/_libs/hashing.pyx because it depends on /Users/uwe/miniconda3/envs/pandas-compile-test/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd.
    Compiling pandas/_libs/reshape.pyx because it depends on /Users/uwe/miniconda3/envs/pandas-compile-test/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd.
    Compiling pandas/_libs/window/indexers.pyx because it depends on /Users/uwe/miniconda3/envs/pandas-compile-test/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd.
    [1/3] Cythonizing pandas/_libs/hashing.pyx
    [2/3] Cythonizing pandas/_libs/reshape.pyx
    [3/3] Cythonizing pandas/_libs/window/indexers.pyx
    running egg_info
    writing pandas.egg-info/PKG-INFO
    writing dependency_links to pandas.egg-info/dependency_links.txt
    writing entry points to pandas.egg-info/entry_points.txt
    writing requirements to pandas.egg-info/requires.txt
    writing top-level names to pandas.egg-info/top_level.txt
    reading manifest file 'pandas.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'doc/build'
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '#*' found anywhere in distribution
    writing manifest file 'pandas.egg-info/SOURCES.txt'
  Source in /Users/uwe/Development/pandas has version 1.1.0.dev0+1122.g01f73100d.dirty, which satisfies requirement pandas==1.1.0.dev0+1122.g01f73100d.dirty from file:///Users/uwe/Development/pandas
  Removed pandas==1.1.0.dev0+1122.g01f73100d.dirty from file:///Users/uwe/Development/pandas from build tracker '/private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv'
Installing collected packages: pandas
  Running setup.py develop for pandas
    Running command /Users/uwe/miniconda3/envs/pandas-compile-test/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/uwe/Development/pandas/setup.py'"'"'; __file__='"'"'/Users/uwe/Development/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
    running develop
    running egg_info
    writing pandas.egg-info/PKG-INFO
    writing dependency_links to pandas.egg-info/dependency_links.txt
    writing entry points to pandas.egg-info/entry_points.txt
    writing requirements to pandas.egg-info/requires.txt
    writing top-level names to pandas.egg-info/top_level.txt
    reading manifest file 'pandas.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'doc/build'
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '#*' found anywhere in distribution
    writing manifest file 'pandas.egg-info/SOURCES.txt'
    running build_ext
    building 'pandas._libs.algos' extension
    x86_64-apple-darwin13.4.0-clang -fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 -pipe -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=/Users/uwe/miniconda3/envs/pandas-compile-test=/usr/local/src/conda-prefix -flto -Wl,-export_dynamic -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/Users/uwe/miniconda3/envs/pandas-compile-test/lib/python3.8/site-packages/numpy/core/include -I/Users/uwe/miniconda3/envs/pandas-compile-test/include/python3.8 -c pandas/_libs/algos.c -o build/temp.macosx-10.9-x86_64-3.8/pandas/_libs/algos.o -Werror
    clang-9: error: -Wl,-export_dynamic: 'linker' input unused [-Werror,-Wunused-command-line-argument]
    error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
Cleaning up...
Removed build tracker: '/private/var/folders/3r/k0d_q3hs2mb2_jxfh_9hjyqr0000gn/T/pip-req-tracker-waeimcjv'
ERROR: Command errored out with exit status 1: /Users/uwe/miniconda3/envs/pandas-compile-test/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/uwe/Development/pandas/setup.py'"'"'; __file__='"'"'/Users/uwe/Development/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

export | grep FLAGS:

CFLAGS='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
CONDA_BACKUP_LDFLAGS=' -Wl,-rpath,/Users/uwe/miniconda3/envs/pandas-compile-test/lib -L/Users/uwe/miniconda3/envs/pandas-compile-test/lib'
CPPFLAGS='-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
CXXFLAGS='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
DEBUG_CFLAGS='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -Og -g -Wall -Wextra -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
DEBUG_CXXFLAGS='-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -Og -g -Wall -Wextra -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
DEBUG_FFLAGS='-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments'
DEBUG_FORTRANFLAGS='-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments'
FFLAGS='-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
FORTRANFLAGS='-march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-test/include'
LDFLAGS=' -Wl,-rpath,/Users/uwe/miniconda3/envs/pandas-compile-test/lib -L/Users/uwe/miniconda3/envs/pandas-compile-test/lib'
LDFLAGS_LD='-pie -headerpad_max_install_names -dead_strip_dylibs -rpath /Users/uwe/miniconda3/envs/pandas-compile-test/lib -L/Users/uwe/miniconda3/envs/pandas-compile-test/lib'
XPC_FLAGS=0x0

Seems like this is not the first issue in response to #32163, there is also e.g. #33224

@xhochy xhochy added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 6, 2020
@xhochy
Copy link
Contributor Author

xhochy commented Apr 6, 2020

This is probably down somewhere in the packaged Python/distutils code but instead of fixing this, I'd rather see #33315 tackled.

@simonjayhawkins simonjayhawkins added Build Library building on various platforms and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 6, 2020
@WillAyd
Copy link
Member

WillAyd commented Nov 17, 2020

I am unable to reproduce this on macOS - can you check this is still relevant?

conda list

packages in environment at /Users/williamayd/miniconda3/envs/pandas-compile-test:

Name Version Build Channel

c-compiler 1.1.2 hc929b4f_0 conda-forge
ca-certificates 2020.11.8 h033912b_0 conda-forge
cctools 949.0.1 h8821f95_16 conda-forge
cctools_osx-64 949.0.1 h8e49ea9_16 conda-forge
certifi 2020.11.8 py39h6e9494a_0 conda-forge
clang 11.0.0 1 conda-forge
clang-11 11.0.0 default_h000dee7_1 conda-forge
clang_osx-64 11.0.0 hb91bd55_5 conda-forge
clangxx 11.0.0 default_hf57f61e_1 conda-forge
clangxx_osx-64 11.0.0 h7e1b574_5 conda-forge
compiler-rt 11.0.0 h01488ec_2 conda-forge
compiler-rt_osx-64 11.0.0 hd3c4e95_2 conda-forge
compilers 1.1.2 h694c41f_0 conda-forge
cxx-compiler 1.1.2 h9a9d8cb_0 conda-forge
cython 0.29.21 py39h13a702c_1 conda-forge
fortran-compiler 1.1.2 hcc3dc05_0 conda-forge
gfortran_impl_osx-64 7.5.0 h34a0dec_13 conda-forge
gfortran_osx-64 7.5.0 h1174d25_10 conda-forge
gmp 6.2.0 h2e338ed_4 conda-forge
isl 0.22.1 hb1e8313_2 conda-forge
ld64 530 h755cc8a_16 conda-forge
ld64_osx-64 530 h66d9e41_16 conda-forge
ldid 2.1.2 h7660a38_2 conda-forge
libblas 3.9.0 2_openblas conda-forge
libcblas 3.9.0 2_openblas conda-forge
libclang-cpp11 11.0.0 default_h000dee7_1 conda-forge
libcxx 11.0.0 h439d374_0 conda-forge
libffi 3.2.1 hb1e8313_1007 conda-forge
libgfortran 4.0.0 h50e675f_13 conda-forge
libgfortran-devel_osx-64 7.5.0 h50e675f_13 conda-forge
libgfortran4 7.5.0 h50e675f_13 conda-forge
libiconv 1.16 haf1e3a3_0 conda-forge
liblapack 3.9.0 2_openblas conda-forge
libllvm11 11.0.0 hf85e3d2_0 conda-forge
libopenblas 0.3.12 openmp_h63d9170_1 conda-forge
llvm-openmp 11.0.0 h73239a0_1 conda-forge
llvm-tools 11.0.0 hf85e3d2_0 conda-forge
mpc 1.1.0 ha57cd0f_1009 conda-forge
mpfr 4.0.2 h72d8aaf_1 conda-forge
ncurses 6.2 h2e338ed_4 conda-forge
numpy 1.19.4 py39hd3e5478_1 conda-forge
openssl 1.1.1h haf1e3a3_0 conda-forge
pandas 1.2.0.dev0+831.gcd9c56e2c.dirty dev_0
pip 20.2.4 py_0 conda-forge
python 3.9.0 ha017127_4_cpython conda-forge
python-dateutil 2.8.1 pypi_0 pypi
python_abi 3.9 1_cp39 conda-forge
pytz 2020.4 pypi_0 pypi
readline 8.0 h0678c8f_2 conda-forge
setuptools 49.6.0 py39h2c36a5b_2 conda-forge
six 1.15.0 pypi_0 pypi
sqlite 3.33.0 h960bd1c_1 conda-forge
tapi 1100.0.11 h9ce4665_0 conda-forge
tk 8.6.10 hb0a8c7a_1 conda-forge
tzdata 2020d h516909a_0 conda-forge
wheel 0.35.1 pyh9f0ad1d_0 conda-forge
xz 5.2.5 haf1e3a3_1 conda-forge
zlib 1.2.11 h7795811_1010 conda-forge

@xhochy
Copy link
Contributor Author

xhochy commented Nov 26, 2020

Yes, this still happens:

git clone https://github.com/pandas-dev/pandas
cd pandas
mamba env create -n pandas-compile-test
mamba install -n pandas-compile-test c-compiler
# Only activate at the end to get the correct environment flags
conda activate pandas-compile-test

This then leads to

% python setup.py build_ext
Compiling pandas/_libs/algos.pyx because it changed.
…
Compiling pandas/io/sas/sas.pyx because it changed.
[ 1/40] Cythonizing pandas/_libs/algos.pyx
…
[40/40] Cythonizing pandas/io/sas/sas.pyx
running build_ext
building 'pandas._libs.algos' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/pandas
creating build/temp.macosx-10.9-x86_64-3.8/pandas/_libs
x86_64-apple-darwin13.4.0-clang -fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 -pipe -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=/Users/uwe/miniconda3/envs/pandas-compile-testd=/usr/local/src/conda-prefix -flto -Wl,-export_dynamic -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O3 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/uwe/miniconda3/envs/pandas-compile-testd/include -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -isystem /Users/uwe/miniconda3/envs/pandas-compile-testd/include -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/Users/uwe/miniconda3/envs/pandas-compile-testd/lib/python3.8/site-packages/numpy/core/include -I/Users/uwe/miniconda3/envs/pandas-compile-testd/include/python3.8 -c pandas/_libs/algos.c -o build/temp.macosx-10.9-x86_64-3.8/pandas/_libs/algos.o -Werror -Wno-error=deprecated-declarations -Wno-error=unreachable-code
clang-10: error: -Wl,-export_dynamic: 'linker' input unused [-Werror,-Wunused-command-line-argument]
error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1

Note that I'm using mamba instead of conda in the above commands as I'm impatient, you should get the same result by only using conda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Library building on various platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants