Skip to content

Add phonenumber -> libphonenumber mapping #2175

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
Mar 27, 2024

Conversation

JackKelly-Bellroy
Copy link
Contributor

No description provided.

@michaelpj
Copy link
Collaborator

Have you got an example of a package that uses this, OOI?

@JackKelly-Bellroy
Copy link
Contributor Author

Someone has made a library that calls into it:

https://github.com/typeable/libphonenumber/blob/5e03e45e2ef02b17a9d0ec3b1e951ef7214cba4a/libphonenumber.cabal#L77-L78

But I don't have any publicly available code that consumes the Haskell phonenumber library.

@mrBliss
Copy link
Contributor

mrBliss commented Mar 27, 2024

We use phonenumber too and have a similar mapping in our code, so a +1 from me. The code is private, though.

@michaelpj
Copy link
Collaborator

Thanks!

@michaelpj michaelpj merged commit f222ed6 into input-output-hk:master Mar 27, 2024
@JackKelly-Bellroy JackKelly-Bellroy deleted the libphonenumber branch March 28, 2024 00:26
@JackKelly-Bellroy
Copy link
Contributor Author

JackKelly-Bellroy commented May 15, 2024

@mrBliss How did you get Haskell packages that depend upon phonenumber to compile properly? We are hitting missing symbol errors that look like they come from icu:

Error relocating /nix/store/hkarhp3g68y0912xn43xlmxpwmik1csr-phonenumber-x86_64-unknown-linux-musl-8.13.36/lib/libphonenumber.so.8: _ZN6icu_736UStackD1Ev: symbol not found

It's not clear to me whether the build is failing to find a .so at all, or successfully finding a .so which doesn't provide the necessary symbols. Did you have to make other build system tweaks?

@mrBliss
Copy link
Contributor

mrBliss commented May 15, 2024

@JackKelly-Bellroy The only things we did are:

  • Add a dependency on phone-numbers in our .cabal file.
    • Because we want some of the changes that haven't made it into a release, we pin a git version in our Stack snapshot.
  • We have the following overlay:
    self: super: {
      phonenumber = self.libphonenumber;
    }
    which is no longer necessary after this PR.

That's it.

I see you're using musl whereas we are using glibc. Looking at all the special casing for musl in haskell.nix, I'm guessing that might have something to do with it? Maybe this line:

  icu = (prev.icu.overrideAttrs (old: { configureFlags = old.configureFlags ++ [ "--enable-static" "--disable-shared" ]; }));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants