bcache-tools
bcache-tools copied to clipboard
build error: undefined reference to `crc64'
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))
@darmac I suffer the same issue too on CentOS8.0
[root@localhost bcache-tools-1.0.8]# sudo make install
cc -O2 -Wall -g pkg-config --cflags uuid blkid
make-bcache.c bcache.o pkg-config --libs uuid blkid
-o make-bcache
/tmp/ccRws7L1.o: In function write_sb': /root/wayne/bcache-tools-1.0.8/make-bcache.c:277: undefined reference to
crc64'
collect2: error: ld returned 1 exit status
make: *** [
anyone can help on this?
try this patch https://github.com/spack/spack/pull/15563/commits/3a4e304df3f87dfd850f1ca60a5fd8ff6dca4dfa#diff-893b0c35d1b8543f1dd4a62ad2bec568
@darmac buddy, could you please show me the detail command that I can merge your this patch?
some one already open an issue like this:
https://github.com/g2p/bcache-tools/issues/30
you can use patch
command to apply these patches.