Giter Club home page Giter Club logo

Comments (42)

bodono avatar bodono commented on June 1, 2024

I just installed it successfully on a ubuntu machine. SCS requires scipy, which to build requires a fortran compiler:

http://www.scipy.org/scipylib/building/linux.html

I can't see in the message you posted where the failure came in, is that the entire message?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

No, there was more to the message. You can see the full message here: https://travis-ci.org/cvxgrp/cvxpy/builds/24664270

Scipy was already installed on the ubuntu machine, so it shouldn't be recompiling it. The errors may have come from installing scs in combination with ecos and cvxopt. Could you try "python setup.py install" with the expr_tree branch of cvxpy on an ubuntu machine with numpy and scipy but no scs?

from scs.

bodono avatar bodono commented on June 1, 2024

I tried "python setup.py install" with numpy and scipy already installed (with gfortran, blas and lapack, as was needed by scipy), and it installed scs, then ecos, then cvxopt all successfully.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

The ubuntu machine I've been talking about is the box on travis-ci. Here's what happens when it tries to pip install.

Installed /home/travis/anaconda/lib/python2.7/site-packages/toolz-0.6.0-py2.7.egg
Searching for scs>=1.0.1
Reading https://pypi.python.org/simple/scs/
Best match: scs 1.0.1
Downloading https://pypi.python.org/packages/source/s/scs/scs-1.0.1.tar.gz#md5=520dbebbefa0b51e2e3169a3764b5a7c
Processing scs-1.0.1.tar.gz
Writing /tmp/easy_install-cuQnsG/scs-1.0.1/setup.cfg
Running scs-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cuQnsG/scs-1.0.1/egg-dist-tmp-fq9ebS
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'

from scs.

bodono avatar bodono commented on June 1, 2024

If it can't find a fortran compiler how did it compile scipy, which requires a fortran compiler? Is it something to do with the anaconda distribution? Can you get the box to install gfortran first?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

conda has a prebuilt version of scipy. Does SCS need a fortran compiler even if scipy is built?

With gfortran SCS installs (with errors about _POSIX_C_SOURCE being redefined), but then when SCS is called it throws this error:

ERROR: Failure: ImportError (/home/travis/.python-eggs/scs-1.0.1-py2.7-linux-x86_64.egg-tmp/_scs_direct.so: undefined symbol: _gfortran_stop_numeric)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/anaconda/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/anaconda/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/anaconda/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/travis/build/cvxgrp/cvxpy/cvxpy/__init__.py", line 24, in <module>
    from problems.problem import Problem
  File "/home/travis/build/cvxgrp/cvxpy/cvxpy/problems/problem.py", line 40, in <module>
    import scs
  File "build/bdist.linux-x86_64/egg/scs.py", line 2, in <module>
  File "build/bdist.linux-x86_64/egg/_scs_direct.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/_scs_direct.py", line 6, in __bootstrap__
ImportError: /home/travis/.python-eggs/scs-1.0.1-py2.7-linux-x86_64.egg-tmp/_scs_direct.so: undefined symbol: _gfortran_stop_numeric

from scs.

bodono avatar bodono commented on June 1, 2024

I didn't know that it did, but apparently it needs to link against the fortran libraries, which I suppose makes sense in hindsight. It's in order to call the blas/lapack routines for solving SDPs, which are written in fortran 77 usually.

As for that error, I might have to explicitly link against libgfortran, but that will only work if the libraries are compiled with gfortran (and not, for example, g77). I'll try to recreate the error myself before I do that. The strange thing is I don't get that error anywhere else, on any other machine that I've tried, including ubuntu, even without explicitly linking against the library.

from scs.

bodono avatar bodono commented on June 1, 2024

I installed a fresh version of anaconda, and used the anaconda pip to install scs, then I used scs and it all worked. I don't know what's happening, but it seems to be specific to the travis box. How did you install gfortran on that box, and is the library installed in a standard location where the compiler could pick it up? I just used "sudo apt-get install gfortran". I'm going to close this for now because it seems to be specific to that box, and apparently not reproducible. If you can figure out a way to reproduce it on some other platform feel free to reopen it.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

That's fine. It probably is peculiar to travis. But since I use travis-ci
to verify commits, I can't add scs to the cvxpy master branch until the
installation works on travis. I'll try making a conda package for scs and
see if that helps.

On Fri, May 9, 2014 at 5:44 PM, bodono [email protected] wrote:

I installed a fresh version of anaconda, and used the anaconda pip to
install scs, then I used scs and it all worked. I don't know what's
happening, but it seems to be specific to the travis box. How did you
install gfortran on that box, and is the library installed in a standard
location where the compiler could pick it up? I just used "sudo apt-get
install gfortran". I'm going to close this for now because it seems to be
specific to that box, and apparently not reproducible. If you can figure
out a way to reproduce it on some other platform feel free to reopen it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42726743
.

from scs.

bodono avatar bodono commented on June 1, 2024

I see, if building a conda package doesn't work, is there a different travis setup you can use?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

I reproduced the bug on an ubuntu VM. The bug happens when atlas is installed through anaconda. Here's the exact script I followed:

wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh
-O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b
export PATH=/home//anaconda/bin:$PATH
conda update --yes conda

conda create -n testenv --yes python=2.7.6 atlas pip nose
numpy=1.7.1 scipy=0.13.2 cvxopt
source activate testenv

sudo apt-get install gfortran

git clone https://github.com/cvxgrp/cvxpy.git
cd cvxpy
git checkout expr_tree
python setup.py install
nosetests

from scs.

bodono avatar bodono commented on June 1, 2024

Ok, I've recreated it following your steps. I'll try to figure out what's going on.

from scs.

bodono avatar bodono commented on June 1, 2024

The root cause appears to be that the anaconda version of python + atlas is compiled with gcc v4.1. The later versions of gcc are not backwards compatible with 4.1, so when using later versions of gcc / gfortran to link against that compiled code it throws errors about missing symbols. One option is to compile scs with gcc 4.1, but getting gcc 4.1 is not that easy as it turns out. Did you have any luck making a conda package? That might work, I'm not sure. Another option would be to wait for anaconda to get to 2007, when gcc 4.2 was released. They're only 7 years behind! The default version of python that comes with ubuntu is (currently) compiled with gcc 4.8.2.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

I ran into a conda bug trying to make a package. All I really need though is a script that installs cvxpy and all it's dependencies on a clean ubuntu install. Ideally this will not involve building scipy. Do you have a script that does that?

from scs.

echu avatar echu commented on June 1, 2024

where do you use scipy, steven? we could remove the scipy dependencies and
switch to CVXOPT.

also, it might be worth bringing this up to the anaconda / continuum guys.

eric

On Sat, May 10, 2014 at 8:44 PM, Steven Diamond [email protected]:

I ran into a conda bug trying to make a package. All I really need though
is a script that installs cvxpy and all it's dependencies on a clean ubuntu
install. Ideally this will not involve building scipy. Do you have a script
that does that?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42761150
.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

I use scipy mainly for internal sparse matrices. It might be possible to
switch to cvxopt if we changed the ecos and scs interfaces to use cvxopt
sparse matrices. But scipy is woven in pretty tightly with the cvxpy code,
so I'm not ready to try this solution without more effort on a scs
installer.

On Sat, May 10, 2014 at 11:01 PM, Eric Chu [email protected] wrote:

where do you use scipy, steven? we could remove the scipy dependencies and
switch to CVXOPT.

also, it might be worth bringing this up to the anaconda / continuum guys.

eric

On Sat, May 10, 2014 at 8:44 PM, Steven Diamond [email protected]:

I ran into a conda bug trying to make a package. All I really need
though
is a script that installs cvxpy and all it's dependencies on a clean
ubuntu
install. Ideally this will not involve building scipy. Do you have a
script
that does that?


Reply to this email directly or view it on GitHub<
https://github.com/cvxgrp/scs/issues/9#issuecomment-42761150>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42763020
.

from scs.

bodono avatar bodono commented on June 1, 2024

I don't know of a way to quickly build these packages without scipy. Is the problem that building everything from scratch on travis takes too long?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

It does take a long time on travis, but the bigger issue is that requiring
people to build scipy themselves will make it much harder to install cvxpy.
There's so much more that can go wrong if you have to build scipy.

To be clear, we can use scipy. It would just be better if people could
install it through a package manager rather than building it themselves.

On Sun, May 11, 2014 at 1:30 PM, bodono [email protected] wrote:

I don't know of a way to quickly build these packages without scipy. Is
the problem that building everything from scratch on travis takes too long?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42782182
.

from scs.

bodono avatar bodono commented on June 1, 2024

Something other than pip? In that case we should figure out how to get SCS into a conda package, with all the correct builds etc. What bug did you encounter?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

pip still builds scipy, so that's not ideal. This was the conda bug:
Anaconda-Platform/anaconda-client#74

On Sun, May 11, 2014 at 6:45 PM, bodono [email protected] wrote:

Something other than pip? In that case we should figure out how to get SCS
into a conda package, with all the correct builds etc. What bug did you
encounter?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42790334
.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

If you could make a conda package, I would appreciate that enormously. Having multiple versions of cvxpy is becoming a huge mess.

from scs.

bodono avatar bodono commented on June 1, 2024

I'll give it a shot when my binstar account comes through.

from scs.

echu avatar echu commented on June 1, 2024

in the worst case, we can switch back to cvxopt. i have some old code lying
around that uses CVXOPT matrices instead of scipy sparse matrices. i assume
it should be the same process for SCS.

not sure how the change would propagate through CVXPY, though.

anyway, just keep that in mind: we can always ditch the scipy dependency if
absolutely necessary.

On Sun, May 11, 2014 at 7:58 PM, bodono [email protected] wrote:

I'll give it a shot when my binstar account comes through.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42792723
.

from scs.

bodono avatar bodono commented on June 1, 2024

That's seems a bit drastic for now, are the cvxopt sparse matrices in any way better than the scipy ones? I think I'll try and make a conda package first.

from scs.

echu avatar echu commented on June 1, 2024

They're just more consistent even though less widely used.

It is drastic to use them over the scipy matrices, but it's always a
potential fallback.

Eric

On Monday, May 12, 2014, bodono [email protected] wrote:

That's seems a bit drastic for now, are the cvxopt sparse matrices in any
way better than the scipy ones? I think I'll try and make a conda package
first.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42863545
.

from scs.

bodono avatar bodono commented on June 1, 2024

I can't get a package built working with conda. Can you make SCS an optional dependency for now? As soon as the continuum guys update their builds to use gcc >= 4.2 it shouldn't be a problem, but who knows when that will be.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

Maybe there's another way besides making a conda package. For instance, how
does the pip installer work on mac? I have scipy installed through conda,
but it worked fine for me. It's ok if people can't use the conda atlas.
Atlas is super easy to install on ubuntu.

On Mon, May 12, 2014 at 7:15 PM, bodono [email protected] wrote:

I can't get a package built working with conda. Can you make SCS an
optional dependency for now? As soon as the continuum guys update their
builds to use gcc >= 4.2 it shouldn't be a problem, but who knows when that
will be.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42910446
.

from scs.

bodono avatar bodono commented on June 1, 2024

Pip has worked fine for me so far on my mac. So you're suggesting building atlas with pip and scipy with conda? That might work.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

Or build atlas with apt-get. I've been using this:
sudo apt-get install -qq libatlas3gf-base libatlas-dev

On Mon, May 12, 2014 at 7:25 PM, bodono [email protected] wrote:

Pip has worked fine for me so far on my mac. So you're suggesting building
atlas with pip and scipy with conda? That might work.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42910890
.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

Here's a script that works. I had to ditch anaconda.

sudo apt-get install python-numpy python-scipy python-pip
sudo apt-get install libatlas-base-dev gfortran
sudo pip install cvxpy

Sadly this won't work on travis because they have some weird version of
ubuntu that has an old scipy for python-scipy, but I can find some other
way.

On Mon, May 12, 2014 at 7:29 PM, Steven Diamond [email protected]:

Or build atlas with apt-get. I've been using this:
sudo apt-get install -qq libatlas3gf-base libatlas-dev

On Mon, May 12, 2014 at 7:25 PM, bodono [email protected] wrote:

Pip has worked fine for me so far on my mac. So you're suggesting
building atlas with pip and scipy with conda? That might work.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42910890
.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

@bodono would you mind submitting an issue on conda about gcc? Maybe there's some work around, or at least they may get to it faster.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

Any idea what went wrong here? I'm very close to installing scs on travis.

Installed /home/travis/anaconda/envs/testenv/lib/python2.7/site-packages/toolz-0.6.0-py2.7.egg
Searching for scs>=1.0.1
Reading https://pypi.python.org/simple/scs/
Best match: scs 1.0.2
Downloading https://pypi.python.org/packages/source/s/scs/scs-1.0.2.tar.gz#md5=6acc5623b09585138ea0bff7b02fa6d7
Processing scs-1.0.2.tar.gz
Writing /tmp/easy_install-7n8IiA/scs-1.0.2/setup.cfg
Running scs-1.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7n8IiA/scs-1.0.2/egg-dist-tmp-2Fd4sD
ATLAS version 3.8.4 built by buildd on Sat Sep 10 23:12:12 UTC 2011:
   UNAME    : Linux crested 2.6.24-29-server #1 SMP Wed Aug 10 15:58:57 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
   INSTFLG  : -1 0 -a 1
   ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_HAMMER -DATL_CPUMHZ=1993 -DATL_USE64BITS -DATL_GAS_x8664
   F2CDEFS  : -DAdd_ -DF77_INTEGER=int -DStringSunStyle
   CACHEEDGE: 393216
   F77      : gfortran, version GNU Fortran (Ubuntu/Linaro 4.6.1-9ubuntu2) 4.6.1
   F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -Wa,--noexecstack -fPIC -m64
   SMC      : gcc, version gcc (Ubuntu/Linaro 4.6.1-9ubuntu2) 4.6.1
   SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -Wa,--noexecstack -fPIC -m64
   SKC      : gcc, version gcc (Ubuntu/Linaro 4.6.1-9ubuntu2) 4.6.1
   SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -Wa,--noexecstack -fPIC -m64
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_dump.c:16:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /home/travis/anaconda/envs/testenv/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from /home/travis/anaconda/envs/testenv/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from scsmodule.c:6:
/home/travis/anaconda/envs/testenv/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" [-Wcpp]
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_aat.c:18:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_preprocess.c:19:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_post_tree.c:13:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/amd_global.c:12:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
linsys/direct/external/amd_global.c:76:41: warning: initialization from incompatible pointer type [enabled by default]
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_defaults.c:15:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_info.c:15:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_control.c:16:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_1.c:27:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_postorder.c:13:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_valid.c:36:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_2.c:16:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
In file included from /home/travis/anaconda/envs/testenv/include/python2.7/Python.h:8:0,
                 from include/glbopts.h:12,
                 from linsys/direct/external/SuiteSparse_config.h:45,
                 from linsys/direct/external/amd.h:46,
                 from linsys/direct/external/amd_internal.h:168,
                 from linsys/direct/external/amd_order.c:15:
/home/travis/anaconda/envs/testenv/include/python2.7/pyconfig.h:1179:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
/usr/bin/ld: cannot find -lptf77blas
/usr/bin/ld: cannot find -lptcblas
/usr/bin/ld: cannot find -lptf77blas
/usr/bin/ld: cannot find -lptcblas
collect2: ld returned 1 exit status
/usr/bin/ld: cannot find -lptf77blas
/usr/bin/ld: cannot find -lptcblas
/usr/bin/ld: cannot find -lptf77blas
/usr/bin/ld: cannot find -lptcblas
collect2: ld returned 1 exit status
error: Setup script exited with error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.7/scsmodule.o build/temp.linux-x86_64-2.7/src/cones.o build/temp.linux-x86_64-2.7/src/linAlg.o build/temp.linux-x86_64-2.7/src/util.o build/temp.linux-x86_64-2.7/src/cs.o build/temp.linux-x86_64-2.7/src/scs.o build/temp.linux-x86_64-2.7/linsys/direct/private.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_post_tree.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_control.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_valid.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_aat.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_info.o build/temp.linux-x86_64-2.7/linsys/direct/external/ldl.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_global.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_postorder.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_order.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_dump.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_preprocess.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_1.o build/temp.linux-x86_64-2.7/linsys/direct/external/SuiteSparse_config.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_defaults.o build/temp.linux-x86_64-2.7/linsys/direct/external/amd_2.o -L/home/travis/anaconda/envs/testenv/lib -lm -lrt -lptf77blas -lptcblas -latlas -llapack -lptf77blas -lptcblas -latlas -lpython2.7 -o build/lib.linux-x86_64-2.7/_scs_direct.so" failed with exit status 1

from scs.

bodono avatar bodono commented on June 1, 2024

I think if you want scipy to link against atlas then you probably need to build that first, and you shouldn't need to install gfortran typically. This works for me on ubuntu:

sudo apt-get install libatlas-base-dev
sudo apt-get install python-numpy python-scipy python-pip
sudo pip install cvxpy scs

from scs.

bodono avatar bodono commented on June 1, 2024

Oh, I think I know what went wrong there (with your travis install). I'll push a change to github, is there an easy way to test it on travis without publishing to pypi?

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

Not that I know of. Would you mind updating the pypi package?

On Tue, May 13, 2014 at 12:04 PM, bodono [email protected] wrote:

Oh, I think I know what went wrong there (with your travis install). I'll
push a change to github, is there an easy way to test it on travis without
publishing to pypi?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42997989
.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

This is the travis install script, BTW. The reason this is so complicated is I can't use apt-get install python-scipy because it fetches an old version.

sudo apt-get install -qq libatlas-base-dev gfortran
export ATLAS="/usr/lib/atlas-base/libatlas.so"
deactivate
wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh \
        -O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b
export PATH=/home/travis/anaconda/bin:$PATH
conda update --yes conda
conda create -n testenv --yes python="2.7" pip nose \
        numpy scipy cvxopt
source activate testenv
python setup.py install

from scs.

echu avatar echu commented on June 1, 2024

can you do a

sudo apt-get update -qq

before running the whole thing?

eric

On Tue, May 13, 2014 at 12:12 PM, Steven Diamond
[email protected]:

This is the travis install script, BTW. The reason this is so complicated
is I can't use apt-get install python-scipy because it fetches an old
version.

sudo apt-get install -qq libatlas-base-dev gfortran
export ATLAS="/usr/lib/atlas-base/libatlas.so"
deactivate
wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh
-O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b
export PATH=/home/travis/anaconda/bin:$PATH
conda update --yes conda
conda create -n testenv --yes python="2.7" pip nose
numpy scipy cvxopt
source activate testenv
python setup.py install


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42998942
.

from scs.

bodono avatar bodono commented on June 1, 2024

Ok, I pushed something that might work to pypi, try it now.

from scs.

SteveDiamond avatar SteveDiamond commented on June 1, 2024

It worked!!! Thanks so much for all your help! Eric, your suggestion worked
too but there were still problems with scipy.

On Tue, May 13, 2014 at 1:25 PM, bodono [email protected] wrote:

Ok, I pushed something that might work to pypi, try it now.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-43007826
.

from scs.

echu avatar echu commented on June 1, 2024

okay, well, glad to know that it's fixed now. what was the fix / problem?

On Tue, May 13, 2014 at 3:25 PM, Steven Diamond [email protected]:

It worked!!! Thanks so much for all your help! Eric, your suggestion
worked
too but there were still problems with scipy.

On Tue, May 13, 2014 at 1:25 PM, bodono [email protected] wrote:

Ok, I pushed something that might work to pypi, try it now.


Reply to this email directly or view it on GitHub<
https://github.com/cvxgrp/scs/issues/9#issuecomment-43007826>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-43021188
.

from scs.

bodono avatar bodono commented on June 1, 2024

In scs I had to include the library_dirs that you get from atlas, which I had forgotten before now.

from scs.

diego898 avatar diego898 commented on June 1, 2024

hello all, just wanted to link this here as well for reference: a post on continuums google groups about the version of gcc the libraries are built with:

https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/cB2lmykcxMI

from scs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.