haskell / haskell/text-icu

`ld: warning: search path '/usr/local/opt/icu4c/lib' not found` on ghcup GHC+cabal & homebrew icu4c setup

Open
#107 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
50
Forks
41
PR merge metrics
No merged PRs in 30d

Description

cabal build raises
`ld: warning: search path '/usr/local/opt/icu4c/lib' not found`

environment:
GHC 9.10.1
cabal 3.12.1.0
_managed through ghcup_

icu4c managed through homebrew:
```
> brew info icu4c
==> icu4c@76: stable 76.1 (bottled) [keg-only]
C/C++ and Java libraries for Unicode and globalization
https://icu.unicode.org/home
Installed
/opt/homebrew/Cellar/icu4c@76/76.1_1 (277 files, 81MB) *
Poured from bottle using the formulae.brew.sh API on 2024-11-11 at 14:41:47
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/i/icu4c@76.rb
License: ICU
==> Caveats
icu4c@76 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c@76 first in your PATH, run:
fish_add_path /opt/homebrew/opt/icu4c@76/bin
fish_add_path /opt/homebrew/opt/icu4c@76/sbin

For compilers to find icu4c@76 you may need to set:
set -gx LDFLAGS "-L/opt/homebrew/opt/icu4c@76/lib"
set -gx CPPFLAGS "-I/opt/homebrew/opt/icu4c@76/include"

For pkg-config to find icu4c@76 you may need to set:
set -gx PKG_CONFIG_PATH "/opt/homebrew/opt/icu4c@76/lib/pkgconfig"
```

```
> echo $PKG_CONFIG_PATH
/opt/homebrew/opt/icu4c@76/lib/pkgconfig
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the cabal build with GHC 9.10.1, cabal 3.12.1.0, ghcup, and Homebrew icu4c@76 on the reported macOS setup. Inspect how the package discovers ICU during linking; done when the build no longer searches for the missing /usr/local/opt/icu4c/lib path.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.