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


Groups > gnu.bash.bug > #14968

Re: How to compile hashlib.c for testing?

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: How to compile hashlib.c for testing?
Date 2018-12-27 13:27 -0500
Organization ITS, Case Western Reserve University
Message-ID <mailman.6404.1545935256.1284.bug-bash@gnu.org> (permalink)
References <CABrM6wm+x0hGuSVYeRLSE9=6vuadxP++4+gSoG+Tm7_yYN4Duw@mail.gmail.com>

Show all headers | View raw


On 12/26/18 4:31 PM, Peng Yu wrote:
> 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.

Think about the error message:

>   "_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

So you need a definition for xmalloc. The easiest thing to do is to add
an xmalloc function in the TEST_HASHING block, or you could follow the
directions in the comment there.

Sooner or later, you're going to have to pick this stuff up on your own.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: How to compile hashlib.c for testing? Chet Ramey <chet.ramey@case.edu> - 2018-12-27 13:27 -0500

csiph-web