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: STATIC COMPILE not static anymore :( #7719

Open
Zibri opened this issue Jun 3, 2024 · 2 comments
Open

Bug: STATIC COMPILE not static anymore :( #7719

Zibri opened this issue Jun 3, 2024 · 2 comments
Labels
bug-unconfirmed low severity Used to report low severity bugs in llama.cpp (e.g. cosmetic issues, non critical UI glitches)

Comments

@Zibri
Copy link

Zibri commented Jun 3, 2024

What happened?

Before I was compiling (mingw/clang64) with:
cmake . -DLLAMA_NATIVE=ON -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -B build --fresh

and the result was a static executable with no dependencies.

Name and Version

latest

What operating system are you seeing the problem on?

Windows

Relevant log output

now instead I get
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffa922d0000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffa905a0000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffa8fe90000)
        WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7ffa919f0000)
        RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ffa91be0000)
        ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7ffa8fba0000)
        libomp.dll => /clang64/bin/libomp.dll (0x7ffa5f0d0000)
        libc++.dll => /clang64/bin/libc++.dll (0x7ffa5f1a0000)
        PSAPI.DLL => /c/WINDOWS/System32/PSAPI.DLL (0x7ffa921c0000)

libomp.dll => /clang64/bin/libomp.dll (0x7ffa5f0d0000)
libc++.dll => /clang64/bin/libc++.dll (0x7ffa5f1a0000)

@Zibri Zibri added bug-unconfirmed low severity Used to report low severity bugs in llama.cpp (e.g. cosmetic issues, non critical UI glitches) labels Jun 3, 2024
@Zibri
Copy link
Author

Zibri commented Jun 3, 2024

I think -DLLAMA_OPENMP=OFF is needed too.

@slaren
Copy link
Collaborator

slaren commented Jun 4, 2024

Unfortunately I don't think there is an easy way to link to OpenMP statically. If you need a build with absolutely no dependencies, disabling OpenMP may be the only option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed low severity Used to report low severity bugs in llama.cpp (e.g. cosmetic issues, non critical UI glitches)
Projects
None yet
Development

No branches or pull requests

2 participants