Skip to content

Commit

Permalink
Fix MacOS linker deprecation, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Sep 28, 2024
1 parent 571776c commit c3c8c65
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Ex_Cldr_Collation v0.7.5

This is the changelog for Cldr_collation v0.7.5 released on September 29th, 2024. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_collation/tags)

### Bug fixes

* Remove deprecated linker option `-undefined suppress` in favour of `-undefined dynamic_lookup` on MacOS.

* Update README to illustrate how an installed `libicu` in the search path will take precendence over user the native `icucore` library.

## Ex_Cldr_Collation v0.7.4

This is the changelog for Cldr_collation v0.7.4 released on September 25th, 2024. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_collation/tags)
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ This initial version uses only the "root" locale collator which is the [CLDR DUC

### Installation on MacOS

On MacOS, the relevant headers are included in `ex_cldr_collation` and no additional installation is required.
On MacOS, the relevant headers are included in `ex_cldr_collation` and no additional installation is required. The build process will link to the MacOX native `icucore` library.

However it is also possible to use another installation of `libicu` if, for some reason, the native installation is not sufficiently up-to-date. An installed `icu4c` will take precedence over the native `icucore` library. For example, the following will install `icu4c` (which includes `libicu`), and link it into the standard search path. When compiling, this installation will take precendence.

```bash
% brew install icu4c
% brew link icu4c
# Remove any old build of the NIF that may have been linked to the native icucore lib
% rm ./deps/ex_cldr_collation/priv.ucol.so
% mix deps.compile ex_cldr_collation
```

### Installation on Linux

Expand Down
4 changes: 2 additions & 2 deletions c_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ ifeq ($(UNAME_SYS), Darwin)
ifeq ($(UNAME_ARCH), arm)
CC ?= cc
CFLAGS = -O3 -std=c99 -arch arm64 -Wall -Wmissing-prototypes
LDFLAGS = -arch arm64 -flat_namespace -undefined suppress
LDFLAGS = -arch arm64 -flat_namespace -undefined dynamic_lookup
else
CC ?= cc
CFLAGS = -O3 -std=c99 -arch x86_64 -Wall -Wmissing-prototypes
LDFLAGS = -arch x86_64 -flat_namespace -undefined suppress
LDFLAGS = -arch x86_64 -flat_namespace -undefined dynamic_lookup
endif
else ifeq ($(UNAME_SYS), FreeBSD)
CC ?= cc
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule CldrCollation.MixProject do
use Mix.Project

@version "0.7.4"
@version "0.7.5"

def project do
[
Expand Down

0 comments on commit c3c8c65

Please sign in to comment.