Opened 12 years ago

Closed 11 years ago

#38887 closed defect (fixed)

py-cvxopt lapack import error

Reported by: jjstickel (Jonathan Stickel) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc: mnick@…, jfilippidis@…, annleeh83@…
Port: py-cvxopt

Description

py-cvxopt (py27-cvxopt tested) throws errors when importing cvxopt.lapack in python:

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cvxopt/lapack.so, 2): Symbol not found: _ATL_dgemaxnrm
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cvxopt/lapack.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cvxopt/lapack.so

This happens with either -atlas or +atlas variants. With -atlas, apple Accelerator Framework libs seems to be linked, but the symbol is not there. With the existing +atlas variant, the atlas libraries are (silently) not found.

In the attached patch, I upgrade py-cvxopt to 1.1.5 and correct the configure so that the atlas libraries can be found. This does not resolve the issue for the -atlas variant, however.

I am also using "-dsdp" because dsdp currently will not build with the current version of atlas (see #35851 and #37097).

Attachments (3)

py-cvxopt_Portfile.diff (1.8 KB) - added by jjstickel (Jonathan Stickel) 11 years ago.
py-cvxopt_Portfile.2.diff (4.1 KB) - added by jjstickel (Jonathan Stickel) 11 years ago.
now for cvxopt-1.1.6
py-cvxopt_Portfile.3.diff (4.8 KB) - added by jjstickel (Jonathan Stickel) 11 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 12 years ago by Veence (Vincent)

To my knowledge, Apple accelerate framework does not include Lapack, just cblas, but I can be mistaken.

comment:2 in reply to:  1 Changed 12 years ago by jjstickel (Jonathan Stickel)

Replying to vince@…:

To my knowledge, Apple accelerate framework does not include Lapack, just cblas, but I can be mistaken.

On my Mac (10.7.5), I see

lrwxr-xr-x 1 root wheel 118 Feb  1  2012 /usr/lib/liblapack.dylib -> ../../System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

But when I look for _ATL_dgemaxnrm in that library, it isn't there, whereas it is in /opt/local/lib/libtatlas.dylib:

$ nm -j /usr/lib/liblapack.dylib | grep dgemaxnrm
<nothing returned>
$ nm -j /opt/local/lib/libtatlas.dylib | grep dgemaxnrm
_ATL_dgemaxnrm

So I guess building py-cvxopt with Apple accelerate framework should not be an option.

comment:3 Changed 11 years ago by jjstickel (Jonathan Stickel)

Updated patch to account for r106066.

comment:4 Changed 11 years ago by mf2k (Frank Schima)

Keywords: haspatch added; atlas removed
Owner: changed from macports-tickets@… to mnick@…

@ jjstickel: Please do not change the $Id line

Changed 11 years ago by jjstickel (Jonathan Stickel)

Attachment: py-cvxopt_Portfile.diff added

comment:5 in reply to:  4 Changed 11 years ago by jjstickel (Jonathan Stickel)

Replying to macsforever2000@…:

@ jjstickel: Please do not change the $Id line

I had modified a previous version of the Portfile (before the latest revision bump), and hence the changed header line. I fixed the patch and have reattached it.

Changed 11 years ago by jjstickel (Jonathan Stickel)

Attachment: py-cvxopt_Portfile.2.diff added

now for cvxopt-1.1.6

comment:6 Changed 11 years ago by jjstickel (Jonathan Stickel)

I just noticed 1.1.6 is the most recent version of cvxopt, and so I have updated the patch for 1.1.6. I changed the allowed python versions to be 27, 31, 32, 33, as that is what the cvxopt documentation says is supported. I have only tested with 27.

Finally, I notice that cvxopt comes with documentation and examples. Someone might be interested in adding variants to install these. I don't have time right now.

comment:7 Changed 11 years ago by jfilippidis@…

Cc: jfilippidis@… added

Cc Me!

comment:8 Changed 11 years ago by annleeh83@…

Cc: annleeh83@… added

Cc Me!

comment:9 Changed 11 years ago by mf2k (Frank Schima)

Owner: changed from mnick@… to macports-tickets@…

mnick has retired.

Changed 11 years ago by jjstickel (Jonathan Stickel)

Attachment: py-cvxopt_Portfile.3.diff added

comment:10 Changed 11 years ago by jjstickel (Jonathan Stickel)

I have updated the patch to re-add dsdp as a default variant now that #35851 has been fixed. I also made myself maintainer (including openmaintainter) because mnick has retired. Finally, I made revisions to account for the sources now being on github.

Also see #40754 which requests an update to py-cvxopt. I include the update in the patch I provide here.

I think this patch is ready for committing. Let me know if anything is amiss.

comment:11 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Status: newassigned

Thanks. I’ll take a look.

comment:12 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

This should be taken care of by [115611,115616:115618].

Note that I overhauled the way the variants work, using two patches to replace most of the old reinplaces. Please let me know if I broke something.

comment:13 Changed 11 years ago by larryv (Lawrence Velázquez)

Er. The checksums seemed to be wrong. r115619

comment:14 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: closedreopened

Actually… this doesn’t fix the issue with Accelerator.framework, right?

comment:15 in reply to:  14 ; Changed 11 years ago by jjstickel (Jonathan Stickel)

Replying to larryv@…:

Actually… this doesn’t fix the issue with Accelerator.framework, right?

It seems that the problem has gone away, probably with the version update of cvxopt. I successfully installed and tested cvxopt with and without the atlas variant. Without the atlas variant I confirmed that the cvxopt blas/lapack libs link against Accelerator.framework.

comment:16 in reply to:  15 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: reopenedclosed

Alright, great.

Note: See TracTickets for help on using tickets.