Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14965 > unrolled thread

How to compile hashlib.c for testing?

Started byPeng Yu <pengyu.ut@gmail.com>
First post2018-12-26 15:31 -0600
Last post2018-12-26 15:31 -0600
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug


Contents

  How to compile hashlib.c for testing? Peng Yu <pengyu.ut@gmail.com> - 2018-12-26 15:31 -0600

#14965 — How to compile hashlib.c for testing?

FromPeng Yu <pengyu.ut@gmail.com>
Date2018-12-26 15:31 -0600
SubjectHow to compile hashlib.c for testing?
Message-ID<mailman.6332.1545859883.1284.bug-bash@gnu.org>
Hi,

I'd like to compile hashlib.c to try its main(). But I got the
following error. What is the correct commands to compile it? Thanks.

$ gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"'
-DCONF_OSTYPE='"darwin17.7.0"'
-DCONF_MACHTYPE='"x86_64-apple-darwin17.7.0"' -DCONF_VENDOR='"apple"'
-DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL
-DTEST_HASHING -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib
-I./lib/intl -I/Users/pengy/Downloads/bash-4.4/lib/intl  -g -O2
-Wno-parentheses -Wno-format-security -c hashlib.c
$ gcc -c hashlib.o  hashlib.exe
Undefined symbols for architecture x86_64:
  "_xmalloc", referenced from:
      _hash_create in hashlib.o
      _hash_copy in hashlib.o
      _hash_search in hashlib.o
      _hash_insert in hashlib.o
      _main in hashlib.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

-- 
Regards,
Peng

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web