Operating System - HP-UX
1827712 Members
2739 Online
109967 Solutions
New Discussion

Re: Need help in compiling locale from source

 
SOLVED
Go to solution
Igor Posatskoff
Advisor

Need help in compiling locale from source

Can anybody explain me how to compile a new locale from the source properly?
18 REPLIES 18
Steve Steel
Honored Contributor

Re: Need help in compiling locale from source

Hi


This may help

http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libutf8-0.8/


But please give more data about the software yopu want to use to compile locale


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Hi Steve!

I need russian language support in my HP-UX 11.00

I try to compile the source like this:

localedef -f /usr/lib/nls/loc/charmaps/utf8.cm -e -n -c -i /usr/lib/nls/loc/src/ru_RU.utf8.src -m /usr/lib/nls/loc/src/univ.utf8.m ru_RU.utf8.src

But I get some errors and compilation failed then.
Steve Steel
Honored Contributor

Re: Need help in compiling locale from source

Hi


What errors


Try


localedef -f /usr/lib/nls/loc/charmaps/utf8.cm \
-e -n -c -i /usr/lib/nls/loc/src/ru_RU.utf8.src \
-m /usr/lib/nls/loc/src/univ.utf8.m \
ru_RU.utf8

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Hi
Here's what I've got:

# localedef -f /usr/lib/nls/loc/charmaps/utf8.cm \
> -e -n -c -i /usr/lib/nls/loc/src/ru_RU.utf8.src \
> -m /usr/lib/nls/loc/src/univ.utf8.m \
> ru_RU.utf8

Processed LC_CTYPE

Processed LC_COLLATE

Processed LC_MONETARY

Processed LC_NUMERIC

Processed LC_TIME

Processed LC_MESSAGE
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +z option is available only with the C/ANSI C product; ignored.
cpp: "./locAAAa04683.c", line 6: warning 2013: Unknown preprocessing directive.
(Bundled) cc: "locAAAa04683.c", line 10: error 1000: Unexpected symbol: "*".
(Bundled) cc: "locAAAa04683.c", line 10: warning 5: "const" will become a keyword.
(Bundled) cc: "locAAAa04683.c", line 10: error 1000: Unexpected symbol: "char".
(Bundled) cc: "locAAAa04683.c", line 10: error 1000: Unexpected symbol: "int".
(Bundled) cc: "locAAAa04683.c", line 10: error 1000: Unexpected symbol: "char".
(Bundled) cc: "locAAAa04683.c", line 10: error 1000: Unexpected symbol: "_LC_charmap_t".
(Bundled) cc: "locAAAa04683.c", line 11: warning 5: "const" will become a keyword.
(Bundled) cc: "locAAAa04683.c", line 11: error 1000: Unexpected symbol: "*".
(Bundled) cc: "locAAAa04683.c", line 11: error 1000: Unexpected symbol: "char".
(Bundled) cc: "locAAAa04683.c", line 11: error 1000: Unexpected symbol: "int".
(Bundled) cc: "locAAAa04683.c", line 11: error 1000: Unexpected symbol: "*".
(Bundled) cc: "locAAAa04683.c", line 12: error 1000: Unexpected symbol: "__pcstombs_utf8".
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
localedef [ERROR]: FILE: /usr/lib/nls/loc/src/ru_RU.utf8.src, LINE: 4191, CHAR: 1
Required header files sys/localedef.h and sys/lc_core.h are the wrong version or are missing.
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

What's the problem?
Steve Steel
Honored Contributor
Solution

Re: Need help in compiling locale from source

Hi

Required header files sys/localedef.h and sys/lc_core.h are the wrong version or are missing.

Suspect you miss libutf8 on

ll /usr/lib/nls/loc/pa20_64/methods.2
total 252
-r-xr-xr-x 1 bin bin 20928 Nov 14 2000 libHP15.sl
-r-xr-xr-x 1 bin bin 20480 Nov 14 2000 libSJIS.sl
-r-xr-xr-x 1 bin bin 20552 Nov 14 2000 libeucJP.sl
-r-xr-xr-x 1 bin bin 20744 Nov 14 2000 libeucTW.sl
-r-xr-xr-x 1 bin bin 21720 Nov 14 2000 libhp15CN.sl
-r-xr-xr-x 1 bin bin 20488 Nov 14 2000 libutf8.sl


What does
swlist -l file|grep libutf8
OS-Core.CMDS-MIN: /usr/lib/nls/loc/methods.1/libutf8.sl
OS-Core.CMDS-MIN: /usr/lib/nls/loc/methods.2/libutf8.sl
OS-Core.CMDS-MN-64SLIB: /usr/lib/nls/loc/pa20_64/methods.2/libutf8.sl

give

Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Here you go

# ll /usr/lib/nls/loc/pa20_64/methods.2
total 146
-r-xr-xr-x 1 bin bin 12208 Nov 7 1997 libHP15.sl
-r-xr-xr-x 1 bin bin 11760 Nov 7 1997 libSJIS.sl
-r-xr-xr-x 1 bin bin 11776 Nov 7 1997 libeucJP.sl
-r-xr-xr-x 1 bin bin 12112 Nov 7 1997 libeucTW.sl
-r-xr-xr-x 1 bin bin 12752 Nov 7 1997 libhp15CN.sl
-r-xr-xr-x 1 bin bin 11768 Nov 7 1997 libutf8.sl

# swlist -l file|grep libutf8
OS-Core.CMDS-MIN: /usr/lib/nls/loc/methods.1/libutf8.sl
OS-Core.CMDS-MIN: /usr/lib/nls/loc/methods.2/libutf8.sl
OS-Core.CMDS-MN-64SLIB: /usr/lib/nls/loc/pa20_64/methods.2/libutf8.sl

The errors still occure

I've recently installed libutf8, but did not reboot. Do I need to do reboot after installing?

Steve Steel
Honored Contributor

Re: Need help in compiling locale from source

Hi

reboot can be useful but first

swlist -l file|grep localedef.h
ProgSupport.C-INC: /usr/include/localedef.h

swlist -l file|grep lc_core.h
ProgSupport.C-INC: /usr/include/lc_core.h

what /usr/include/localedef.h
what /usr/include/lc_core.h
ll /usr/include/lc_core.h
ll /usr/include/localedef.h


steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Hi

That's what I've got:

# swlist -l file|grep localedef.h
ProgSupport.C-INC: /usr/include/localedef.h
# swlist -l file|grep lc_core.h
ProgSupport.C-INC: /usr/include/lc_core.h
# what /usr/include/localedef.h
/usr/include/localedef.h:
$Revision: ../hdr/localedef.h@@/main/r11ros/2 $ */
# what /usr/include/lc_core.h
/usr/include/lc_core.h:
$Revision: ../hdr/lc_core.h@@/main/r11ros/1 $ */
# ll /usr/include/lc_core.h
-r--r--r-- 1 bin bin 9874 Oct 27 1997 /usr/include/lc_core.h
# ll /usr/include/localedef.h
-r--r--r-- 1 bin bin 11075 Oct 27 1997 /usr/include/localedef.h
#
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

What else can I do?
Steve Steel
Honored Contributor

Re: Need help in compiling locale from source

Hi


Do You have

Patch Name: PHCO_30248

Patch Description: s700_800 11.00 localedef(1M) patch

Creation Date: 04/03/14

Post Date: 04/04/12

Hardware Platforms - OS Releases:
s700: 11.00
s800: 11.00


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Hi

I have
#swlist -l product PHCO_30248
PHCO_30248 1.0 localedef(1M) patch
Steve Steel
Honored Contributor

Re: Need help in compiling locale from source

Hi

You do not have a usable C compiler

localedef(1M) localedef(1M)

NAME
localedef - generate a locale environment

Creation of locales (both private and public) requires access to the
ANSI C compiler.


Bundled c is only for compiler ebuilds


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

How do I know if I have an ANSI C compiler?
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

I've recently installed gcc, isnt enough?
Igor Posatskoff
Advisor

Re: Need help in compiling locale from source

Hi Steve!
Thank you!
I have sucessfully compiled my locale ru_RU.utf8 after installing ANSI Compiler.
But I cant see ru_RU.utf8 in the list of locale -a

How to add new locale to the existing locales set?
Ermin Borovac
Honored Contributor

Re: Need help in compiling locale from source

locale -a looks in the following directories

/usr/lib/nls/loc/locales (for 32-bit system)
/usr/lib/nls/loc/pa20_64/locales (for 64-bit system)

Is your locale in one of these dirs?
Igor Sovin
Super Advisor

Re: Need help in compiling locale from source

Thank you!

I've moved locale to the wrong directory
Now it okey I see it in locale -a

thax