TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.27k stars 1.72k forks source link

Unable to Install on Ubuntu 22.04 - TA_FuncHandle ** {aka unsigned int **} #579

Closed algonell closed 1 year ago

algonell commented 1 year ago

Summary: Followed the instructions religiously, seems like a compilation issue.

System: Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy

Log: Building wheels for collected packages: ta-lib Building wheel for ta-lib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for ta-lib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [81 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/talib copying talib/deprecated.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_polars.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/abstract.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_func.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/stream.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_stream.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_abstract.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_pandas.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/test_data.py -> build/lib.linux-x86_64-cpython-310/talib copying talib/init.py -> build/lib.linux-x86_64-cpython-310/talib running build_ext building 'talib._ta_lib' extension creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/talib x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/tmp/pip-build-env-jpgdwh4y/normal/local/lib/python3.10/dist-packages/numpy/core/include -I/usr/include/python3.10 -c talib/_ta_lib.c -o build/temp.linux-x86_64-cpython-310/talib/_ta_lib.o In file included from /tmp/pip-build-env-jpgdwh4y/normal/local/lib/python3.10/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1940, from /tmp/pip-build-env-jpgdwh4y/normal/local/lib/python3.10/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /tmp/pip-build-env-jpgdwh4y/normal/local/lib/python3.10/dist-packages/numpy/core/include/numpy/arrayobject.h:5, from talib/_ta_lib.c:754: /tmp/pip-build-env-jpgdwh4y/normal/local/lib/python3.10/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] 17 #warning "Using deprecated NumPy API, disable it with " \ ^~~ talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_348_ta_getFuncInfo’: talib/_ta_lib.c:38908:104: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type [-Wincompatible-pointer-types] 38908 pyx_v_retCode = TA_GetFuncInfo(pyx_f_5talib_7_talibta_getFuncHandle(pyx_v_function_name), (&__pyx_v_info)); ~^~~~~~
TA_FuncInfo **
  In file included from talib/_ta_lib.c:749:
  /usr/include/ta-lib/ta_abstract.h:211:48: note: expected ‘const TA_FuncInfo **’ but argument is of type ‘TA_FuncInfo **’
    211 |                            const TA_FuncInfo **funcInfo );
        |                            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_350_ta_getInputParameterInfo’:
  talib/_ta_lib.c:39179:127: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
  39179 |   __pyx_v_retCode = TA_GetInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
        |                                                                                                                              ~^~~~~~~~~~~~~~
        |                                                                                                                               |
        |                                                                                                                               TA_InputParameterInfo **
  In file included from talib/_ta_lib.c:749:
  /usr/include/ta-lib/ta_abstract.h:442:68: note: expected ‘const TA_InputParameterInfo **’ but argument is of type ‘TA_InputParameterInfo **’
    442 |                                      const TA_InputParameterInfo **info );
        |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_352_ta_getOptInputParameterInfo’:
  talib/_ta_lib.c:39429:130: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
  39429 |   __pyx_v_retCode = TA_GetOptInputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
        |                                                                                                                                 ~^~~~~~~~~~~~~~
        |                                                                                                                                  |
        |                                                                                                                                  TA_OptInputParameterInfo **
  In file included from talib/_ta_lib.c:749:
  /usr/include/ta-lib/ta_abstract.h:446:74: note: expected ‘const TA_OptInputParameterInfo **’ but argument is of type ‘TA_OptInputParameterInfo **’
    446 |                                         const TA_OptInputParameterInfo **info );
        |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_pf_5talib_7_ta_lib_354_ta_getOutputParameterInfo’:
  talib/_ta_lib.c:39675:128: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type [-Wincompatible-pointer-types]
  39675 |   __pyx_v_retCode = TA_GetOutputParameterInfo(__pyx_f_5talib_7_ta_lib___ta_getFuncHandle(__pyx_v_function_name), __pyx_v_idx, (&__pyx_v_info));
        |                                                                                                                               ~^~~~~~~~~~~~~~
        |                                                                                                                                |
        |                                                                                                                                TA_OutputParameterInfo **
  In file included from talib/_ta_lib.c:749:
  /usr/include/ta-lib/ta_abstract.h:450:70: note: expected ‘const TA_OutputParameterInfo **’ but argument is of type ‘TA_OutputParameterInfo **’
    450 |                                       const TA_OutputParameterInfo **info );
        |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
  talib/_ta_lib.c: In function ‘__pyx_f_5talib_7_ta_lib___ta_getFuncHandle’:
  talib/_ta_lib.c:40274:126: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type [-Wincompatible-pointer-types]
  40274 |   __pyx_t_1 = __pyx_f_5talib_7_ta_lib__ta_check_success(__pyx_n_s_TA_GetFuncHandle, TA_GetFuncHandle(__pyx_v_function_name, (&__pyx_v_handle)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 772, __pyx_L1_error)
        |                                                                                                                             ~^~~~~~~~~~~~~~~~
        |                                                                                                                              |
        |                                                                                                                              TA_FuncHandle ** {aka unsigned int **}
  In file included from talib/_ta_lib.c:749:
  /usr/include/ta-lib/ta_abstract.h:155:52: note: expected ‘const TA_FuncHandle **’ {aka ‘const unsigned int **’} but argument is of type ‘TA_FuncHandle **’ {aka ‘unsigned int **’}
    155 |                              const TA_FuncHandle **handle );
        |                              ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
  x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ta-lib Failed to build ta-lib ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based projects

mrjbq7 commented 1 year ago

This is probably not enough RAM.

x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1 compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

mrjbq7 commented 1 year ago

Some small VMs have issues, I noted it in the README.

That would be improved if we can get the cibuildwheel action making wheels.

algonell commented 1 year ago

Thank you and sorry for bothering!

mrjbq7 commented 1 year ago

Never a bother!On Feb 18, 2023, at 12:04 PM, algonell @.***> wrote: Thank you and sorry for bothering!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>