Skip to content

examples : add compiler version and target to build info #2998

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

Merged
merged 8 commits into from
Sep 15, 2023

Conversation

cebtenzzre
Copy link
Collaborator

As suggested by @staviq in #2922 (comment).
I haven't touched dump_non_result_info_yaml, llama-bench.cpp, or server.cpp.
I haven't tested on Windows, and I'm not really sure what kind of useful info I can get out of MSVC besides _MSC_VER.

Example output:

main: build = 1175 (b53cfef9)
main: built with gcc (GCC) 13.2.1 20230801 for x86_64-pc-linux-gnu
main: seed  = 1693785456

@slaren
Copy link
Member

slaren commented Sep 18, 2023

When building with cmake I get this:

-- Found Git: /usr/bin/git (found version "2.39.2")
_: 1: --version: not found
[ 41%] Built target BUILD_INFO

and build-info.h contains:

#define BUILD_COMPILER ""
#define BUILD_TARGET "unknown"

Which I think is from this PR.

@cebtenzzre do you know what may cause this?

@slaren
Copy link
Member

slaren commented Sep 18, 2023

I cleared the build directory and reconfigured and the problem disappeared, but I am still a bit confused because I had already cleared it several times before today.

@cebtenzzre
Copy link
Collaborator Author

do you know what may cause this?

That can only happen if CMAKE_C_COMPILER is not set. What is your compiler? I'm not a CMake expert, I'm not sure what I should do instead. make has $(CC) which just works.

@slaren
Copy link
Member

slaren commented Sep 18, 2023

My compiler is the gcc that ships with Ubuntu:

#define BUILD_COMPILER "cc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0"
#define BUILD_TARGET "x86_64-linux-gnu"

Maybe it was a fluke, I'll see if I can reproduce the issue again, until then please ignore this.

pkrmf pushed a commit to morlockstudios-com/llama.cpp that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants