View previous topic :: View next topic |
Author |
Message |
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Nov 28, 2004 3:44 pm Post subject: Mango.icu for Linux |
|
|
Added: Linux support for mango.icu.
You will need to download the ICU shared libraries from http://oss.software.ibm.com/icu/download/3.0/index.html first to add the shared libraries to your system (look under binaries; pick the Redhat ones). Alternately you can compile your own from the ICU source; recompiling from source will be necessary if you are using a non-x86 Linux. I'll be including some instructions later on how to install these files properly on Linux.
Like the Win32 version, mango.icu uses the dynamic loader (runtime linking) to interface with the ICU function set. Thus, there is no need to link your programs to the icu libraries at link time.
The ease of porting to Linux can be attributed to Kris' handy FunctionLoader mechanism. Ports to other OSes (like Darwin) should also be possible using this mechanism.
Enjoy!
Later,
John |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Mon Nov 29, 2004 4:09 pm Post subject: |
|
|
Hat's off to John! |
|
Back to top |
|
|
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Tue Feb 22, 2005 1:10 pm Post subject: |
|
|
The version of ICU in Gentoo Portage is 2.8. Rather than emerge 2.8, I've opted to download 3.2 from IBM's site. Do you two have ideas on whether Mango would work on 2.8, or is there a minimum ICU version? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue Feb 22, 2005 2:16 pm Post subject: |
|
|
brad wrote: | The version of ICU in Gentoo Portage is 2.8. Rather than emerge 2.8, I've opted to download 3.2 from IBM's site. Do you two have ideas on whether Mango would work on 2.8, or is there a minimum ICU version? |
Hi Brad. There's a couple of things to consider here:
a) the names of the libraries. ICU typically injects the release number into the library name, and into the names of the public functions too (yes!). To work with another release, one should make appropriate changes to the names noted in mango.icu.ICU, in addition to the 'vrsn' text noted in the various bind() methods within that file (one bind() for each O/S variant).
b) ICU appears to be good about backward compatability. So you should be able to use v3.2 with the Mango wrappers, assuming you made the changes noted above. I wouldn't recommend using a version of ICU before 3.0, although this would likely work with many of the wrappers.
So, yeah. If you update mango.icu.ICU and recompile, it should work fine with version 3.2 ~ I will probably update Mango to the recent release anyway (to take advantage of the C Regex API that was previously missing).
- Kris |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Tue Feb 22, 2005 6:10 pm Post subject: |
|
|
Yeah, what he said.
If you give it a try, tell us how it works. Kris' reasons for why it should work seem sound. Like you, I noticed that Gentoo didn't include the most recent ICU shared libraries, so I just downloaded the libraries (RPM) directly from the IBM site and installed them in /usr/local/lib where they wouldn't mix in with the other system libraries. That way, it's pretty easy to install/uninstall them as necessary.
It also should be possible to make a modified local ebuild for ICU on Gentoo (the new portage system allows for a local private ebuild of packages now). Unfortunately, although I've used Gentoo for quite a long time, I don't have much know-how about how to create the ebuilds. I may look into this in the future.
Speaking of install, I haven't written the linux installation instructions that I said I would for Linux ICU. I'd better get to that! It's improtant to update /etc/ld.so.config with usr/local/lib and then to run ldconfig to update the system's dynamic loader cache.
- John R. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sat Mar 05, 2005 1:13 am Post subject: |
|
|
Did you have any joy with ICU 3.2, Brad? |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sat Mar 05, 2005 2:01 am Post subject: |
|
|
A little bonus: I notice now that Gentoo linux has included the ICU 3.2 ebuild in the portage tree. That should simplify things greatly. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sat Mar 05, 2005 3:04 am Post subject: |
|
|
OK. I'll bring Mango up to ICU v3.2 tomorrow or Sunday, and wrap the relevant bindings with a version{} statement (ICU30 or ICU32)
- Kris |
|
Back to top |
|
|
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Sat Mar 05, 2005 12:57 pm Post subject: |
|
|
No joy with ICU 3.2, so I commented it out. I was really just trying to play with servlets. |
|
Back to top |
|
|
|