Subcommander Development Blog

Posts Tagged ‘gettext

msgmerge on MacOSX and ‘No such file or directory’

with 2 comments


I am still around and plan to work more on Subcommander again. :-)

Today I tried to understand a long standing annoying build issue on MacOSX: msgmerge (for me always) fails on MacOSX with a “no such file or directory” error on a file that definitely exists. msgmerge is part of the gettext package which is used to add multiple language support to Subcommander.

Here is the failing command line:

> msgmerge de.po Subcommander.pot
> msgmerge: `./de.po': No such file or directory

The quick fix is to disable backups with --backup=off.

The reason why it fails is that the backup code tries to not simply copy the file but also the file permissions and acl information.

Copying the acl information seems to be the problem. If the po file doesn’t have any acl information, copying the acl information fails. After setting some dummy acl info it works. Interesting enough it seems to work also after removing the acl info again (see man chown to read about setting and deleting acl information).

In copy_acl the following code returns ENOENT if the file has no acl info:

int copy_acl(...):
  acl = acl_get_fd (source_desc);

The man page of ac_get_fd says for ENOENT: The named object does not exist, or the path_p argument points to an empty string.

This doesn’t explain anything, at least to me, so I am not sure if this is a bug in MacOSX or in msgmerges copy code…

Written by hauner

Saturday, 16 May, 2009 at 17:36

Posted in subcommander

Tagged with , ,