Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

GCC 4.x Solaris locale support...

807557Sep 23 2009 — edited Sep 23 2009
Hello,

I have searched the web, and http://gcc.gnu.org/bugzilla. From what I can tell GCC was changed in version 3.4 to set the locale support for libstdc++, for non-glibc OSs, to generic. Here are posts I found to that effect:

http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
http://gcc.gnu.org/ml/libstdc++/2003-09/msg00153.html

I have successfully built GCC 4.4.1, with binutils 2.17, on Solaris 8. Here is my configuration information:

{color:#993300}sunhost> gcc -v

Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: ../gcc-4.4.1/configure prefix=/my/dev/gcc/4.4.1-sunos58 with-local-prefix=/my/sdk/gcc441-sunos58 with-gnu-as with-gnu-ld with-gnu-ar with-gnu-nm with-as=/my/bin/gas with-ar=/my/bin/gar with-ld=/my/bin/gld with-nm=/my/bin/gnm enable-long-long enable-threads=posix --enable-bootstrap
Thread model: posix
gcc version 4.4.1 (GCC)

sunhost> uname -a
SunOS sunhost 5.8 Generic_117350-25 sun4u sparc SUNW,Ultra-80
{color}
The following simple program demonstrates the problem I'm experiencing on Solaris with GCC:

{color:#993300}#include <iostream>
#include <locale>

int main(int argc, char* argv[])
{
try
{
std::ios::sync_with_stdio(false);
std::locale loc(argc > 1 ? argv[1] : "");
std::cout << loc.name() << std::endl;
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
}
}
{color}
If the above code is compiled with GCC 4.4.1 and run on Solaris 8 or newer, with locale environment variables set to anything other than C, or POSIX, the program throws the following exception:

{color:#993300}locale::facet::_S_create_c_locale name not valid
{color}
According to the post mentioned at the beginning of this email this is expected behavior. But my environment needs the locale environment variables set to something other than C, or POSIX. Is there any way for GCC 4.4.1 on Solaris 8 or newer to support locales other than C, or POSIX? This same program built with GCC 3.3.1, binutils 2.13.1, does not throw an exception when locale environment variables other than C, or POSIX are set, and lists the current locale environment variables as expected. I need a fix or workaround for this issue. Any suggestions?

Thanks...

Edited by: CarlKipp on Sep 23, 2009 11:15 PM

Edited by: CarlKipp on Sep 23, 2009 11:40 PM

Comments

Herald ten Dam
Hi,

welcome.

The user who made the index, does it have the role CTXAPP? Otherwise you need to grant this role to the user.
grant CTXAPP to your_user;
Otherwise you need explicitly grant execute rights of the package CTX_DOC to this user.
The owner of the package is CTXSYS.
grant execute on ctxsys.ctx_doc to your_user;
If there are still problems, it will be better to post in the TEXT forum.

Herald ten Dam
htendam.wordpress.com
776964
Unfortunately, that doesn't seem to work either:

grant execute on ctxsys.ctx_doc to sysadm
*
FOUT in regel 1:
.ORA-04042: procedure, function, package, or package body does not exist

Thanks for your reply. I will continue this in the right forum.
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 21 2009
Added on Sep 23 2009
0 comments
149 views