Bug 1019924 - There is not possible to install ta-lib on python 2.7 cartridge
There is not possible to install ta-lib on python 2.7 cartridge
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 11:58 EDT by andrzej_o
Modified: 2015-05-14 20:34 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:48:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description andrzej_o 2013-10-16 11:58:29 EDT
Try to install ta-lib with activated virutalenv:
Commands:
. /python/venv/bin/activate 
pip install ta-lib


OUTPUT: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fe xceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU _SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexce ptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SO URCE -fPIC -fwrapv -fPIC -I/var/lib/openshift/525a5d445973cab182000063/python/vi rtenv/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/local /include -I/opt/include -I/opt/local/include -I/opt/rh/python27/root/usr/include /python2.7 -c talib/common.c -o build/temp.linux-x86_64-2.7/talib/common.o

talib/common.c:314:28: error: ta-lib/ta_defs.h: No such file or directory

talib/common.c:315:30: error: ta-lib/ta_common.h: No such file or directory

talib/common.c:316:32: error: ta-lib/ta_abstract.h: No such file or directory

talib/common.c:317:28: error: ta-lib/ta_func.h: No such file or directory

talib/common.c: In function '__pyx_f_5talib_6common__ta_check_success':

talib/common.c:951: error: 'TA_SUCCESS' undeclared (first use in this function)

talib/common.c:951: error: (Each undeclared identifier is reported only once

talib/common.c:951: error: for each function it appears in.)

talib/common.c: In function '__pyx_pf_5talib_6common_2_ta_initialize':

talib/common.c:1190: warning: implicit declaration of function 'TA_Initialize'

talib/common.c: In function '__pyx_pf_5talib_6common_4_ta_shutdown':

talib/common.c:1266: warning: implicit declaration of function 'TA_Shutdown'

talib/common.c: In function 'initcommon':

talib/common.c:1912: warning: implicit declaration of function 'TA_GetVersionStr ing'

talib/common.c:1912: warning: passing argument 1 of 'PyString_FromString' makes pointer from integer without a cast

/opt/rh/python27/root/usr/include/python2.7/stringobject.h:63: note: expected 'c onst char *' but argument is of type 'int'

error: command 'gcc' failed with exit status 1

Cleaning up... Command /var/lib/openshift/525a5d445973cab182000063/python/virtenv/bin/python2.7 -c "import setuptools;file='/var/lib/openshift/525a5d445973cab182000063/pyt hon/virtenv/build/ta-lib/setup.py';exec(compile(open(file).read().replace('\ r\n', '\n'), file, 'exec'))" install --record /tmp/pip-rPAGgF-record/install -record.txt --single-version-externally-managed --install-headers /var/lib/opens hift/525a5d445973cab182000063/python/virtenv/include/site/python2.7 failed with error code 1 in /var/lib/openshift/525a5d445973cab182000063/python/virtenv/build /ta-lib Traceback (most recent call last): File "/var/lib/openshift/525a5d445973cab182000063/python/virtenv/bin/pip", lin e 12, in load_entry_point('pip==1.4', 'console_scripts', 'pip')() File "/var/lib/openshift/525a5d445973cab182000063/python/virtenv/lib/python2.7 /site-packages/pip/init.py", line 147, in main return command.main(args[1:], options) File "/var/lib/openshift/525a5d445973cab182000063/python/virtenv/lib/python2.7 /site-packages/pip/basecommand.py", line 169, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal not in range(128)
Comment 1 Rob Millner 2013-10-16 21:16:21 EDT
What's missing is the ta-lib library itself, 64 bit compile.

Is this on your own Origin installation or is this in the Online service?
Comment 2 andrzej_o 2013-10-17 16:30:44 EDT
online version. works  fine on 32 bit ubuntu
Comment 3 andrzej_o 2013-10-17 16:34:34 EDT
I have installed corectly cython and numpy in my virtualenv but ta-lib for a
not work in this way
Comment 8 Michal Fojtik 2013-11-06 18:15:36 EST
andrzej_o: We are going to add 'ta-lib-devel' RPM into OpenShift, which should make possible for ta-lib to compile successfully. I tried this on devenv and I managed it to install using pip install ta-lib with activated virtenv:

Successfully installed ta-lib
Cleaning up...

I'll send a pull request to add this dependency. Thanks for reporting this and thanks to Troy Dawson who added the ta-lib-devel into our repos.
Comment 9 openshift-github-bot 2013-11-06 21:40:03 EST
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/ab696c364922e420aab8e717cdcdd90f224e7f9f
Bug 1019924 - Added ta-lib-devel dependency to the python cartridge
Comment 10 chunchen 2013-11-08 04:56:34 EST
Checked the it on devenv_4008, it's failed to install numpy before installing ta-lib, please refer to following messages:

1. Create a python-3.3 app
2. Modify the setup.py file as below:
cat setup.py
from setuptools import setup

setup(name='YourAppName', version='1.0',
      description='OpenShift Python-3.3 Community Cartridge based application',
      author='Your Name', author_email='ramr@example.org',
      url='http://www.python.org/sigs/distutils-sig/',

      #  Uncomment one or more lines below in the install_requires section
      #  for the specific client drivers/modules your application needs.
      install_requires=[ 'numpy',
      ],
     )
3. Git push the changes
git add .; git commit -amp; git push

<---------snip---------->
remote: Building git ref 'master', commit e8d8be3
remote:   - Created/Updated virtenv and activated it.
remote:  - Found setup.py. Processing it ...
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing requirements to YourAppName.egg-info/requires.txt
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/527c909734343c3753000002/app-root/runtime/dependencies/python/virtenv/venv/lib/python3.3/site-packages/YourAppName.egg-link (link to .)
remote: YourAppName 1.0 is already the active version in easy-install.pth
remote: 
remote: Installed /var/lib/openshift/527c909734343c3753000002/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for numpy
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/numpy/
remote: Best match: numpy 1.8.0
remote: Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/n/numpy/numpy-1.8.0.zip#md5=6c918bb91c0cfa055b16b13850cfcd6e
remote: Processing numpy-1.8.0.zip
remote: Writing /tmp/easy_install-l8dp2j/numpy-1.8.0/setup.cfg
remote: Running numpy-1.8.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l8dp2j/numpy-1.8.0/egg-dist-tmp-qtw23d
remote: /bin/sh: svnversion: command not found
remote: non-existing path in 'numpy/distutils': 'site.cfg'
remote: Found executable /usr/bin/gfortran
remote: ATLAS version 3.8.4 built by mockbuild on Thu Feb  9 08:22:21 EST 2012:
remote:    UNAME    : Linux x86-010.build.bos.redhat.com 2.6.18-274.17.1.el5 #1 SMP Wed Jan 4 22:45:44 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
remote:    INSTFLG  : -1 0 -a 1
remote:    ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_P4E -DATL_CPUMHZ=3600 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664
remote:    F2CDEFS  : -DAdd_ -DF77_INTEGER=int -DStringSunStyle
remote:    CACHEEDGE: 524288
remote:    F77      : gfortran, version GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
remote:    F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64
remote:    SMC      : gcc, version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
remote:    SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64
remote:    SKC      : gcc, version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
remote:    SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64
remote: /bin/sh: svnversion: command not found
remote: non-existing path in 'numpy/lib': 'benchmarks'
remote: _configtest.c:1: warning: conflicting types for built-in function 'exp'
remote: _configtest.o: In function `main':
remote: /tmp/easy_install-l8dp2j/numpy-1.8.0/_configtest.c:6: undefined reference to `exp'
remote: collect2: ld returned 1 exit status
remote: _configtest.c:1: warning: conflicting types for built-in function 'exp'
remote: _configtest.c:1:20: error: Python.h: No such file or directory
remote: Running from numpy source directory.
remote: Warning: distutils distribution has been initialized, it may be too late to add a subpackage commandWarning: distutils distribution has been initialized, it may be too late to add a subpackage fcompilerWarning: distutils distribution has been initialized, it may be too late to add a subpackage distutilsWarning: distutils distribution has been initialized, it may be too late to add a subpackage testingWarning: distutils distribution has been initialized, it may be too late to add a subpackage f2pyWarning: distutils distribution has been initialized, it may be too late to add an extension _dummyWarning: distutils distribution has been initialized, it may be too late to add a library npysortWarning: distutils distribution has been initialized, it may be too late to add an extension multiarrayWarning: distutils distribution has been initialized, it may be too late to add an extension umathWarning: distutils distribution has been initialized, it may be too late to add an extension scalarmathWarning: distutils distribution has been initialized, it may be too late to add an extension _dotblasWarning: distutils distribution has been initialized, it may be too late to add an extension umath_testsWarning: distutils distribution has been initialized, it may be too late to add an extension test_rationalWarning: distutils distribution has been initialized, it may be too late to add an extension struct_ufunc_testWarning: distutils distribution has been initialized, it may be too late to add an extension multiarray_testsWarning: distutils distribution has been initialized, it may be too late to add an extension operand_flag_testsWarning: distutils distribution has been initialized, it may be too late to add a subpackage coreWarning: distutils distribution has been initialized, it may be too late to add an extension _compiled_baseWarning: distutils distribution has been initialized, it may be too late to add a subpackage libWarning: distutils distribution has been initialized, it may be too late to add a subpackage oldnumericWarning: distutils distribution has been initialized, it may be too late to add an extension _capiWarning: distutils distribution has been initialized, it may be too late to add a subpackage numarrayWarning: distutils distribution has been initialized, it may be too late to add an extension fftpack_liteWarning: distutils distribution has been initialized, it may be too late to add a subpackage fftWarning: distutils distribution has been initialized, it may be too late to add an extension lapack_liteWarning: distutils distribution has been initialized, it may be too late to add an extension _umath_linalgWarning: distutils distribution has been initialized, it may be too late to add a subpackage linalgWarning: distutils distribution has been initialized, it may be too late to add an extension mtrandWarning: distutils distribution has been initialized, it may be too late to add a subpackage randomWarning: distutils distribution has been initialized, it may be too late to add a subpackage maWarning: distutils distribution has been initialized, it may be too late to add a subpackage matrixlibWarning: distutils distribution has been initialized, it may be too late to add a subpackage compatWarning: distutils distribution has been initialized, it may be too late to add a subpackage polynomialWarning: distutils distribution has been initialized, it may be too late to add a subpackage docWarning: distutils distribution has been initialized, it may be too late to add a subpackage numpy_configtest.o: In function `main':
remote: /tmp/easy_install-l8dp2j/numpy-1.8.0/_configtest.c:6: undefined reference to `exp'
remote: collect2: ld returned 1 exit status
remote: _configtest.c:1:20: error: Python.h: No such file or directory
remote: Traceback (most recent call last):
remote:   File "/var/lib/openshift/527c909734343c3753000002/app-root/runtime/repo/setup.py", line 13, in <module>
remote:     'numpy',
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/core.py", line 148, in setup
remote:     dist.run_commands()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 917, in run_commands
remote:     self.run_command(cmd)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 936, in run_command
remote:     cmd_obj.run()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/develop.py", line 27, in run
remote:     self.install_for_development()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/develop.py", line 129, in install_for_development
remote:     self.process_distribution(None, self.dist, not self.no_deps)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 688, in process_distribution
remote:     [requirement], self.local_index, self.easy_install
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 588, in resolve
remote:     dist = best[req.key] = env.best_match(req, self, installer)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 834, in best_match
remote:     return self.obtain(req, installer) # try and download/install
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 846, in obtain
remote:     return installer(requirement)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 604, in easy_install
remote:     return self.install_item(spec, dist.location, tmpdir, deps)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 634, in install_item
remote:     dists = self.install_eggs(spec, download, tmpdir)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 829, in install_eggs
remote:     return self.build_and_install(setup_script, setup_base)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 1109, in build_and_install
remote:     self.run_setup(setup_script, setup_base, args)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/easy_install.py", line 1095, in run_setup
remote:     run_setup(setup_script, args)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/sandbox.py", line 34, in run_setup
remote:     lambda: exec(compile(open(
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/sandbox.py", line 82, in run
remote:     return func()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/sandbox.py", line 37, in <lambda>
remote:     {'__file__':setup_script, '__name__':'__main__'})
remote:   File "setup.py", line 192, in <module>
remote:   File "setup.py", line 185, in setup_package
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/core.py", line 169, in setup
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/core.py", line 148, in setup
remote:     dist.run_commands()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 917, in run_commands
remote:     self.run_command(cmd)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 936, in run_command
remote:     cmd_obj.run()
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/virtenv/venv/lib/python3.3/site-packages/distribute-0.6.49-py3.3.egg/setuptools/command/bdist_egg.py", line 172, in run
remote:     self.run_command("egg_info")
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/cmd.py", line 313, in run_command
remote:     self.distribution.run_command(command)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 936, in run_command
remote:     cmd_obj.run()
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/command/egg_info.py", line 10, in run
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/cmd.py", line 313, in run_command
remote:     self.distribution.run_command(command)
remote:   File "/var/lib/openshift/527c909734343c3753000002/python/opt/lib/python3.3/distutils/dist.py", line 936, in run_command
remote:     cmd_obj.run()
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/command/build_src.py", line 153, in run
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/command/build_src.py", line 170, in build_sources
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
remote:   File "/tmp/easy_install-l8dp2j/numpy-1.8.0/numpy/distutils/command/build_src.py", line 386, in generate_sources
remote:   File "numpy/core/setup.py", line 427, in generate_config_h
remote:   File "numpy/core/setup.py", line 42, in check_types
remote:   File "numpy/core/setup.py", line 288, in check_types
remote: SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
<-----------snip------------>
Comment 11 Michal Fojtik 2013-11-08 05:11:33 EST
chunchen: This bug was about 2.7 python, I'm not sure about python3 perhaps a separate bug about numpy on python3?
Comment 12 chunchen 2013-11-08 05:57:46 EST
It's fixed,verified with python-2.7 on devenv_4008, sorry for the confusing, please refer to the following results:

1. Create a python-2.7 app
rhc app create cpy27 python-2.7
2. Modify the setup.py file to install cython as below:
cat setup.py
from setuptools import setup

setup(name='YourAppName', version='1.0',
      description='OpenShift Python-3.3 Community Cartridge based application',
      author='Your Name', author_email='ramr@example.org',
      url='http://www.python.org/sigs/distutils-sig/',

      #  Uncomment one or more lines below in the install_requires section
      #  for the specific client drivers/modules your application needs.
      install_requires=[ 'cython',
      ],
     )
3. Git push the changes
4. SSH into the app
rhc ssh cpy27
5. . python/virtenv/bin/activate
6. Install numpy
pip install numpy
7. Install ta-lib
pip install ta-lib

<----------snip---------->
    talib/func.c: At top level:
    /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:241: warning: ‘_import_umath’ defined but not used
    

    gcc -pthread -shared -L/usr/lib6464 build/temp.linux-x86_64-2.7/talib/func.o -L/usr/lib -L/usr/local/lib -L/opt/lib -L/opt/local/lib -L/opt/rh/python27/root/usr/lib64 -lta_lib -lpython2.7 -o build/lib.linux-x86_64-2.7/talib/func.so
    skipping 'talib/abstract.c' Cython extension (up-to-date)
    building 'talib.abstract' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/rh/python27/root/usr/include/python2.7 -c talib/abstract.c -o build/temp.linux-x86_64-2.7/talib/abstract.o
    In file included from /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760,
                     from /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                     from /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from talib/abstract.c:314:
    /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
    talib/abstract.c: In function ‘__pyx_pf_5talib_8abstract_14_ta_getFuncInfo’:
    talib/abstract.c:7673: warning: passing argument 2 of ‘TA_GetFuncInfo’ from incompatible pointer type
    /usr/include/ta-lib/ta_abstract.h:210: note: expected ‘const struct TA_FuncInfo **’ but argument is of type ‘struct TA_FuncInfo **’
    talib/abstract.c: In function ‘__pyx_pf_5talib_8abstract_16_ta_getInputParameterInfo’:
    talib/abstract.c:7984: warning: passing argument 3 of ‘TA_GetInputParameterInfo’ from incompatible pointer type
    /usr/include/ta-lib/ta_abstract.h:440: note: expected ‘const struct TA_InputParameterInfo **’ but argument is of type ‘struct TA_InputParameterInfo **’
    talib/abstract.c: In function ‘__pyx_pf_5talib_8abstract_18_ta_getOptInputParameterInfo’:
    talib/abstract.c:8272: warning: passing argument 3 of ‘TA_GetOptInputParameterInfo’ from incompatible pointer type
    /usr/include/ta-lib/ta_abstract.h:444: note: expected ‘const struct TA_OptInputParameterInfo **’ but argument is of type ‘struct TA_OptInputParameterInfo **’
    talib/abstract.c: In function ‘__pyx_pf_5talib_8abstract_20_ta_getOutputParameterInfo’:
    talib/abstract.c:8606: warning: passing argument 3 of ‘TA_GetOutputParameterInfo’ from incompatible pointer type
    /usr/include/ta-lib/ta_abstract.h:448: note: expected ‘const struct TA_OutputParameterInfo **’ but argument is of type ‘struct TA_OutputParameterInfo **’
    talib/abstract.c: In function ‘__pyx_f_5talib_8abstract___ta_getFuncHandle’:
    talib/abstract.c:9503: warning: passing argument 2 of ‘TA_GetFuncHandle’ from incompatible pointer type
    /usr/include/ta-lib/ta_abstract.h:154: note: expected ‘const TA_FuncHandle **’ but argument is of type ‘TA_FuncHandle **’
    talib/abstract.c: At top level:
    /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629: warning: ‘_import_array’ defined but not used
    /var/lib/openshift/527cba4b34343c3753000054/python/virtenv/lib/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:241: warning: ‘_import_umath’ defined but not used
    gcc -pthread -shared -L/usr/lib6464 build/temp.linux-x86_64-2.7/talib/abstract.o -L/usr/lib -L/usr/local/lib -L/opt/lib -L/opt/local/lib -L/opt/rh/python27/root/usr/lib64 -lta_lib -lpython2.7 -o build/lib.linux-x86_64-2.7/talib/abstract.so
    
Successfully installed ta-lib
Cleaning up...
Comment 13 andrzej_o 2013-11-09 05:29:09 EST
7. step does not work:
(virtenv)pip list
Babel (0.9.6)
Cython (0.19.2)
distribute (0.6.28)
docutils (0.10)
Extractor (0.6)
Flask (0.10.1)
itsdangerous (0.23)
Jinja2 (2.6)
MarkupSafe (0.11)
MySQL-python (1.2.3)
nose (1.2.1)
numpy (1.8.0)
pip (1.4)
psycopg2 (2.4.5)
Pygments (1.5)
setuptools (0.9.8)
simplejson (3.0.5)
Sphinx (1.1.3)
SQLAlchemy (0.7.9)
virtualenv (1.10.1)
Werkzeug (0.8.3)
wsgiref (0.1.2)
YourAppName (1.0)

(virtenv)pip install ta-lib
Downloading/unpacking ta-lib
  You are installing an externally hosted file. Future versions of pip will defa
ult to disallowing externally hosted files.
  You are installing a potentially insecure and unverifiable file. Future versio
ns of pip will default to disallowing insecure files.
  Downloading TA_Lib-0.4.7.zip (415kB): 415kB downloaded
  Running setup.py egg_info for package ta-lib

Installing collected packages: ta-lib
  Running setup.py install for ta-lib
    skipping 'talib/common.c' Cython extension (up-to-date)
    building 'talib.common' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D
_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -f
exceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GN
U_SOURCE -fPIC -fwrapv -fPIC -I/var/lib/openshift/527dff445973ca3f620003f7/pytho
n/virtenv/lib/python2.7/site-packages/numpy-1.8.0-py2.7-linux-x86_64.egg/numpy/c
ore/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/incl
ude -I/opt/rh/python27/root/usr/include/python2.7 -c talib/common.c -o build/tem
p.linux-x86_64-2.7/talib/common.o
    talib/common.c:314:28: error: ta-lib/ta_defs.h: No such file or directory
    talib/common.c:315:30: error: ta-lib/ta_common.h: No such file or directory
    talib/common.c:316:32: error: ta-lib/ta_abstract.h: No such file or director
y
    talib/common.c:317:28: error: ta-lib/ta_func.h: No such file or directory
    talib/common.c: In function '__pyx_f_5talib_6common__ta_check_success':
    talib/common.c:951: error: 'TA_SUCCESS' undeclared (first use in this functi
on)
    talib/common.c:951: error: (Each undeclared identifier is reported only once

    talib/common.c:951: error: for each function it appears in.)
    talib/common.c: In function '__pyx_pf_5talib_6common_2_ta_initialize':
    talib/common.c:1190: warning: implicit declaration of function 'TA_Initializ
e'
    talib/common.c: In function '__pyx_pf_5talib_6common_4_ta_shutdown':
    talib/common.c:1266: warning: implicit declaration of function 'TA_Shutdown'

    talib/common.c: In function 'initcommon':
    talib/common.c:1912: warning: implicit declaration of function 'TA_GetVersio
nString'
    talib/common.c:1912: warning: passing argument 1 of 'PyString_FromString' ma
kes pointer from integer without a cast
    /opt/rh/python27/root/usr/include/python2.7/stringobject.h:63: note: expecte
d 'const char *' but argument is of type 'int'
    error: command 'gcc' failed with exit status 1
    Complete output from command /var/lib/openshift/527dff445973ca3f620003f7/pyt
hon/virtenv/bin/python2.7 -c "import setuptools;__file__='/var/lib/openshift/527
dff445973ca3f620003f7/app-root/runtime/dependencies/python/virtenv/build/ta-lib/
setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'e
xec'))" install --record /tmp/pip-JAP7ST-record/install-record.txt --single-vers
ion-externally-managed --install-headers /var/lib/openshift/527dff445973ca3f6200
03f7/app-root/runtime/dependencies/python/virtenv/include/site/python2.7:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/talib

copying talib/test_abstract.py -> build/lib.linux-x86_64-2.7/talib

copying talib/test_data.py -> build/lib.linux-x86_64-2.7/talib

copying talib/deprecated.py -> build/lib.linux-x86_64-2.7/talib

copying talib/__init__.py -> build/lib.linux-x86_64-2.7/talib

copying talib/test_func.py -> build/lib.linux-x86_64-2.7/talib

running build_ext

skipping 'talib/common.c' Cython extension (up-to-date)

building 'talib.common' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/talib

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fe
xceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU
_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexce
ptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SO
URCE -fPIC -fwrapv -fPIC -I/var/lib/openshift/527dff445973ca3f620003f7/python/vi
rtenv/lib/python2.7/site-packages/numpy-1.8.0-py2.7-linux-x86_64.egg/numpy/core/
include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include
-I/opt/rh/python27/root/usr/include/python2.7 -c talib/common.c -o build/temp.li
nux-x86_64-2.7/talib/common.o

talib/common.c:314:28: error: ta-lib/ta_defs.h: No such file or directory

talib/common.c:315:30: error: ta-lib/ta_common.h: No such file or directory

talib/common.c:316:32: error: ta-lib/ta_abstract.h: No such file or directory

talib/common.c:317:28: error: ta-lib/ta_func.h: No such file or directory

talib/common.c: In function '__pyx_f_5talib_6common__ta_check_success':

talib/common.c:951: error: 'TA_SUCCESS' undeclared (first use in this function)

talib/common.c:951: error: (Each undeclared identifier is reported only once

talib/common.c:951: error: for each function it appears in.)

talib/common.c: In function '__pyx_pf_5talib_6common_2_ta_initialize':

talib/common.c:1190: warning: implicit declaration of function 'TA_Initialize'

talib/common.c: In function '__pyx_pf_5talib_6common_4_ta_shutdown':

talib/common.c:1266: warning: implicit declaration of function 'TA_Shutdown'

talib/common.c: In function 'initcommon':

talib/common.c:1912: warning: implicit declaration of function 'TA_GetVersionStr
ing'

talib/common.c:1912: warning: passing argument 1 of 'PyString_FromString' makes
pointer from integer without a cast

/opt/rh/python27/root/usr/include/python2.7/stringobject.h:63: note: expected 'c
onst char *' but argument is of type 'int'

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /var/lib/openshift/527dff445973ca3f620003f7/python/virtenv/bin/python2.7
 -c "import setuptools;__file__='/var/lib/openshift/527dff445973ca3f620003f7/app
-root/runtime/dependencies/python/virtenv/build/ta-lib/setup.py';exec(compile(op
en(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record
/tmp/pip-JAP7ST-record/install-record.txt --single-version-externally-managed --
install-headers /var/lib/openshift/527dff445973ca3f620003f7/app-root/runtime/dep
endencies/python/virtenv/include/site/python2.7 failed with error code 1 in /var
/lib/openshift/527dff445973ca3f620003f7/app-root/runtime/dependencies/python/vir
tenv/build/ta-lib
Traceback (most recent call last):
  File "/var/lib/openshift/527dff445973ca3f620003f7/python/virtenv/bin/pip", lin
e 12, in <module>
    load_entry_point('pip==1.4', 'console_scripts', 'pip')()
  File "/var/lib/openshift/527dff445973ca3f620003f7/app-root/runtime/dependencie
s/python/virtenv/lib/python2.7/site-packages/pip/__init__.py", line 147, in main

    return command.main(args[1:], options)
  File "/var/lib/openshift/527dff445973ca3f620003f7/app-root/runtime/dependencie
s/python/virtenv/lib/python2.7/site-packages/pip/basecommand.py", line 169, in m
ain
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 32: ordinal
 not in range(128)
Comment 14 andrzej_o 2013-11-09 05:31:00 EST
I think that the issue should be reopened. I have tried with easy_install ta-lib
easy_install ta-lib
Searching for ta-lib
Reading https://pypi.python.org/simple/ta-lib/
Reading http://github.com/mrjbq7/ta-lib
Best match: TA-Lib 0.4.7
Downloading https://github.com/mrjbq7/ta-lib/archive/TA_Lib-0.4.7.zip
Processing TA_Lib-0.4.7.zip
Writing /tmp/easy_install-gMjXFs/ta-lib-TA_Lib-0.4.7/setup.cfg
Running ta-lib-TA_Lib-0.4.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-g
MjXFs/ta-lib-TA_Lib-0.4.7/egg-dist-tmp-R9vI8B
talib/common.c:314:28: error: ta-lib/ta_defs.h: No such file or directory
talib/common.c:315:30: error: ta-lib/ta_common.h: No such file or directory
talib/common.c:316:32: error: ta-lib/ta_abstract.h: No such file or directory
talib/common.c:317:28: error: ta-lib/ta_func.h: No such file or directory
talib/common.c: In function '__pyx_f_5talib_6common__ta_check_success':
talib/common.c:951: error: 'TA_SUCCESS' undeclared (first use in this function)
talib/common.c:951: error: (Each undeclared identifier is reported only once
talib/common.c:951: error: for each function it appears in.)
talib/common.c: In function '__pyx_pf_5talib_6common_2_ta_initialize':
talib/common.c:1190: warning: implicit declaration of function 'TA_Initialize'
talib/common.c: In function '__pyx_pf_5talib_6common_4_ta_shutdown':
talib/common.c:1266: warning: implicit declaration of function 'TA_Shutdown'
talib/common.c: In function 'initcommon':
talib/common.c:1912: warning: implicit declaration of function 'TA_GetVersionStr
ing'
talib/common.c:1912: warning: passing argument 1 of 'PyString_FromString' makes
pointer from integer without a cast
/var/lib/openshift/527dff445973ca3f620003f7/python/virtenv/include/python2.7/str
ingobject.h:63: note: expected 'const char *' but argument is of type 'int'
error: Setup script exited with error: command 'gcc' failed with exit status 1
Comment 15 Michal Fojtik 2013-11-09 16:59:26 EST
andrzej_o: The issue has been fixed in our 'devenv' environment. Once the fix will be deployed to production (OpenShift Online), you should be able to install ta-lib successfully.

The VERIFIED here means that our QA was able to follow the steps you described without any problem (on devenv).

Thanks for reporting this bug, I hope the deploy to production will happen soon :)
Comment 16 chunchen 2014-01-07 03:23:05 EST
@Michal Fojtik, I filed a separate bug 1049199 to track the issue at Comment 10.

Note You need to log in before you can comment on or make changes to this bug.