Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14965
| From | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | How to compile hashlib.c for testing? |
| Date | 2018-12-26 15:31 -0600 |
| Message-ID | <mailman.6332.1545859883.1284.bug-bash@gnu.org> (permalink) |
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
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
How to compile hashlib.c for testing? Peng Yu <pengyu.ut@gmail.com> - 2018-12-26 15:31 -0600
csiph-web