Skip to content

build error: undefined reference to `crc64' #32

Description

@darmac

build bcache-tools faild at version: 1.0.8

log:

/tmp/root/spack-stage/spack-stage-bcache-1.0.8-tnsdfcsyjb6kbe5yraubcegcuk237xuy/spack-src/bcache-super-show.c:117: undefined reference to `crc64'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: bcache-super-show] Error 1
make: *** Waiting for unfinished jobs....
/usr/local/bin/ld: /tmp/ccSk24CW.o: in function `write_sb':
/tmp/root/spack-stage/spack-stage-bcache-1.0.8-tnsdfcsyjb6kbe5yraubcegcuk237xuy/spack-src/make-bcache.c:277: undefined reference to `crc64'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: make-bcache] Error 1

I think we should remove inline to make it linked with other obj?
or move crc64 inline code to bcache.h?

# grep -nr "crc64"
bcache.c:118:inline uint64_t crc64(const void *_data, size_t len)
bcache.h:118:uint64_t crc64(const void *_data, size_t len);
bcache.h:124:   crc64(((void *) (i)) + 8, ((void *) end(i)) - (((void *) (i)) + 8))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions