threads / discuss / 39822

Building git 2.4.5 on AIX 6.1 problems

Subject: Building git 2.4.5 on AIX 6.1 problems

## tl;dr

10 messages between Jul 9, 2015 and Jul 16, 2015.

replies: 9people: 3as markdown or json

John Norris· Jul 9, 2015, 18:06 UTC · lore
I am trying to compile git 2.4.5 which I downloaded as a tar file on 
AIX 6.1. The machine has gcc installed.
Having read through the INSTALL file, there appear to be several ways, 
either using configure, make, make install or just make, make install 
with prefix of where to install.
Anyway whichever approach I try I end up with the same error.
     LINK git-credential-store
ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-224 WARNING: Duplicate symbol: .memmove
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
ld: 0711-317 ERROR: Undefined symbol: .trace_argv_printf_fl
ld: 0711-317 ERROR: Undefined symbol: .trace_printf_key_fl
ld: 0711-317 ERROR: Undefined symbol: .trace_want
ld: 0711-317 ERROR: Undefined symbol: .trace_strbuf_fl
ld: 0711-317 ERROR: Undefined symbol: .trace_disable
ld: 0711-317 ERROR: Undefined symbol: .diff_can_quit_early
ld: 0711-317 ERROR: Undefined symbol: diff_queued_diff
ld: 0711-317 ERROR: Undefined symbol: .diff_setup
ld: 0711-317 ERROR: Undefined symbol: .diff_setup_done
ld: 0711-317 ERROR: Undefined symbol: .diffcore_std
ld: 0711-317 ERROR: Undefined symbol: .diff_free_filepair
ld: 0711-317 ERROR: Undefined symbol: .parse_long_opt
ld: 0711-317 ERROR: Undefined symbol: .diff_get_color
ld: 0711-317 ERROR: Undefined symbol: mime_boundary_leader
ld: 0711-317 ERROR: Undefined symbol: .getnanotime
ld: 0711-317 ERROR: Undefined symbol: .diff_flush
ld: 0711-317 ERROR: Undefined symbol: .diff_line_prefix
ld: 0711-317 ERROR: Undefined symbol: .diff_unique_abbrev
ld: 0711-317 ERROR: Undefined symbol: .alloc_filespec
ld: 0711-317 ERROR: Undefined symbol: .fill_filespec
ld: 0711-317 ERROR: Undefined symbol: .fill_textconv
ld: 0711-317 ERROR: Undefined symbol: .free_filespec
ld: 0711-317 ERROR: Undefined symbol: .diff_unmodified_pair
ld: 0711-317 ERROR: Undefined symbol: .diff_warn_rename_limit
ld: 0711-317 ERROR: Undefined symbol: .parse_algorithm_value
ld: 0711-317 ERROR: Undefined symbol: .parse_rename_score
ld: 0711-317 ERROR: Undefined symbol: .diff_change
ld: 0711-317 ERROR: Undefined symbol: .diff_unmerge
ld: 0711-317 ERROR: Undefined symbol: .diff_addremove
ld: 0711-317 ERROR: Undefined symbol: .diff_set_mnemonic_prefix
ld: 0711-317 ERROR: Undefined symbol: .diffcore_fix_diff_index
ld: 0711-317 ERROR: Undefined symbol: .diff_queue_is_empty
ld: 0711-317 ERROR: Undefined symbol: .diff_populate_filespec
ld: 0711-317 ERROR: Undefined symbol: .diff_q
ld: 0711-317 ERROR: Undefined symbol: .diff_opt_parse
ld: 0711-317 ERROR: Undefined symbol: .diff_flush_patch_id
collect2: error: ld returned 8 exit status
Makefile:1958: recipe for target 'git-credential-store' failed
gmake: *** [git-credential-store] Error 1
The machine I am building on has built git in the past (not by me).

I have downloaded the source for 2.1.0 and 1.9.2 and both of those have the same problem and the latter was built about 12 months ago. I had hoped the version of gcc was too old but I presume not. So possibly a problem with the environment as building as different user?

But really need help as this is very frustrating and googling has not found anything that quite matches it.

Regards, John

Junio C Hamano· Jul 9, 2015, 18:30 UTC · re: John Norris · lore

Re: Building git 2.4.5 on AIX 6.1 problems

John Norris <john@norricorp.f9.co.uk> writes:
Show 11 quoted lines
> I am trying to compile git 2.4.5 which I downloaded as a tar file on
> AIX 6.1. The machine has gcc installed.
> Having read through the INSTALL file, there appear to be several ways,
> either using configure, make, make install or just make, make install
> with prefix of where to install.
> Anyway whichever approach I try I end up with the same error.
>     LINK git-credential-store
> ld: 0711-224 WARNING: Duplicate symbol: .bcopy
> ...
> But really need help as this is very frustrating and googling has not
> found anything that quite matches it.

As "ld: 0711-224 WARNING: Duplicate symbol: .bcopy" seems to hit many similar issues across different piece of software, I have a suspicion that AIX folks (as opposed to Git folks) may have a lot better insight to the peculiarity of the platform.

Running "make" with "V=1" may show the exact command line that is invoked (it would begin with "gcc ...", I think), which may help diagnosing the issue further.

John Norris· Jul 10, 2015, 04:32 UTC · re: Junio C Hamano · lore

Re: Building git 2.4.5 on AIX 6.1 problems

Hi Junio, thank you for this - I will run make with V=1 as you suggested and try and talk to some IBM AIX people. But there are a few archive commands before I get to linking credentials-store. Is there something special about credentials store? And is the collect2 an AIX library or general library used by git? Regards, John

Jeff King· Jul 10, 2015, 05:06 UTC · re: John Norris · lore

Re: Building git 2.4.5 on AIX 6.1 problems

On Fri, Jul 10, 2015 at 04:32:37AM +0000, John Norris wrote:
> But there are a few archive commands before I get to linking
> credentials-store. Is there something special about credentials store?

Not really. It is just the first program alphabetically, so it comes first in the Makefile. You can try "make git" and you'll probably see similar problems linking git (or if you don't, then it is a sign our Makefile is broken for external programs versus the main git binary).

> And is the collect2 an AIX library or general library used by git?
It's a gcc thing:
  https://gcc.gnu.org/onlinedocs/gccint/Collect2.html
-Peff
Junio C Hamano· Jul 10, 2015, 05:09 UTC · re: John Norris · lore

Re: Building git 2.4.5 on AIX 6.1 problems

John Norris <john@norricorp.f9.co.uk> writes:
> But there are a few archive commands before I get to linking
> credentials-store. Is there something special about credentials store?
> And is the collect2 an AIX library or general library used by git?

Wow, that's a blast from the past. My recollection is vague, as it has at least been 15 years since I had to hear that name causing trouble the last time ;-), but collect2 is a gcc thing that is used on a platform, where the native linker cannot be directly used to link gcc output with libraries, as "ld" replacement/wrapper.

 
norricorp· Jul 11, 2015, 06:31 UTC · re: Junio C Hamano · lore

Re: Building git 2.4.5 on AIX 6.1 problems

This is the output I got from using V=1 with make gcc -g -O2 -I. -D_LARGE_FILES -DNO_D_TYPE_IN_DIRENT -DNO_NSEC -DOLD_ICONV -pthread -DHAVE_PATHS_H -DHAVE_ LIBCHARSET_H -DHAVE_STRINGS_H -DSHA1_HEADER='<openssl/sha.h>' -DFREAD_READS_DIRECTORIES -DNO_STRCASESTR - DNO_STRLCPY -Icompat/fnmatch -DNO_FNMATCH_CASEFOLD -DUSE_WILDMATCH -DNO_MKSTEMPS -DINTERNAL_QSORT -Icompat /regex -DDEFAULT_PAGER='"more"' -DSHELL_PATH='"/bin/sh"' -o git-credential-store credential-store.o libg it.a xdiff/lib.a -lz -liconv -lintl -lcrypto -pthread

Also, the undefined symbol errors - does anyone know which library these are supposed to be in? So when I grep for one undefined symbol $: git-2.4.5 $ grep -R diff_queued_diff * builtin/blame.c: if (!diff_queued_diff.nr) { builtin/blame.c: for (i = 0; i < diff_queued_diff.nr; i++) { builtin/blame.c: p = diff_queued_diff.queue[i]; ...... builtin/diff.c: diff_queue(&diff_queued_diff, one, two); builtin/fast-export.c: for (i = 0; i < diff_queued_diff.nr; i++) builtin/fast-export.c: if (!S_ISGITLINK(diff_queued_diff.queue[i]->two->mode)) builtin/fast-export.c: export_blob(diff_queued_diff.queue[i]->two->sha1); ........ diff.c: struct diff_queue_struct *q = &diff_queued_diff; diff.c: struct diff_queue_struct *q = &diff_queued_diff;

So it is obviously a structure or variable that is being used so does anyone know the library that this is defined in?

-- View this message in context: http://git.661346.n2.nabble.com/Building-git-2-4-5-on-AIX-6-1-problems-tp7635435p7635513.html Sent from the git mailing list archive at Nabble.com.

Junio C Hamano· Jul 11, 2015, 06:57 UTC · re: norricorp · lore

Re: Building git 2.4.5 on AIX 6.1 problems

On Fri, Jul 10, 2015 at 11:31 PM, norricorp <john@norricorp.f9.co.uk> wrote:
Show 32 quoted lines
>
> This is the output I got from using V=1 with make
> gcc  -g -O2 -I. -D_LARGE_FILES -DNO_D_TYPE_IN_DIRENT -DNO_NSEC -DOLD_ICONV
> -pthread -DHAVE_PATHS_H -DHAVE_
> LIBCHARSET_H -DHAVE_STRINGS_H -DSHA1_HEADER='<openssl/sha.h>'
> -DFREAD_READS_DIRECTORIES -DNO_STRCASESTR -
> DNO_STRLCPY -Icompat/fnmatch -DNO_FNMATCH_CASEFOLD -DUSE_WILDMATCH
> -DNO_MKSTEMPS -DINTERNAL_QSORT -Icompat
> /regex -DDEFAULT_PAGER='"more"' -DSHELL_PATH='"/bin/sh"' -o
> git-credential-store   credential-store.o libg
> it.a xdiff/lib.a  -lz  -liconv -lintl  -lcrypto -pthread
>
> Also, the undefined symbol errors - does anyone know which library these are
> supposed to be in?
> So when I grep for one undefined symbol
> $: git-2.4.5 $ grep -R diff_queued_diff *
> builtin/blame.c:        if (!diff_queued_diff.nr) {
> builtin/blame.c:                for (i = 0; i < diff_queued_diff.nr; i++) {
> builtin/blame.c:                        p = diff_queued_diff.queue[i];
> ......
> builtin/diff.c: diff_queue(&diff_queued_diff, one, two);
> builtin/fast-export.c:  for (i = 0; i < diff_queued_diff.nr; i++)
> builtin/fast-export.c:          if
> (!S_ISGITLINK(diff_queued_diff.queue[i]->two->mode))
> builtin/fast-export.c:
> export_blob(diff_queued_diff.queue[i]->two->sha1);
> ........
> diff.c: struct diff_queue_struct *q = &diff_queued_diff;
> diff.c: struct diff_queue_struct *q = &diff_queued_diff;
>
> So it is obviously a structure or variable that is being used so does anyone
> know the library that this is defined in?

Most of our objects should be found in libgit.a (you can see it on your command line) that our Makefile builds.

Now, it has been more than a decade since I last had to deal with a system that needs this the last time, but perhaps AIX linker needs the archives explicitly prepared with ranlib(1)? Just a shot in the dark...

Jeff King· Jul 12, 2015, 04:18 UTC · re: Junio C Hamano · lore

Re: Building git 2.4.5 on AIX 6.1 problems

On Fri, Jul 10, 2015 at 11:57:28PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > So it is obviously a structure or variable that is being used so does anyone
> > know the library that this is defined in?
> 
> Most of our objects should be found in libgit.a (you can see it on your
> command line) that our Makefile builds.
> 
> Now, it has been more than a decade since I last had to deal with a
> system that needs this the last time, but perhaps AIX linker needs the
> archives explicitly prepared with ranlib(1)? Just a shot in the dark...
Ugh, you are giving me flashbacks. ;)

We use the "s" flag to "ar", which is supposed to do the same thing as ranlib. But I guess it is possible that the system ar does not respect that flag. Certainly running ranlib manually would be an interesting experiment.

If the system has GNU ar on it as well as an AIX ar, it might be interesting to point $(AR) at the former. E.g.:

  make clean
  make AR=gar
(where "gar" is whatever GNU ar is called on the system).
-Peff
norricorp· Jul 13, 2015, 08:24 UTC · re: Jeff King · lore

Re: Building git 2.4.5 on AIX 6.1 problems

Hi Jeff, So running with the ar in binutils gave the usual result. I think this boils down to knowing which library those undefined symbols are defined in. The git code uses those variables so the library should be around somewhere. It is just knowing which library it is in. Regards, John

-- View this message in context: http://git.661346.n2.nabble.com/Building-git-2-4-5-on-AIX-6-1-problems-tp7635435p7635578.html Sent from the git mailing list archive at Nabble.com.

norricorp· Jul 16, 2015, 14:49 UTC · re: norricorp · lore

Re: Building git 2.4.5 on AIX 6.1 problems

The problem was down to the linker and archiver. I had to make sure that I used the ar and ld in /usr/bin (rather than aix ld and gnu ar) and the gnu compiler. Also, I did not realise I had already created libs so had to run clean and start with the right PATH to pick up the above. Finally, have to use the gnu install, not the /usr/bin/install. But getting there so thanks for all of the help that people have taken the time for. Regards, John

-- View this message in context: http://git.661346.n2.nabble.com/Building-git-2-4-5-on-AIX-6-1-problems-tp7635435p7635699.html Sent from the git mailing list archive at Nabble.com.

← back to recent threads