Skip to content

Compiling on MacOS: Undefined symbols for architecture arm64: "dummy_register()" #122

Description

@jeffrafter

I might be doing something wrong but when following the instructions in the README I encountered the following on MacOS:

❯ cmake --build build --config Release                                                                             (base) 
[ 13%] Built target ggml-base
[ 20%] Built target ggml-metal
[ 31%] Built target ggml-cpu
[ 34%] Built target ggml-blas
[ 39%] Built target ggml
[ 74%] Built target tts
[ 75%] Linking CXX executable ../../bin/tts-cli
ld: warning: ignoring duplicate libraries: '../../ggml/src/libggml.a'
Undefined symbols for architecture arm64:
  "dummy_register()", referenced from:
      __GLOBAL__sub_I_loaders.cpp in libtts.a[10](loaders.cpp.o)
ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/tts-cli] Error 1
make[1]: *** [examples/cli/CMakeFiles/tts-cli.dir/all] Error 2
make: *** [all] Error 2

In order to get around this I changed src/models/CMakeLists.txt from:

target_sources(tts PRIVATE
        loaders.cpp
        loaders.h
)

add_subdirectory(dia)
if (LINUX)
    add_subdirectory(dummy)
endif ()
add_subdirectory(kokoro)
add_subdirectory(orpheus)
add_subdirectory(parler)

to:

target_sources(tts PRIVATE
        loaders.cpp
        loaders.h
)

add_subdirectory(dia)
add_subdirectory(dummy)
add_subdirectory(kokoro)
add_subdirectory(orpheus)
add_subdirectory(parler)

After that everything compiles and works. I'm wondering why this was limited only to Linux but my guess is that it has to do with espeak (which I am not using). Happy to submit a PR if this solution is okay.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions