support building static libraries#21
Conversation
| onnxruntime | ||
| ) | ||
|
|
||
| if(NOT BUILD_SHARED_LIBS) |
There was a problem hiding this comment.
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/shared.cpp | ||
| ) | ||
|
|
||
| set_target_properties(piper_phonemize PROPERTIES |
There was a problem hiding this comment.
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.
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.
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.
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.