libicu autodetect doesn't work in Ubuntu14.04#876
Conversation
|
@psalic please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
DHowett
left a comment
There was a problem hiding this comment.
Can you explain a little more in depth how this works? We thought you could just set EDIT_CFG_ICUUC_SONAME and friends in any build environment on any version of any Linux distribution. Why is that insufficient on Ubuntu 14.04? (Also: that version is 12 years old, I'm surprised someone is still using it!)
Thanks!
| 0 | ||
| } | ||
|
|
||
| let ret = libc::dl_iterate_phdr( |
There was a problem hiding this comment.
Whether or not we should do this: dl_iterate_phdr is apparently Linux-specific, and this project works fine on other Unixes e.g. NetBSD
There was a problem hiding this comment.
definition from GNU.
dl_iterate_phdr - walk through list of shared objects
In callback you receive structure dl_phdr_info which include filename of shared object. Once callback return non zero value dl_iterate_phdr finishes it job.
As I check docs dl_iterate_phdr is also implemented on BSD Unix operation systems.
I know Ubuntu 14.04 is old but looks that also 16.04 has same problem. Canonical still supports 14.04 in pro program.
Problem on Ubuntu14.04 originates that symbol "_ZN8UCaseMapD1Ev "is not present in libicu library.
Hi,
It showed that libicu autodetect doesn't work in Ubuntu14.04. I made a fix that solves the issue.
I found that same code can be compiled with apple compiler which would fail. That is reason I added cfg depend.
Otherwise I also made fix for macos if someone likes to use with homebrew licicu. I attach full patch_full.txt.
It compiles with command:
EDIT_CFG_ICUUC_SONAME="libicuuc.dylib" EDIT_CFG_ICUI18N_SONAME="libicui18n.dylib" EDIT_CFG_ICU_RENAMING_AUTO_DETECT="true" RUSTFLAGS="-C link-arg=-Wl,-rpath,/opt/homebrew/opt/icu4c/lib" cargo build --releaseRegards, Primoz