Skip to content
New issue

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

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

Already on GitHub? # to your account

How can use extenrnal absl library #576

Closed
linuxpham opened this issue Oct 31, 2020 · 4 comments
Closed

How can use extenrnal absl library #576

linuxpham opened this issue Oct 31, 2020 · 4 comments

Comments

@linuxpham
Copy link

linuxpham commented Oct 31, 2020

Hi admin,

How can I use an external absl library when compiling your source code?
Because you always force use internal `absl' in third_party folder (_USE_INTERNAL_STRING_VIEW)

error: undefined reference to 'sentencepiece::SentencePieceProcessor::Load(std::basic_string_view<char, std::char_traits<char> >)' collect2: error: ld returned 1 exit status

Screen Shot 2020-11-01 at 03 19 00

Thanks !

@taku910
Copy link
Collaborator

taku910 commented Nov 1, 2020

At this moment, we don't support to external abls, but it is nice to support it.

@linuxpham
Copy link
Author

Do you have a plan to support it?

@taku910
Copy link
Collaborator

taku910 commented Nov 2, 2020

It depends on how many people use it. Could you elaborate the background?

@taku910
Copy link
Collaborator

taku910 commented Jan 8, 2021

The step is a little complicated, but now we support to build sentencepiece with external abseil.
We have to put the abseil package under third_party sub directory.

> git clone https://github.com/google/sentencepiece.git  
> cd sentencepiece/third_party/
> git clone https://github.com/abseil/abseil-cpp.git 
> rm -fr absl
> ln -s abseil-cpp/absl absl
> cd ..
> mkdir build
> cd build
> cmake .. -DSPM_USE_EXTERNAL_ABSL=ON -DSPM_ENABLE_SHARED=OFF
> make

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants