Issues packaging (and porting) git - Resolved

Unxmaal

Administrator
Feb 8, 2019
38
13
8
I know we have git in optlocal, but I'd like to get a version of it natively in irixports.

I've patched around all the wacky PRI issues, but now I'm failing with this 'conflicting types' error:

C:
    CC repository.o
    CC rerere.o
    CC resolve-undo.o
    CC revision.o
    CC run-command.o
run-command.c:504:13: error: conflicting types for 'atfork_parent'
static void atfork_parent(struct atfork_state *as)
             ^~~~~~~~~~~~~
In file included from git-compat-util.h:158,
                 from cache.h:4,
                 from run-command.c:1:
/opt/local/gcc-8.2.0/lib/gcc/mips-sgi-irix6.5/8.2.0/include-fixed/unistd.h:532:12: note: previous declaration of 'atfork_parent' was here
extern int atfork_parent(void (*func)(int, int));
            ^~~~~~~~~~~~~
run-command.c: In function 'async_exit':
run-command.c:1069:1: warning: 'noreturn' function does return
}
^
gmake: *** [Makefile:2302: run-command.o] Error 1
Here's my current patchfile, as well as my branch in irixports:
 
Last edited:

onre

Administrator
Feb 8, 2019
59
18
8
Just rename the function to atfork_parent_git or whatever, find where it's used and replace there as well - it's used in only one place and that's within the same file, so basically a search and replace will fix this.

Why you're hitting this is because unfortunately there's an IRIX function with the exact same name.
 
Reactions: Unxmaal

massiverobot

irix detailer
Feb 8, 2019
16
13
3
Philly
twitter.com
Hey- so my irixports install of git failed..

CC http-backend.o
LINK git-http-backend
CC imap-send.o
LINK git-imap-send
/opt/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function dladdr':
/usr/people/esp/src/openssl-1.0.2q/crypto/dso/dso_dlfcn.c:415: undefined reference to
_rld_new_interface'
/usr/people/esp/src/openssl-1.0.2q/crypto/dso/dso_dlfcn.c:415: undefined reference to `_rld_new_interface'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:2372: git-imap-send] Error 1


I had those issues before. What did you do to get imap working?

Again, this is from ./package.sh install in git directory....


Uhmmm - why is it referencing onre's directory?
 

Unxmaal

Administrator
Feb 8, 2019
38
13
8
Hey- so my irixports install of git failed..

CC http-backend.o
LINK git-http-backend
CC imap-send.o
LINK git-imap-send
/opt/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function dladdr':
/usr/people/esp/src/openssl-1.0.2q/crypto/dso/dso_dlfcn.c:415: undefined reference to
_rld_new_interface'
/usr/people/esp/src/openssl-1.0.2q/crypto/dso/dso_dlfcn.c:415: undefined reference to `_rld_new_interface'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:2372: git-imap-send] Error 1


I had those issues before. What did you do to get imap working?

Again, this is from ./package.sh install in git directory....


Uhmmm - why is it referencing onre's directory?
What's your shell set up like now?
 

onre

Administrator
Feb 8, 2019
59
18
8
It's referencing that because that's where it was compiled. Similar to how IRIX system libs tell us a bit about the path structure of the machines that were used to build IRIX.

One way of solving this is to supply --unresolved-symbols=ignore-all to that particular link command. _rld_new_interface is defined runtime by rld so it's not available when linking. I wonder if there's some way of telling ld not to worry about this particular symbol?