Skip to content

Update SystemModules.md to succeed on OS X 10.11 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Documentation/SystemModules.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ The following files from the JPEG system-package are of interest:

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

Note that this package may be located elsewhere on your system, such as `/usr/local/` rather than `/usr/`.

Create a directory called `CJPEG` parallel to the `example` directory and create a file called `module.modulemap`:

example$ cd ..
Expand Down Expand Up @@ -177,7 +179,7 @@ And run it:

---

Please note that on Ubuntu 15.10 the above steps fail with:
Please note that on some platforms, the above steps fail with:

<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "/usr/include/jpeglib.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should local be added here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, addressed.

Expand All @@ -186,7 +188,7 @@ Please note that on Ubuntu 15.10 the above steps fail with:
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
^

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

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