Undefined reference to get_complex_dtype<256>

Open
#407 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp, python
Domain
api, testing

Research direction

Start in src/numpy/dtype.cpp, where the LONGDOUBLE and 2 * LONGDOUBLE dtype definitions are mentioned. Run the libs/python/test/numpy/dtype.py test or the reported libs/python/test command and inspect the generated extension's symbol error. Done means the dtype test imports successfully without the undefined get_complex_dtype<256> reference.

Written by the indexing model from the issue text.

Description

In src/numpy/dtype.cpp, the definition of get_float_dtype < LONGDOUBLE > and get_complex_dtype < 2 * LONGDOUBLE > lacks BOOST_NUMPY_DECL.

Output of libs/python/test:
capture-output ../bin.v2/libs/python/test/numpy~dtype.test/gcc-10/release/debug-symbols-on/pch-off/python-3.9/threading-multi/visibility-hidden/numpy~dtype
====== BEGIN OUTPUT ======
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/boost_1_78_0/status/../libs/python/test/numpy/dtype.py", line 8, in
import dtype_ext
ImportError: /root/rpmbuild/BUILD/boost_1_78_0/bin.v2/libs/python/test/numpy~dtype.test/gcc-10/release/debug-symbols-on/pch-off/python-3.9/threading-multi/visibility-hidden/dtype_ext.so: undefined symbol: _ZN5boost6python5numpy6detail17get_complex_dtypeILi256EEENS1_5dtypeEv

EXIT STATUS: 1
====== END OUTPUT ======

Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/python

All issues in boostorg/python

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.