Skip to content

Commit f7a8ec1

Browse files
committed
Use patch file for Make.inc
1 parent b4350f2 commit f7a8ec1

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

docs/installation/linux.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ SPOOLES can be obtained from the official [SPOOLES webpage](http://www.netlib.or
112112
wget http://ftp.de.debian.org/debian/pool/main/s/spooles/spooles_2.2.orig.tar.gz
113113
mkdir spooles
114114
tar -zxf spooles_2.2.orig.tar.gz -C spooles
115+
cd spooles
115116
```
116117

117-
Open `Make.inc` (located in the root of the extracted `spooles` folder) in a text editor and remove the line `CC = /usr/lang-4.0/bin/cc`. This will let it use the default compiler on your system (otherwise it will throw an error).
118-
119-
To build it, cd to the directory where you extracted SPOOLES and do `make lib`.
118+
The `Make.inc` file (located in the root of the extracted `spooles` folder) needs to be patched before SPOOLES can be successfully built. Patch and build the library as below.
120119

121120
```bash
122-
cd spooles
121+
curl -O https://raw.githubusercontent.com/sdpa-python/sdpa-multiprecision/main/spooles/patches/patch-Make.inc
122+
patch -p0 < patch-Make.inc
123123
make lib
124124
```
125125

@@ -129,9 +129,6 @@ By default, the `Makefile` will load the code into `spooles.a` and this may caus
129129
mv spooles.a libspooles.a
130130
```
131131

132-
{: .warning }
133-
SPOOLES may clash with GLIBC on some distributions. If that happens when you run `python setup.py install` later, you will need to rebuild SPOOLES with the `-fPIC` flag. This flag can be added to `CFLAGS` in the same `Make.inc` file.
134-
135132
### Obtain and prepare `sdpa-python` for build
136133

137134
You can obtain it by

docs/installation/macos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ SPOOLES can be obtained from the official [SPOOLES webpage](http://www.netlib.or
116116
curl -O http://ftp.de.debian.org/debian/pool/main/s/spooles/spooles_2.2.orig.tar.gz
117117
mkdir spooles
118118
tar -zxf spooles_2.2.orig.tar.gz -C spooles
119+
cd spooles
119120
```
120121

121-
Open `Make.inc` (located in the root of the extracted `spooles` folder) in a text editor and remove the line `CC = /usr/lang-4.0/bin/cc`. This will let it use the default compiler on your system (otherwise it will throw an error).
122-
123-
To build it, cd to the directory where you extracted SPOOLES and do `make lib`.
122+
The `Make.inc` file (located in the root of the extracted `spooles` folder) needs to be patched before SPOOLES can be successfully built. Patch and build the library as below.
124123

125124
```bash
126-
cd spooles
125+
curl -O https://raw.githubusercontent.com/sdpa-python/sdpa-multiprecision/main/spooles/patches/patch-Make.inc
126+
patch -p0 < patch-Make.inc
127127
make lib
128128
```
129129

0 commit comments

Comments
 (0)