Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a customized old version of c++ zstd... using this wrapper... issue #37

Open
hiqsociety opened this issue May 24, 2021 · 1 comment
Labels
question Further information is requested

Comments

@hiqsociety
Copy link

hiqsociety commented May 24, 2021

great work by the way.

i'm using a very old and customized version of zstd. how do i replace

i've compiled my own c++ zstd into /usr/local/lib but... error here:

is it possible for the c wrapper to use different library files separately to compile? how to do this?

otherwise, how do i replace the 3 functions below? coz they are in the newer zstd package

CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib -lboost_fiber -lboost_context -lstdc++ -lm -lz -lsnappy -llz4 -lzstd -lbz2 -ljemalloc -pthread -lm -lgomp -lrt -ldl -laio" go get -u github.com/[myownrepo]/frocks
 

# github.com/valyala/gozstd


/usr/bin/ld: $WORK/b049/_x003.o: in function `_cgo_e9b7c5fe0b6f_Cfunc_ZSTD_getFrameContentSize_wrapper':
gozstd.cgo2.c:(.text+0x29b): undefined reference to `ZSTD_getFrameContentSize'
/usr/bin/ld: $WORK/b049/_x005.o: in function `_cgo_e9b7c5fe0b6f_Cfunc_ZSTD_CCtx_refCDict_wrapper':
writer.cgo2.c:(.text+0x1b): undefined reference to `ZSTD_CCtx_refCDict'
/usr/bin/ld: $WORK/b049/_x005.o: in function `_cgo_e9b7c5fe0b6f_Cfunc_ZSTD_CCtx_setParameter_wrapper':
writer.cgo2.c:(.text+0x5d): undefined reference to `ZSTD_CCtx_setParameter'
collect2: error: ld returned 1 exit status

@valyala valyala added the question Further information is requested label Jan 31, 2022
@valyala
Copy link
Owner

valyala commented Jan 31, 2022

@hiqsociety , the missing functions - ZSTD_getFrameContentSize, ZSTD_CCtx_refCDict and ZSTD_CCtx_setParameter - are used by gozstd. You can either remove the code, which calls these functions from gozstd or to replace them with equivalent functions from your version of zstd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants