-
Notifications
You must be signed in to change notification settings - Fork 77
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
support building static libraries #21
base: master
Are you sure you want to change the base?
Conversation
@@ -142,6 +144,10 @@ target_link_libraries( | |||
onnxruntime | |||
) | |||
|
|||
if(NOT BUILD_SHARED_LIBS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is to fix the following link errors:
[ 45%] Built target piper_phonemize
[ 54%] Linking CXX executable piper_phonemize
Undefined symbols for architecture x86_64:
"_ucd_isalnum", referenced from:
_TranslateClauseWithTerminator in libespeak-ng.a(translate.c.o)
_ReadClause in libespeak-ng.a(readclause.c.o)
"_ucd_isalpha", referenced from:
_TranslateChar in libespeak-ng.a(translate.c.o)
_CombineFlag in libespeak-ng.a(translate.c.o)
_GetTranslatedPhonemeString in libespeak-ng.a(dictionary.c.o)
_TranslateRules in libespeak-ng.a(dictionary.c.o)
_MatchRule in libespeak-ng.a(dictionary.c.o)
_ReadClause in libespeak-ng.a(readclause.c.o)
_IsAlpha in libespeak-ng.a(common.c.o)
...
"_ucd_isdigit", referenced from:
_TranslateClauseWithTerminator in libespeak-ng.a(translate.c.o)
_ReadClause in libespeak-ng.a(readclause.c.o)
src/phonemize.cpp | ||
src/phoneme_ids.cpp | ||
src/tashkeel.cpp | ||
src/shared.cpp | ||
) | ||
|
||
set_target_properties(piper_phonemize PROPERTIES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
piper-phonemize is used as a subproject in sherpa-onnx and it is always compiled from source along with sherpa-onnx.
We don't need to manage the version of piper-phonemize via soname.
In addition, setting soname will produce two more symlink files. If I use cp /path/to/install/lib/lib*.so* /some/dest/dir
, it will dereference the symlink files and copy the real file, which means there are two more copies of the lib.
I don't see the need to keep the soname. I cannot think of a use case where we only update the version of
piper-phonemize without updating the main project where piper-phonemize is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other people have requested this, so I'd like to keep it. We could make it an option, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other people have requested this, so I'd like to keep it. We could make it an option, though.
Ok, I will create an option, defaulting to ON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other people have requested this, so I'd like to keep it. We could make it an option, though.
Done.
Requires rhasspy/espeak-ng#1
for building static libraries.