Skip to content

Fix suitesparse / cvxopt path configuration for Apple Silicon, Alpine Linux #31905

@kcrisman

Description

@kcrisman

I was able to successfully build Sage on M1 (see #30592) but had two main types of doctest errors.

> However, I did see some of this type as well in the sage/numerical tests: 
> 
> ImportError: dlopen(/Users/karl.crisman/Downloads/BrewSage/sage-9.4.beta0/local/lib/python3.9/site-packages/cvxopt/cholmod.cpython-39-darwin.so, 2): Symbol not found: _cholmod_l_allocate_dense 
> Referenced from: /Users/karl.crisman/Downloads/BrewSage/sage-9.4.beta0/local/lib/python3.9/site-packages/cvxopt/cholmod.cpython-39-darwin.so 
> Expected in: flat namespace 
> in /Users/karl.crisman/Downloads/BrewSage/sage-9.4.beta0/local/lib/python3.9/site-packages/cvxopt/cholmod.cpython-39-darwin.so 


otool -L /Users/karl.crisman/Downloads/BrewSage/sage-9.4.beta0/local/lib/python3.9/site-packages/cvxopt/cholmod.cpython-39-darwin.so 


/Users/karl.crisman/Downloads/BrewSage/sage-9.4.beta0/local/lib/python3.9/site-packages/cvxopt/cholmod.cpython-39-darwin.so:
	/opt/homebrew/opt/openblas/lib/libopenblas.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5) 

This apparently requires a change in the setup.py (see this sage-devel discussion):

if sys.platform.startswith("darwin"): 
SUITESPARSE_LIB_DIR = '/usr/local/lib' 
SUITESPARSE_INC_DIR = '/usr/local/include' 

to allow /opt/homebrew.

Upstream: Reported upstream. No feedback yet.

CC: @dimpase @mkoeppe @orlitzky @kiwifb

Component: porting

Issue created by migration from https://trac.sagemath.org/ticket/31905

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions