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

set_target_properties called with incorrect number of arguments #347

Open
programmerq opened this issue Jul 5, 2023 · 1 comment
Open

Comments

@programmerq
Copy link

When building on a system missing expected CPU flags, it is actually possible for the CMakeLists.txt to never set the GGML_C_FLAGS variable. This causes this line to be called with no value:

set_target_properties(${TEST_TARGET} PROPERTIES COMPILE_FLAGS ${GGML_C_FLAGS})

-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Linux detected
-- x86 detected
-- Linux detected
CMake Error at tests/CMakeLists.txt:145 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


-- Configuring incomplete, errors occurred!
See also "/path/to/ggml/build/CMakeFiles/CMakeOutput.log".
See also "/path/to/ggml/build/CMakeFiles/CMakeError.log".

Here are the flags from cpuinfo:

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm cpuid_fault pti

In my case, I simply chosen incorrect settings in my KVM vm, so I was able to reboot with the correct configuration. I still didn't expect a missing CPU flag to cause a compile error. At the very least, it should warn whether those flags are required. If they aren't it should build without them.

@phcreery
Copy link

phcreery commented Dec 9, 2023

I am running into the same issue. What CPU flags did you need to modify for your KVM to get it working?

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

No branches or pull requests

2 participants