Re: puzzling Gnome-ERROR

On Fri, Dec 24, 1999 at 04:47:22AM -0500, wrote:
> This is the exact error you will get from several applications if you try to
> use the stock GNOME on a libc 5.x system.  (Apparently there is a bug
> somewhere in autoconf/automake/libtool or the GNOME macros).

> In message <>, Havoc Pennington writes:
> > writes: 
> >> Problem:
> >> Gnome-ERROR **: Could not create per-user Gnome directory
> >> </home/disco/.gnome> - aborting

(In case you've forgotten the original problem:
The above error would happen only if the directory was already there.
If he rm'd his .gnome directory, the program would run the first time,
but fail on consecutive runs.)

> >Yuck, this is your basic shitty error messages. Pet peeve of mine. I'm
> >fixing this one in gnome-libs 2.0. The message shouldn't use g_error()
> >anyway since a coredump is useless.
> >
> >For now, ask the user to try running your program with "strace" - it
> >will show the error that caused mkdir to fail. That should give a
> >clue.

Uwe Koloska( wrote me the following:
    I have had the same problem and by debugging it find out that mkdir()
    answers with 1 what is in contradiction with the manpage (0 on success and
    -1 on error) after I upgraded my system to glibc2 this problem disappears.
    I think it is someway related with threads ...

    a quick workaround if you compile the apps for yourself: just before
    gnome_init() call "gnome_do_not_create_directories = 1;"

It looks like Havoc has already fixed this (or tried to) in 1.36:
    if (mkdir(gnome_user_dir, 0700) < 0) { 
	if (errno != EEXIST) {
            /* error message */

but, If you examine the old code:
        mkdir(gnome_user_dir, 0700) /* This is per-user info
                                       - no need for others to see it */
        && errno != EEXIST)
It suggests that even if mkdir() was returning a 1 to indicate failure,
errno should've been EEXIST, and the error message shouldn't have been printed.

This leads me to believe that errno wasn't being set properly,
which is what was suggesting at the top of this message:
the gnome libs needed to be compiled with -D_REENTRANT.

Either way, Havoc's code works around the problem, I guess.

My conclusion: threads and GNOME are a lot of trouble.  I'll be using fork()
in all future projects.

Evan Martin - -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]