{"thread":{"id":"50433","subject":"undefined symbols building GIT source from githu","startedAt":"2019-02-08T07:02:28Z","lastAt":"2019-02-08T18:15:07Z","messageCount":2,"participants":["Douglas Godfrey","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"368781","messageId":"1a9f02ca-3bc3-f00f-6923-1bbf050e84ca@whamtech.com","threadId":"50433","inReplyTo":null,"subject":"undefined symbols building GIT source from githu","fromName":"Douglas Godfrey","fromEmail":"douglas.godfrey@whamtech.com","sentAt":"2019-02-08T06:13:04Z","receivedAt":"2019-02-08T07:02:28Z","isPatch":false,"sender":{"key":"douglas.godfrey@whamtech.com","avatar":null},"body":"MacOS X Snow Leopard\nopenssl-1.1.1a installed\n\nBuilding git-master downloaded from github on 2/7/2019\nThe same error occurs building git-2.9.5\n\nWhat is missing in this project?\n\ngit-master did not have a configure script so I ran autoconf to generate one.\ngit-master did not have a config-guess or config-sub.\n\nCompile with GCC 6.2\n\n./configure --with-libpcre2 --with-openssl --with-curl\n\nconfigure: Setting lib to 'lib' (the default)\nconfigure: Will try -pthread then -lpthread to enable POSIX Threads.\nconfigure: CHECKS for site configuration\nchecking for gcc... /usr/local/Cellar/gcc6/6.2.0/bin/gcc-6\nchecking for C compiler default output file name... a.out\nchecking whether the C compiler works... yes\nchecking whether we are cross compiling... no\nchecking for suffix of executables...\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether /usr/local/Cellar/gcc6/6.2.0/bin/gcc-6 accepts -g... yes\nchecking for /usr/local/Cellar/gcc6/6.2.0/bin/gcc-6 option to accept ISO C89... none needed\nchecking how to run the C preprocessor... /usr/local/Cellar/gcc6/6.2.0/bin/cpp-6\nchecking for grep that handles long lines and -e... /usr/bin/grep\nchecking for egrep... /usr/bin/grep -E\nchecking for ANSI C header files... yes\nchecking for sys/types.h... yes\nchecking for sys/stat.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for memory.h... yes\nchecking for strings.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for unistd.h... yes\nchecking for working alloca.h... yes\nchecking for alloca... yes\nconfigure: CHECKS for programs\nchecking whether we are using the GNU C compiler... (cached) yes\nchecking whether /usr/local/Cellar/gcc6/6.2.0/bin/gcc-6 accepts -g... (cached) yes\nchecking for /usr/local/Cellar/gcc6/6.2.0/bin/gcc-6 option to accept ISO C89... (cached) none needed\nchecking for inline... inline\nchecking if linker supports -R... no\nchecking if linker supports -Wl,-rpath,... yes\nchecking for gar... gar\nchecking for gtar... no\nchecking for tar... tar\nchecking for gnudiff... no\nchecking for gdiff... no\nchecking for diff... diff\nchecking for asciidoc... asciidoc\nchecking for asciidoc version... asciidoc 8.6.9\nUsing 'grep -a' for sane_grep\nconfigure: CHECKS for libraries\nchecking for SHA1_Init in -lcrypto... yes\nchecking for pcre2_config_8 in -lpcre2-8... yes\nchecking for curl_global_init in -lcurl... yes\nchecking for curl-config... curl-config\nconfigure: Setting CURL_LDFLAGS to '-lcurl'\nchecking for XML_ParserCreate in -lexpat... yes\nchecking for iconv in -lc... no\nchecking for iconv in -liconv... yes\nchecking for deflateBound in -lz... yes\nchecking for socket in -lc... yes\nchecking for inet_ntop... yes\nchecking for inet_pton... yes\nchecking for hstrerror... yes\nchecking for basename in -lc... yes\nchecking for gettext in -lc... no\nchecking libintl.h usability... no\nchecking libintl.h presence... no\nchecking for libintl.h... no\nconfigure: CHECKS for header files\nchecking sys/select.h usability... yes\nchecking sys/select.h presence... yes\nchecking for sys/select.h... yes\nchecking poll.h usability... yes\nchecking poll.h presence... yes\nchecking for poll.h... yes\nchecking sys/poll.h usability... yes\nchecking sys/poll.h presence... yes\nchecking for sys/poll.h... yes\nchecking for inttypes.h... (cached) yes\nchecking for old iconv()... no\nconfigure: CHECKS for typedefs, structures, and compiler characteristics\nchecking for socklen_t... yes\nchecking for struct itimerval... yes\nchecking for struct stat.st_mtimespec.tv_nsec... yes\nchecking for struct stat.st_mtim.tv_nsec... no\nchecking for struct dirent.d_type... yes\nchecking for struct passwd.pw_gecos... yes\nchecking for struct sockaddr_storage... yes\nchecking for struct addrinfo... yes\nchecking for getaddrinfo... yes\nchecking for library containing getaddrinfo... none required\nchecking whether the platform regex supports REG_STARTEND... yes\nchecking whether system succeeds to read fopen'ed directory... yes\nchecking whether snprintf() and/or vsnprintf() return bogus value... no\nchecking whether the platform uses typical file type bits... yes\nconfigure: CHECKS for library functions\nchecking libgen.h usability... yes\nchecking libgen.h presence... yes\nchecking for libgen.h... yes\nchecking paths.h usability... yes\nchecking paths.h presence... yes\nchecking for paths.h... yes\nchecking libcharset.h usability... yes\nchecking libcharset.h presence... yes\nchecking for libcharset.h... yes\nchecking for strings.h... (cached) yes\nchecking for locale_charset in -liconv... yes\nchecking for clock_gettime... no\nchecking for CLOCK_MONOTONIC... no\nchecking for setitimer... yes\nchecking for library containing setitimer... none required\nchecking for strcasestr... yes\nchecking for library containing strcasestr... none required\nchecking for memmem... no\nchecking for strlcpy... yes\nchecking for library containing strlcpy... none required\nchecking for uintmax_t... yes\nchecking for strtoumax... yes\nchecking for library containing strtoumax... none required\nchecking for setenv... yes\nchecking for library containing setenv... none required\nchecking for unsetenv... yes\nchecking for library containing unsetenv... none required\nchecking for mkdtemp... yes\nchecking for library containing mkdtemp... none required\nchecking for initgroups... yes\nchecking for library containing initgroups... none required\nchecking for getdelim... no\nchecking for BSD sysctl... yes\nchecking for POSIX Threads with ''... yes\nconfigure: creating ./config.status\nconfig.status: creating config.mak.autogen\nconfig.status: executing config.mak.autogen commands\n\nmake\n\nld: warning: in libgit.a, file was built for unsupported file format which is not the architecture being linked (x86_64)\nld: warning: in xdiff/lib.a, file was built for unsupported file format which is not the architecture being linked (x86_64)\nUndefined symbols:\n   \"_strbuf_addstr_urlencode\", referenced from:\n       _store_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n   \"_attr_start\", referenced from:\n       _main in common-main.o\n   \"_strbuf_release\", referenced from:\n       _parse_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n   \"_string_list_append\", referenced from:\n       _cmd_main in credential-store.o\n   \"_credential_clear\", referenced from:\n       _parse_credential_file in credential-store.o\n   \"_initialize_the_repository\", referenced from:\n       _main in common-main.o\n   \"_strbuf_getline_lf\", referenced from:\n       _parse_credential_file in credential-store.o\n       _parse_credential_file in credential-store.o\n   \"_usage_with_options\", referenced from:\n       _cmd_main in credential-store.o\n   \"_credential_from_url\", referenced from:\n       _parse_credential_file in credential-store.o\n   \"_credential_read\", referenced from:\n       _cmd_main in credential-store.o\n   \"_commit_lock_file\", referenced from:\n       _rewrite_credential_file in credential-store.o\n   \"_die_errno\", referenced from:\n       _parse_credential_file in credential-store.o\n       _rewrite_credential_file in credential-store.o\n       _rewrite_credential_file in credential-store.o\n   \"_credential_match\", referenced from:\n       _parse_credential_file in credential-store.o\n   \"_string_list_clear\", referenced from:\n       _cmd_main in credential-store.o\n   \"_git_fopen\", referenced from:\n       _parse_credential_file in credential-store.o\n   \"_hold_lock_file_for_update_timeout\", referenced from:\n       _rewrite_credential_file in credential-store.o\n   \"_strbuf_slopbuf\", referenced from:\n       _parse_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n   \"_use_gettext_poison\", referenced from:\n       _main in common-main.o\n   \"_expand_user_path\", referenced from:\n       _cmd_main in credential-store.o\n   \"_parse_options\", referenced from:\n       _cmd_main in credential-store.o\n   \"_git_resolve_executable_dir\", referenced from:\n       _main in common-main.o\n   \"_write_or_die\", referenced from:\n       _print_line in credential-store.o\n   \"_die\", referenced from:\n       _cmd_main in credential-store.o\n       _cmd_main in credential-store.o\n   \"_string_list_append_nodup\", referenced from:\n       _cmd_main in credential-store.o\n       _cmd_main in credential-store.o\n   \"_strbuf_addf\", referenced from:\n       _store_credential_file in credential-store.o\n   \"_get_tempfile_fd\", referenced from:\n       _print_line in credential-store.o\n   \"_sanitize_stdfds\", referenced from:\n       _main in common-main.o\n   \"_strbuf_grow\", referenced from:\n       _print_line in credential-store.o\n       _store_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n       _store_credential_file in credential-store.o\n   \"_xdg_config_home\", referenced from:\n       _cmd_main in credential-store.o\nld: symbol(s) not found\ncollect2: error: ld returned 1 exit status\nmake: *** [git-credential-store] Error 1\nDouglas-Godfrey-2s-Mac-Pro:git-master dgodfrey$\n\n\n\n\n\n\n\n\n\n\n\n"},{"id":"368850","messageId":"20190208181503.GC27673@sigill.intra.peff.net","threadId":"50433","inReplyTo":"1a9f02ca-3bc3-f00f-6923-1bbf050e84ca@whamtech.com","subject":"Re: undefined symbols building GIT source from githu","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-02-08T18:15:03Z","receivedAt":"2019-02-08T18:15:07Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Feb 08, 2019 at 01:13:04AM -0500, Douglas Godfrey wrote:\n\n> make\n> \n> ld: warning: in libgit.a, file was built for unsupported file format which is not the architecture being linked (x86_64)\n> ld: warning: in xdiff/lib.a, file was built for unsupported file format which is not the architecture being linked (x86_64)\n> Undefined symbols:\n>   \"_strbuf_addstr_urlencode\", referenced from:\n> [...]\n\nIt sounds like there is a mismatch between your compiler/linker and\n\"ar\". I had a vague recollection of this coming up before, and turned\nthis up in the archive:\n\n  https://public-inbox.org/git/CAH8yC8kV77h8cRA9Qo_1FYe9sv0zgsE7yKxaX+OtpRfj9+7wog@mail.gmail.com/\n\ndoes setting AR/ARFLAGS as in that patch help (note that the original\ncomplaint is that ARFLAGS is not respected, but that was since changed\nin response to that thread).\n\n-Peff\n"}]}