Roger Wenham
2010-12-20 20:33:17 UTC
Hi,
I have compiled omniORB on AIX 6.1 using gcc version 4.2.0, without problem.
Unfortunately when I start omniNames I get an error message:
$ ./omniNames -start
Mon Dec 20 22:04:45 2010:
Starting omniNames for the first time.
Error: cannot create initial log file '/tmp/omninames-tmxd12e.log':
No such file or directory
You can set the environment variable OMNINAMES_LOGDIR to specify the
directory where the log files are kept.
The problem is not with the file or permissions...
Chasing this back, the problem appears to be in the stream handling.
The code creates a stream, and then calls the method putPort which raises an exception,
which produces the above error message.
The uppercase OPEN mystifies me somewhat ...
....
logf.OPEN(active,ios::out|ios::trunc,0666);
if (!logf)
throw IOError();
putPort(port, logf);
...
void
omniNameslog:putPort(int p, ostream& file)
{
file << "port " << p << '\n';
if (!file) throw IOError();
}
class omniNameslog {
....
ofstream logf;
To me it seems that logf.OPEN(...) is not creating a stream, but its quite a while since I did any
serious c++ work.
I would be eternally thankful for any help or pointers....
Thanks in advance,
Roger
I have compiled omniORB on AIX 6.1 using gcc version 4.2.0, without problem.
Unfortunately when I start omniNames I get an error message:
$ ./omniNames -start
Mon Dec 20 22:04:45 2010:
Starting omniNames for the first time.
Error: cannot create initial log file '/tmp/omninames-tmxd12e.log':
No such file or directory
You can set the environment variable OMNINAMES_LOGDIR to specify the
directory where the log files are kept.
The problem is not with the file or permissions...
Chasing this back, the problem appears to be in the stream handling.
The code creates a stream, and then calls the method putPort which raises an exception,
which produces the above error message.
The uppercase OPEN mystifies me somewhat ...
....
logf.OPEN(active,ios::out|ios::trunc,0666);
if (!logf)
throw IOError();
putPort(port, logf);
...
void
omniNameslog:putPort(int p, ostream& file)
{
file << "port " << p << '\n';
if (!file) throw IOError();
}
class omniNameslog {
....
ofstream logf;
To me it seems that logf.OPEN(...) is not creating a stream, but its quite a while since I did any
serious c++ work.
I would be eternally thankful for any help or pointers....
Thanks in advance,
Roger