Skip to content
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

The Crystal lib can only be linked to a specific version of ICU #1

Closed
olbat opened this issue Apr 20, 2017 · 3 comments
Closed

The Crystal lib can only be linked to a specific version of ICU #1

olbat opened this issue Apr 20, 2017 · 3 comments

Comments

@olbat
Copy link
Owner

olbat commented Apr 20, 2017

For some reasons 1,2,3, most distributions of ICU are compiled using the symbol renaming feature (a suffix containing the ICU version number is added to every symbols in shared objects).

It makes the task of creating a generic Crystal binding more difficult since ABIs of different versions of ICU are 100% incompatible.

For the moment the lib_icu binding has been generated against the version 52 of ICU making it incompatible with any other version of the library.

@olbat
Copy link
Owner Author

olbat commented Apr 21, 2017

Here are some ideas to solve the issue:

  1. Use a linker script to rename symbols at linking time
  2. Generate1,2 the binding at install time (via postinstall script in the shard ?)
  3. Generate bindings for the N last versions of ICU (+ a binding without suffixes )
    and choose which one to load at compile time
  4. Distribute a version of ICU sources with the library + compile it before the Crystal library
  5. Wait for some "on-the-fly code generation" feature to be integrated in Crystal core

@olbat
Copy link
Owner Author

olbat commented Apr 27, 2017

@kostya
Copy link
Contributor

kostya commented Apr 28, 2017

there is also different so names for osx and linux, i write little binding here: https://github.com/kostya/icu/blob/master/src/icu/lib.cr, but it not solve suffixes

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

No branches or pull requests

2 participants