<p dir="auto">Hi guys,<br>
I tried everything but cannot find any solution. Please help. thanks a lot.</p>
<p dir="auto">The following is from the compilation:</p>
<p dir="auto">compiling C sources</p>
<p dir="auto">C compiler: gcc -m64 -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -DHAVE_NCURSES_H -fPIC</p>
<p dir="auto">compile options: '-DNO_ATLAS_INFO=1 -Isklearn/src/cblas -I/users/home/aagns9c3/django_projects/epd/lib/python2.7/site-packages/numpy/core/include -I/users/home/aagns9c3/django_projects/epd/lib/python2.7/site-packages/numpy/core/include -I/users/home/aagns9c3/django_projects/epd/include/python2.7 -c'</p>
<p dir="auto">gcc: sklearn/utils/arrayfuncs.c</p>
<p dir="auto">In file included from sklearn/utils/arrayfuncs.c:241:</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c: In function `float_cholesky_delete':</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:55: error: syntax error before numeric constant</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:58: warning: passing arg 2 of `cblas_scopy' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:58: warning: passing arg 4 of `cblas_scopy' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:59: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:62: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:65: warning: passing arg 1 of `cblas_srotg' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:65: warning: passing arg 2 of `cblas_srotg' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:66: error: subscripted value is neither array nor pointer</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:72: error: subscripted value is neither array nor pointer</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:73: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:76: warning: passing arg 2 of `cblas_srot' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:76: warning: passing arg 4 of `cblas_srot' makes pointer from integer without a cast</p>
<p dir="auto">In file included from sklearn/utils/arrayfuncs.c:241:</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c: In function `float_cholesky_delete':</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:55: error: syntax error before numeric constant</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:58: warning: passing arg 2 of `cblas_scopy' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:58: warning: passing arg 4 of `cblas_scopy' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:59: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:62: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:65: warning: passing arg 1 of `cblas_srotg' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:65: warning: passing arg 2 of `cblas_srotg' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:66: error: subscripted value is neither array nor pointer</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:72: error: subscripted value is neither array nor pointer</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:73: error: invalid lvalue in assignment</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:76: warning: passing arg 2 of `cblas_srot' makes pointer from integer without a cast</p>
<p dir="auto">sklearn/utils/src/cholesky_delete.c:76: warning: passing arg 4 of `cblas_srot' makes pointer from integer without a cast</p>
<p dir="auto">error: Command "gcc -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -DHAVE_NCURSES_H -fPIC -DNO_ATLAS_INFO=1 -Isklearn/src/cblas -I/users/home/aagns9c3/django_projects/epd/lib/python2.7/site-packages/numpy/core/include -I/users/home/aagns9c3/django_projects/epd/lib/python2.7/site-packages/numpy/core/include -I/users/home/aagns9c3/django_projects/epd/include/python2.7 -c sklearn/utils/arrayfuncs.c -o build/temp.solaris-2.11-i86pc-2.7/sklearn/utils/arrayfuncs.o" failed with exit status 1</p>
<hr>
<p dir="auto">Command /users/home/aagns9c3/django_projects/recco_site/bin/python -c "import setuptools;<strong>file</strong>='/users/home/aagns9c3/django_projects/recco_site/build/scikit-learn/setup.py';execfile(<strong>file</strong>)" install --single-version-externally-managed --record /tmp/pip-yWjH4h-record/install-record.txt --install-headers /users/home/aagns9c3/django_projects/recco_site/include/site/python2.7 failed with error code 1<br>
Exception information:<br>
Traceback (most recent call last):<br>
File "/users/home/aagns9c3/django_projects/recco_site/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg/pip/basecommand.py", line 130, in main<br>
self.run(options, args)<br>
File "/users/home/aagns9c3/django_projects/recco_site/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg/pip/commands/install.py", line 228, in run<br>
requirement_set.install(install_options, global_options)<br>
File "/users/home/aagns9c3/django_projects/recco_site/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg/pip/req.py", line 1043, in install<br>
requirement.install(install_options, global_options)<br>
File "/users/home/aagns9c3/django_projects/recco_site/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg/pip/req.py", line 559, in install<br>
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)<br>
File "/users/home/aagns9c3/django_projects/recco_site/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg/pip/<strong>init</strong>.py", line 249, in call_subprocess<br>
% (command_desc, proc.returncode))<br>
InstallationError: Command /users/home/aagns9c3/django_projects/recco_site/bin/python -c "import setuptools;<strong>file</strong>='/users/home/aagns9c3/django_projects/recco_site/build/scikit-learn/setup.py';execfile(<strong>file</strong>)" install --single-version-externally-managed --record /tmp/pip-yWjH4h-record/install-record.txt --install-headers /users/home/aagns9c3/django_projects/recco_site/include/site/python2.7 failed with error code 1<br>
:</p>
<p dir="auto">Building failed on a Solaris system with the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sklearn/utils/src/cholesky_delete.c:55:13: error: expected identifier or ‘(’ before numeric constant"><pre class="notranslate"><code class="notranslate">sklearn/utils/src/cholesky_delete.c:55:13: error: expected identifier or ‘(’ before numeric constant
</code></pre></div>
<p dir="auto">There's also same error reported for Cygwin:</p>
<p dir="auto"><a href="http://permalink.gmane.org/gmane.comp.python.scikit-learn/3353" rel="nofollow">http://permalink.gmane.org/gmane.comp.python.scikit-learn/3353</a></p>
<p dir="auto">It turns out in <code class="notranslate">cholesky_delete.c</code> it has a variable named <code class="notranslate">_L</code>, but the <code class="notranslate">_L</code> is defined somewhere as a macro, put a <code class="notranslate">#undef _L</code> fixes the build error. But a proper fix should be rename the <code class="notranslate">_L</code> to something else..</p>