Bug#1134315: rpy2: FTBFS: E ffi.error: symbol 'R_nchar' not found in library '/usr/lib/R/lib/libR.so': /usr/lib/R/lib/libR.so: undefined symbol: R_nchar

Santiago Vila sanvila at debian.org
Sat Apr 18 18:32:43 BST 2026


Package: src:rpy2
Version: 3.6.4-2
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202604/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:rpy2, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   debian/rules execute_after_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -rfv .pybuild build */build src/*.egg-info */src/*.egg-info
find . -name __pycache__ | rm -rfv
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild

[... snipped ...]

running install_scripts
creating build/bdist.linux-x86_64/wheel/rpy2-3.6.4.dist-info/WHEEL
creating '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/.tmp-p7nl4v5k/rpy2-3.6.4-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'rpy2/__init__.py'
adding 'rpy2/py.typed'
adding 'rpy2-3.6.4.dist-info/licenses/LICENSE'
adding 'rpy2-3.6.4.dist-info/METADATA'
adding 'rpy2-3.6.4.dist-info/WHEEL'
adding 'rpy2-3.6.4.dist-info/top_level.txt'
adding 'rpy2-3.6.4.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built rpy2-3.6.4-py3-none-any.whl
I: pybuild plugin_pyproject:168: Unpacking wheel built for python3.13 with "installer" module
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
TZ=America/New_York LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 dh_auto_test
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build; python3.14 -m pytest 
============================= test session starts ==============================
platform linux -- Python 3.14.4, pytest-9.0.3, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 894 items

rpy2/ipython/tests/test_ggplot.py .                                      [  0%]
rpy2/ipython/tests/test_html.py ........                                 [  1%]
rpy2/ipython/tests/test_rmagic.py ...............s.........ss            [  4%]
rpy2/rinterface/tests/rlike/test_container.py .......................... [  6%]
.........                                                                [  7%]
rpy2/rinterface/tests/rlike/test_functional.py ...                       [  8%]
rpy2/rinterface/tests/rlike/test_indexing.py .                           [  8%]
rpy2/rinterface/tests/test_bufferprotocol.py ...                         [  8%]
rpy2/rinterface/tests/test_callbacks.py .........s..........s...         [ 11%]
rpy2/rinterface/tests/test_conversion.py .                               [ 11%]
rpy2/rinterface/tests/test_embedded_r.py s.......s...................... [ 14%]
.............                                                            [ 16%]
rpy2/rinterface/tests/test_endr.py s                                     [ 16%]
rpy2/rinterface/tests/test_environment.py .............................  [ 19%]
rpy2/rinterface/tests/test_externalptr.py ...ss                          [ 20%]
rpy2/rinterface/tests/test_functions.py ......................           [ 22%]
rpy2/rinterface/tests/test_memorymanagement.py ...                       [ 23%]
rpy2/rinterface/tests/test_na.py .....s......................            [ 26%]
rpy2/rinterface/tests/test_noinitialization.py ssss                      [ 26%]
rpy2/rinterface/tests/test_openrlib.py ........                          [ 27%]
rpy2/rinterface/tests/test_sexp.py ..........................x...F.      [ 31%]
rpy2/rinterface/tests/test_symbol.py ....                                [ 31%]
rpy2/rinterface/tests/test_threading.py s                                [ 31%]
rpy2/rinterface/tests/test_vector_bool.py ..........                     [ 32%]
rpy2/rinterface/tests/test_vector_byte.py ............                   [ 34%]
rpy2/rinterface/tests/test_vector_complex.py .........                   [ 35%]
rpy2/rinterface/tests/test_vector_float.py ..........                    [ 36%]
rpy2/rinterface/tests/test_vector_int.py ..s...................          [ 38%]
rpy2/rinterface/tests/test_vector_lang.py ......                         [ 39%]
rpy2/rinterface/tests/test_vector_list.py .......                        [ 40%]
rpy2/rinterface/tests/test_vector_numpy.py ..s..                         [ 40%]
rpy2/rinterface/tests/test_vector_pairlist.py .....                      [ 41%]
rpy2/rinterface/tests/test_vector_str.py ...........                     [ 42%]
rpy2/rinterface/tests/test_vectors.py ...................                [ 44%]
rpy2/robjects/tests/robjects/lib/test_dbplyr.py .                        [ 44%]
rpy2/robjects/tests/robjects/lib/test_dplyr.py .....................     [ 47%]
rpy2/robjects/tests/robjects/lib/test_ggplot2.py ....................... [ 49%]
.......................                                                  [ 52%]
rpy2/robjects/tests/robjects/lib/test_grdevices.py ...                   [ 52%]
rpy2/robjects/tests/robjects/lib/test_grid.py ................           [ 54%]
rpy2/robjects/tests/robjects/lib/test_tidyr.py ...                       [ 54%]
rpy2/robjects/tests/robjects/test_array.py ....................          [ 57%]
rpy2/robjects/tests/robjects/test_conversion.py ........................ [ 59%]
.....                                                                    [ 60%]
rpy2/robjects/tests/robjects/test_conversion_numpy.py .................. [ 62%]
...................                                                      [ 64%]
rpy2/robjects/tests/robjects/test_dataframe.py ..................        [ 66%]
rpy2/robjects/tests/robjects/test_environment.py ...........             [ 67%]
rpy2/robjects/tests/robjects/test_formula.py ....                        [ 68%]
rpy2/robjects/tests/robjects/test_function.py .......................... [ 71%]
....                                                                     [ 71%]
rpy2/robjects/tests/robjects/test_help.py ...........                    [ 72%]
rpy2/robjects/tests/robjects/test_language.py .....                      [ 73%]
rpy2/robjects/tests/robjects/test_methods.py .......                     [ 74%]
rpy2/robjects/tests/robjects/test_packages.py ....................       [ 76%]
rpy2/robjects/tests/robjects/test_packages_utils.py .......              [ 77%]
rpy2/robjects/tests/robjects/test_pandas_conversions.py ................ [ 78%]
......................................................                   [ 84%]
rpy2/robjects/tests/robjects/test_robjects.py .............              [ 86%]
rpy2/robjects/tests/robjects/test_rs4.py ...                             [ 86%]
rpy2/robjects/tests/robjects/test_serialization.py .                     [ 86%]
rpy2/robjects/tests/robjects/test_translated_function.py ....            [ 87%]
rpy2/robjects/tests/robjects/test_vector.py ............................ [ 90%]
...........................X...................                          [ 95%]
rpy2/robjects/tests/robjects/test_vector_datetime.py ..x...............  [ 97%]
rpy2/robjects/tests/robjects/test_vector_extractdelegator.py ........... [ 98%]
.                                                                        [ 98%]
rpy2/robjects/tests/robjects/test_vector_factor.py .........             [100%]

=================================== FAILURES ===================================
______________________________ test_charsxp_nchar ______________________________

    def test_charsxp_nchar():
        v = rinterface.StrSexpVector(['abc', 'de', ''])
        cs = v.get_charsxp(0)
>       assert cs.nchar() == 3
               ^^^^^^^^^^

rpy2/rinterface/tests/test_sexp.py:269: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rpy2.rinterface_lib.sexp.CharSexp object at 0x7f8fdd7bf390> [9]
what = <NCHAR_TYPE.Bytes: 0>

    def nchar(self, what: NCHAR_TYPE = NCHAR_TYPE.Bytes) -> int:
        try:
            openrlib.lock.acquire()
            # TODO: nchar_type is not parsed properly by cffi ?
>           return openrlib.rlib.R_nchar(self.__sexp__._cdata,
                   ^^^^^^^^^^^^^^^^^^^^^
                                         what.value,
                                         openrlib.rlib.FALSE,
                                         openrlib.rlib.FALSE,
                                         self._NCHAR_MSG)
E                                        ffi.error: symbol 'R_nchar' not found in library '/usr/lib/R/lib/libR.so': /usr/lib/R/lib/libR.so: undefined symbol: R_nchar

rpy2/rinterface_lib/sexp.py:310: error
=============================== warnings summary ===============================
rpy2/robjects/lib/dplyr.py:27
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build/rpy2/robjects/lib/dplyr.py:27: UserWarning: This was designed against dplyr versions starting with 1.1. but you have 1.2.1
    warnings.warn(

rpy2/rinterface/tests/test_callbacks.py::test_console_read_with_error_abi
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function _callback_wrapper_ABI.<locals>.outer_func at 0x7f8febf671c0>, trying to convert the result back to C: None
  
  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build/rpy2/rinterface/tests/test_callbacks.py", line 223, in test_console_read_with_error_abi
      res = callbacks._consoleread(prompt, buf, n, 0)
  TypeError: an integer is required
  
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED rpy2/rinterface/tests/test_sexp.py::test_charsxp_nchar - ffi.error: sy...
= 1 failed, 872 passed, 18 skipped, 2 xfailed, 1 xpassed, 2 warnings in 14.65s =
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14/build; python3.14 -m pytest 
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest 
============================= test session starts ==============================
platform linux -- Python 3.13.12, pytest-9.0.3, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 894 items

rpy2/ipython/tests/test_ggplot.py .                                      [  0%]
rpy2/ipython/tests/test_html.py ........                                 [  1%]
rpy2/ipython/tests/test_rmagic.py ...............s.........ss            [  4%]
rpy2/rinterface/tests/rlike/test_container.py .......................... [  6%]
.........                                                                [  7%]
rpy2/rinterface/tests/rlike/test_functional.py ...                       [  8%]
rpy2/rinterface/tests/rlike/test_indexing.py .                           [  8%]
rpy2/rinterface/tests/test_bufferprotocol.py ...                         [  8%]
rpy2/rinterface/tests/test_callbacks.py .........s..........s...         [ 11%]
rpy2/rinterface/tests/test_conversion.py .                               [ 11%]
rpy2/rinterface/tests/test_embedded_r.py s.......s...................... [ 14%]
.............                                                            [ 16%]
rpy2/rinterface/tests/test_endr.py s                                     [ 16%]
rpy2/rinterface/tests/test_environment.py .............................  [ 19%]
rpy2/rinterface/tests/test_externalptr.py ...ss                          [ 20%]
rpy2/rinterface/tests/test_functions.py ......................           [ 22%]
rpy2/rinterface/tests/test_memorymanagement.py ...                       [ 23%]
rpy2/rinterface/tests/test_na.py .....s......................            [ 26%]
rpy2/rinterface/tests/test_noinitialization.py ssss                      [ 26%]
rpy2/rinterface/tests/test_openrlib.py ........                          [ 27%]
rpy2/rinterface/tests/test_sexp.py ..........................x...F.      [ 31%]
rpy2/rinterface/tests/test_symbol.py ....                                [ 31%]
rpy2/rinterface/tests/test_threading.py s                                [ 31%]
rpy2/rinterface/tests/test_vector_bool.py ..........                     [ 32%]
rpy2/rinterface/tests/test_vector_byte.py ............                   [ 34%]
rpy2/rinterface/tests/test_vector_complex.py .........                   [ 35%]
rpy2/rinterface/tests/test_vector_float.py ..........                    [ 36%]
rpy2/rinterface/tests/test_vector_int.py ..s...................          [ 38%]
rpy2/rinterface/tests/test_vector_lang.py ......                         [ 39%]
rpy2/rinterface/tests/test_vector_list.py .......                        [ 40%]
rpy2/rinterface/tests/test_vector_numpy.py ..s..                         [ 40%]
rpy2/rinterface/tests/test_vector_pairlist.py .....                      [ 41%]
rpy2/rinterface/tests/test_vector_str.py ...........                     [ 42%]
rpy2/rinterface/tests/test_vectors.py ...................                [ 44%]
rpy2/robjects/tests/robjects/lib/test_dbplyr.py .                        [ 44%]
rpy2/robjects/tests/robjects/lib/test_dplyr.py .....................     [ 47%]
rpy2/robjects/tests/robjects/lib/test_ggplot2.py ....................... [ 49%]
.......................                                                  [ 52%]
rpy2/robjects/tests/robjects/lib/test_grdevices.py ...                   [ 52%]
rpy2/robjects/tests/robjects/lib/test_grid.py ................           [ 54%]
rpy2/robjects/tests/robjects/lib/test_tidyr.py ...                       [ 54%]
rpy2/robjects/tests/robjects/test_array.py ....................          [ 57%]
rpy2/robjects/tests/robjects/test_conversion.py ........................ [ 59%]
.....                                                                    [ 60%]
rpy2/robjects/tests/robjects/test_conversion_numpy.py .................. [ 62%]
...................                                                      [ 64%]
rpy2/robjects/tests/robjects/test_dataframe.py ..................        [ 66%]
rpy2/robjects/tests/robjects/test_environment.py ...........             [ 67%]
rpy2/robjects/tests/robjects/test_formula.py ....                        [ 68%]
rpy2/robjects/tests/robjects/test_function.py .......................... [ 71%]
....                                                                     [ 71%]
rpy2/robjects/tests/robjects/test_help.py ...........                    [ 72%]
rpy2/robjects/tests/robjects/test_language.py .....                      [ 73%]
rpy2/robjects/tests/robjects/test_methods.py .......                     [ 74%]
rpy2/robjects/tests/robjects/test_packages.py ....................       [ 76%]
rpy2/robjects/tests/robjects/test_packages_utils.py .......              [ 77%]
rpy2/robjects/tests/robjects/test_pandas_conversions.py ................ [ 78%]
......................................................                   [ 84%]
rpy2/robjects/tests/robjects/test_robjects.py .............              [ 86%]
rpy2/robjects/tests/robjects/test_rs4.py ...                             [ 86%]
rpy2/robjects/tests/robjects/test_serialization.py .                     [ 86%]
rpy2/robjects/tests/robjects/test_translated_function.py ....            [ 87%]
rpy2/robjects/tests/robjects/test_vector.py ............................ [ 90%]
...........................X...................                          [ 95%]
rpy2/robjects/tests/robjects/test_vector_datetime.py ..x...............  [ 97%]
rpy2/robjects/tests/robjects/test_vector_extractdelegator.py ........... [ 98%]
.                                                                        [ 98%]
rpy2/robjects/tests/robjects/test_vector_factor.py .........             [100%]

=================================== FAILURES ===================================
______________________________ test_charsxp_nchar ______________________________

    def test_charsxp_nchar():
        v = rinterface.StrSexpVector(['abc', 'de', ''])
        cs = v.get_charsxp(0)
>       assert cs.nchar() == 3
               ^^^^^^^^^^

rpy2/rinterface/tests/test_sexp.py:269: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rpy2.rinterface_lib.sexp.CharSexp object at 0x7f792dbcbe10> [9]
what = <NCHAR_TYPE.Bytes: 0>

    def nchar(self, what: NCHAR_TYPE = NCHAR_TYPE.Bytes) -> int:
        try:
            openrlib.lock.acquire()
            # TODO: nchar_type is not parsed properly by cffi ?
>           return openrlib.rlib.R_nchar(self.__sexp__._cdata,
                   ^^^^^^^^^^^^^^^^^^^^^
                                         what.value,
                                         openrlib.rlib.FALSE,
                                         openrlib.rlib.FALSE,
                                         self._NCHAR_MSG)
E                                        ffi.error: symbol 'R_nchar' not found in library '/usr/lib/R/lib/libR.so': /usr/lib/R/lib/libR.so: undefined symbol: R_nchar

rpy2/rinterface_lib/sexp.py:310: error
=============================== warnings summary ===============================
rpy2/robjects/lib/dplyr.py:27
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/rpy2/robjects/lib/dplyr.py:27: UserWarning: This was designed against dplyr versions starting with 1.1. but you have 1.2.1
    warnings.warn(

rpy2/rinterface/tests/test_callbacks.py::test_console_read_with_error_abi
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function _callback_wrapper_ABI.<locals>.outer_func at 0x7f793c30e840>, trying to convert the result back to C: None
  
  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build/rpy2/rinterface/tests/test_callbacks.py", line 223, in test_console_read_with_error_abi
      res = callbacks._consoleread(prompt, buf, n, 0)
  TypeError: an integer is required
  
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

rpy2/rinterface/tests/test_embedded_r.py::test_initr
  /usr/lib/python3.13/multiprocessing/popen_fork.py:67: DeprecationWarning: This process (pid=804) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED rpy2/rinterface/tests/test_sexp.py::test_charsxp_nchar - ffi.error: sy...
= 1 failed, 872 passed, 18 skipped, 2 xfailed, 1 xpassed, 3 warnings in 10.54s =
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest 
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 3.13" --parallel=2 returned exit code 13
make[1]: *** [debian/rules:33: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:20: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------



More information about the debian-science-maintainers mailing list