Skip to content

Commit af7a6e8

Browse files
committed
Update SystemModules.md to reflect that jpeg may be installed elsewhere
El Capitan's System Integrity Protection prevents the user from installing anything in `/usr/include` or `/usr/lib`, so use `/usr/local` instead, which is also where Homebrew installs `jpeg`. Also remove the statement about Homebrew’s jpeglib.h being correct because that's false.
1 parent ca894ff commit af7a6e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Documentation/SystemModules.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The following files from the JPEG system-package are of interest:
2929

3030
Swift packages that provide module maps for system libraries are handled differently from regular Swift packages.
3131

32+
Note that this package may be located elsewhere on your system, such as `/usr/local/` rather than `/usr/`.
33+
3234
Create a directory called `CJPEG` parallel to the `example` directory and create a file called `module.modulemap`:
3335

3436
example$ cd ..
@@ -177,7 +179,7 @@ And run it:
177179
178180
---
179181

180-
Please note that on Ubuntu 15.10 the above steps fail with:
182+
Please note that on some platforms, the above steps fail with:
181183

182184
<module-includes>:1:10: note: in file included from <module-includes>:1:
183185
#include "/usr/include/jpeglib.h"
@@ -186,7 +188,7 @@ Please note that on Ubuntu 15.10 the above steps fail with:
186188
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
187189
^
188190

189-
This is because `jpeglib.h` is not a correct module as bundled with Ubuntu (Homebrew’s jpeglib.h is correct however).
191+
This is because `jpeglib.h` is not a correct module.
190192
To fix this you need to add `#include <stdio.h>` to the top of jpeglib.h.
191193

192194
JPEG lib itself needs to be patched, but since this situation will be common we intend to add a workaround system in module packages.

0 commit comments

Comments
 (0)