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

bug: failed building go-piper #1356

Closed
mudler opened this issue Nov 28, 2023 · 11 comments · Fixed by #1357 or #1393
Closed

bug: failed building go-piper #1356

mudler opened this issue Nov 28, 2023 · 11 comments · Fixed by #1357 or #1393
Assignees
Labels
bug Something isn't working high prio

Comments

@mudler
Copy link
Owner

mudler commented Nov 28, 2023

LocalAI version:
Current CI

Environment, CPU architecture, OS, and Version:

Describe the bug
Seems to be started recently within the CI - while building the container image. Compilation fails with:

 #26 655.6 /usr/local/go/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -X=runtime.godebugDefault=panicnil=1 -buildmode=exe -buildid=h7hMPg1Dyu87U6l-I3iu/P6-xN_sVDPWnWcq4KpKJ/KXkZZ1XYMeBR6OxAs8WH/h7hMPg1Dyu87U6l-I3iu -extld=g++ $WORK/b001/_pkg_.a
#26 655.9 # github.com/mudler/go-piper/example
#26 655.9 /usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
#26 655.9 /usr/bin/ld: warning: libucd.so, needed by ./piper/build/pi/lib/libespeak-ng.so, not found (try using -rpath or -rpath-link)
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_ispunct'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_properties'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isdigit'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isupper'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isspace'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isalpha'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_toupper'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isalnum'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_lookup_category'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_tolower'
#26 655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_islower'
#26 655.9 collect2: error: ld returned 1 exit status
#26 655.9 
#26 655.9 make[1]: *** [Makefile:32: example/main] Error 1
#26 655.9 make[1]: Leaving directory '/build/sources/go-piper'
#26 655.9 make: *** [Makefile:223: sources/go-piper/libpiper_binding.a] Error 2
#26 ERROR: process "/bin/sh -c make build" did not complete successfully: exit code: 2
------
 > [builder 7/8] RUN make build:
655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_toupper'
655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_isalnum'
655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_lookup_category'
655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_tolower'
655.9 /usr/bin/ld: ./piper/build/pi/lib/libespeak-ng.so: undefined reference to `ucd_islower'
655.9 collect2: error: ld returned 1 exit status
655.9 
655.9 make[1]: *** [Makefile:32: example/main] Error 1
655.9 make[1]: Leaving directory '/build/sources/go-piper'
655.9 make: *** [Makefile:223: sources/go-piper/libpiper_binding.a] Error 2

To Reproduce

Expected behavior

Logs
https://github.com/mudler/LocalAI/actions/runs/7015798457/job/19099206160

Additional context
N/A

@mudler mudler added the bug Something isn't working label Nov 28, 2023
@mudler mudler self-assigned this Nov 28, 2023
@mudler
Copy link
Owner Author

mudler commented Nov 28, 2023

cc @M0Rf30 - do you maybe have any idea ? it started just recently, didn't had a closer look yet

@mudler
Copy link
Owner Author

mudler commented Nov 28, 2023

pretty sure there is something moving now in the source - maybe some targets when building up espeak is not pinpointing hashes, but checking out main branches of deps

@M0Rf30
Copy link
Collaborator

M0Rf30 commented Nov 28, 2023

No idea. seems that libucd.so is missing. I found this
rhasspy/piper#286

maybe you switched or upgraded agent distro?

@mudler
Copy link
Owner Author

mudler commented Nov 28, 2023

No idea. seems that libucd.so is missing. I found this rhasspy/piper#286

maybe you switched or upgraded agent distro?

nope, not at all - the commit history https://github.com/mudler/LocalAI/commits/master shows it started to fail all of a sudden with unrelated changes. Doesn't look a coincidence that the same failure started yesterday 👀 good catch!

@M0Rf30
Copy link
Collaborator

M0Rf30 commented Nov 28, 2023

Another detail is that re-building tiny-dream branch with gcc 13 (in tests.yaml) doesn't show this error.
https://github.com/mudler/LocalAI/actions/runs/7021951682/job/19105208740?pr=1283 (as you can see I don't rebased on the very latest master commits)

have to use gcc cause of "Permitting static constexpr variables in constexpr functions" (https://gcc.gnu.org/projects/cxx-status.html)

maybe using gcc13 also in the build stage (that now fails as yours) would do the trick

@M0Rf30
Copy link
Collaborator

M0Rf30 commented Nov 28, 2023

Ok I know why.
https://github.com/rhasspy/piper-phonemize/blob/master/CMakeLists.txt
calls latest master espeak-ng fork by rhasspy and....

as you can see here
https://github.com/rhasspy/espeak-ng/commits/master

latest commit deals with libucd. so using a fixed reference (70d90003174e19ccc523285800611c8c607e347e) during the piper-phonemize will fix.

In any case this is the actual path for libucd:
build/pi/lib/libucd.so

@mudler
Copy link
Owner Author

mudler commented Nov 28, 2023

Thanks @M0Rf30 for the detective work! that's indeed bad - there is also no way to pinpoint that in the CMakefile, so we are back at having to find a workaround until it gets fixed upstream

@M0Rf30
Copy link
Collaborator

M0Rf30 commented Nov 28, 2023

mudler/go-piper#4
#1357

@mudler
Copy link
Owner Author

mudler commented Nov 28, 2023

mudler/go-piper#4 #1357

Thanks! I'm still a bit worried that the CMake points to master, but maybe we can work upstream to get it pinned somehow

Update, opened: rhasspy/piper-phonemize#22

mudler added a commit to mudler/piper-phonemize that referenced this issue Nov 28, 2023
this lets to specify a custom espeak-ng version

See also: mudler/LocalAI#1356
@mudler mudler assigned M0Rf30 and mudler and unassigned M0Rf30 and mudler Nov 28, 2023
mudler added a commit to mudler/piper-phonemize that referenced this issue Nov 28, 2023
this lets to specify a custom espeak-ng version

See also: mudler/LocalAI#1356
@mudler
Copy link
Owner Author

mudler commented Dec 6, 2023

Still hits us with the last commits: #1387 (comment)

@mudler mudler reopened this Dec 6, 2023
@localai-bot
Copy link
Contributor

⚠️⚠️⚠️⚠️⚠️

Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!

but.... I can also be funny or helpful 😸 and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.

Don't engage in conversation with me,
I don't support (yet) replying!

⚠️⚠️⚠️⚠️⚠️

ERROR: The prompt size exceeds the context window size and cannot be processed.

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high prio
Projects
None yet
3 participants