Opened 3 years ago

Closed 3 years ago

#63344 closed defect (fixed)

glib2-devel @2.62.5: does not build on 10.4 Tiger i386

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger Cc: evanmiller (Evan Miller)
Port: glib2-devel

Description

looks like SDK-related issues:

:info:build FAILED: glib/libglib-2.0.0.dylib.p/gosxutils.m.o 
:info:build /opt/local/bin/gcc-apple-4.2 -Iglib/libglib-2.0.0.dylib.p -Iglib -I../glib-2.62.5/glib -I. -I../glib-2.62.5 -I/opt/local/include -pipe -O2 -g -Os -arch i386 '-DG_LOG_DOMAIN="GLib"' -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/libglib-2.0.0.dylib.p/gosxutils.m.o -MF glib/libglib-2.0.0.dylib.p/gosxutils.m.o.d -o glib/libglib-2.0.0.dylib.p/gosxutils.m.o -c ../glib-2.62.5/glib/gosxutils.m
:info:build In file included from ../glib-2.62.5/glib/gosxutils.m:25:
:info:build ../glib-2.62.5/glib/gutils.h:213: warning: 'GVoidFunc' is deprecated
:info:build ../glib-2.62.5/glib/gosxutils.m: In function 'find_folder':
:info:build ../glib-2.62.5/glib/gosxutils.m:36: warning: 'NSArray' may not respond to '-firstObject'
:info:build ../glib-2.62.5/glib/gosxutils.m:36: warning: (Messages without a matching method signature
:info:build ../glib-2.62.5/glib/gosxutils.m:36: warning: will be assumed to return 'id' and accept
:info:build ../glib-2.62.5/glib/gosxutils.m:36: warning: '...' as arguments.)
:info:build ../glib-2.62.5/glib/gosxutils.m: In function 'load_user_special_dirs_macos':
:info:build ../glib-2.62.5/glib/gosxutils.m:52: error: 'NSDownloadsDirectory' undeclared (first use in this function)
:info:build ../glib-2.62.5/glib/gosxutils.m:52: error: (Each undeclared identifier is reported only once
:info:build ../glib-2.62.5/glib/gosxutils.m:52: error: for each function it appears in.)
:info:build ../glib-2.62.5/glib/gosxutils.m:53: error: 'NSMusicDirectory' undeclared (first use in this function)
:info:build ../glib-2.62.5/glib/gosxutils.m:54: error: 'NSPicturesDirectory' undeclared (first use in this function)
:info:build ../glib-2.62.5/glib/gosxutils.m:55: error: 'NSSharedPublicDirectory' undeclared (first use in this function)
:info:build ../glib-2.62.5/glib/gosxutils.m:57: error: 'NSMoviesDirectory' undeclared (first use in this function)

Attachments (2)

glib2-devel-fail-i386-tiger.log (426.6 KB) - added by kencu (Ken) 3 years ago.
glib-tiger-compat.diff (1.3 KB) - added by evanmiller (Evan Miller) 3 years ago.
Workaround for Tiger/Leopard warnings and errors

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by kencu (Ken)

comment:1 Changed 3 years ago by kencu (Ken)

Keywords: tiger added

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

Cc: evanmiller added

Changed 3 years ago by evanmiller (Evan Miller)

Attachment: glib-tiger-compat.diff added

Workaround for Tiger/Leopard warnings and errors

comment:3 Changed 3 years ago by kencu (Ken)

That's why I'm happy to have some help with these Tiger/Leopard issues! Thanks.

I can see how this would make glib2 compile -- but to consider, rather than just send back "NULL" for all the paths, is there any way we can return a "99%+" right answer of $HOME/Downloads, $HOME/Pictures, etc?

That way, it might do the right thing for us....

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 3 years ago by kencu (Ken)

here is part, perhaps:

$ cat getpath.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <assert.h>

int main(void) {
    const char * thePath;

    struct passwd *pw = getpwuid(getuid());
    assert(pw);
    thePath = pw->pw_dir;

    printf("%s\n",thePath);
    return 0;
}
$ gcc-apple-4.2 -o getpath getpath.c
MacMini:~ me$ ./getpath
/Users/me

comment:5 Changed 3 years ago by evanmiller (Evan Miller)

I'd suggest taking the result of find_folder (NSDesktopDirectory), removing the last path component, and appending Downloads, Movies, etc.

(Would amend patch but leaving soon for vacation.)

The build still fails due to some test failures having to do with @loader_path.

comment:6 Changed 3 years ago by kencu (Ken)

That @loader_path business is all me -- I hacked that into meson to make it work at all on Tiger.

Yeah, if some part of that original code works on Tiger, we can certainly build off that. I thought it was all DOA.

comment:7 Changed 3 years ago by evanmiller (Evan Miller)

Just getting the username and returning "/Users/me/Downloads" will work 99% of the time. All of the standard folder names are in English, and are only localized when being displayed.

comment:9 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.