TheAlgorithms / C

Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
https://thealgorithms.github.io/C
GNU General Public License v3.0
19.16k stars 4.36k forks source link

[BUG] CMakeFiles/spirograph.dir/flags.make: Nie ma takiego pliku ani katalogu #918

Closed adammaj1 closed 2 years ago

adammaj1 commented 2 years ago

Description

Hi,

I try to compile the code

@zalman:~/C$ cmake -B build -S .
-- The C compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Building with OpenMP Multithreading.
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for complex.h
-- Looking for complex.h - found
-- Looking for complex
-- Looking for complex - found
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  graphics/CMakeLists.txt:1 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/C/build
a@zalman:~/C$ make
[  1%] Built target test_min_printf
[  2%] Built target malloc_dbg
[  2%] Built target test_malloc_dbg
[  3%] Built target hash_xor8
[  4%] Built target hash_sdbm
[  4%] Built target hash_djb2
[  5%] Built target hash_crc32
[  5%] Built target hash_adler32
[  5%] Built target union_find
[  6%] Built target tower_of_hanoi
[  7%] Built target sudoku_solver
[  7%] Built target strong_number
[  7%] Built target factorial_trailing_zeroes
[  7%] Built target gcd
[  7%] Built target factorial
[  7%] Built target armstrong_number
[  8%] Built target fibonacci_dp
[  9%] Built target demonetization
[  9%] Built target cartesian_to_polar
[ 10%] Built target cantor_set
[ 11%] Built target fibonacci
[ 11%] Built target fibonacci_fast
[ 12%] Built target is_armstrong
[ 13%] Built target pid
[ 13%] Built target large_factorials
[ 14%] Built target lcm
[ 15%] Built target collatz
[ 15%] Built target mirror
[ 16%] Built target factorial_large_number
[ 17%] Built target rselect
[ 18%] Built target palindrome
[ 19%] Built target poly_add
[ 19%] Built target lexicographic_permutations
[ 19%] Built target postfix_evaluation
[ 20%] Built target prime
[ 21%] Built target catalan
[ 22%] Built target quartile
[ 22%] Built target longest_subsequence
[ 23%] Built target prime_factoriziation
[ 24%] Built target lerp
[ 24%] Built target prime_seive
[ 24%] Built target tic_tac_toe
[ 24%] Built target naval_battle
[ 25%] Built target alaw
[ 26%] Built target stooge_sort
[ 27%] Built target shaker_sort
[ 28%] Built target bucket_sort
[ 28%] Built target cycle_sort
[ 28%] Built target radix_sort
[ 28%] Built target shell_sort
[ 29%] Built target bubble_sort_recursion
[ 30%] Built target counting_sort
[ 30%] Built target bubble_sort_2
[ 30%] Built target heap_sort
[ 31%] Built target shell_sort2
[ 31%] Built target partition_sort
[ 32%] Built target gnome_sort
[ 32%] Built target cocktail_sort
[ 33%] Built target bubble_sort
[ 33%] Built target bogo_sort
[ 33%] Built target binary_insertion_sort
[ 34%] Built target pancake_sort
[ 35%] Built target bead_sort
[ 36%] Built target heap_sort_2
[ 37%] Built target multikey_quick_sort
[ 38%] Built target random_quick_sort
[ 38%] Built target comb_sort
[ 38%] Built target merge_sort
[ 38%] Built target insertion_sort_recursive
[ 39%] Built target merge_sort_nr
[ 39%] Built target odd_even_sort
[ 39%] Built target pigeonhole_sort
[ 40%] Built target quick_sort
[ 41%] Built target selection_sort_recursive
[ 42%] Built target insertion_sort
[ 43%] Built target radix_sort_2
[ 43%] Built target selection_sort
[ 44%] Built target vectors_3d
[ 44%] Built target quaternions
graphics/CMakeFiles/spirograph.dir/build.make:77: CMakeFiles/spirograph.dir/flags.make: Nie ma takiego pliku ani katalogu
make[2]: *** Brak reguł do wykonania obiektu 'CMakeFiles/spirograph.dir/flags.make'. Stop.
make[1]: *** [CMakeFiles/Makefile2:2834: graphics/CMakeFiles/spirograph.dir/all] Błąd 2
make: *** [Makefile:171: all] Błąd 2

Expected behavior

compil

Actual behavior

failed compilation

Possible fix

No response

Steps to reproduce

cmake -B build -S . make

Context

simple compilation

Additional information

No response

Panquesito7 commented 2 years ago

Could you please change your language to English so I can understand the errors provided? Thank you. 🙂

adammaj1 commented 2 years ago
$ LANG=en_us_8859_1
a@zalman:~/C$ cmake -B build -S .
-- Building with OpenMP Multithreading.
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  graphics/CMakeLists.txt:1 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/C/build
a@zalman:~/C$ make
[  1%] Built target test_min_printf
[  2%] Built target malloc_dbg
[  2%] Built target test_malloc_dbg
[  3%] Built target hash_xor8
[  4%] Built target hash_sdbm
[  4%] Built target hash_djb2
[  5%] Built target hash_crc32
[  5%] Built target hash_adler32
[  5%] Built target union_find
[  6%] Built target tower_of_hanoi
[  7%] Built target sudoku_solver
[  7%] Built target strong_number
[  7%] Built target factorial_trailing_zeroes
[  7%] Built target gcd
[  7%] Built target factorial
[  7%] Built target armstrong_number
[  8%] Built target fibonacci_dp
[  9%] Built target demonetization
[  9%] Built target cartesian_to_polar
[ 10%] Built target cantor_set
[ 11%] Built target fibonacci
[ 11%] Built target fibonacci_fast
[ 12%] Built target is_armstrong
[ 13%] Built target pid
[ 13%] Built target large_factorials
[ 14%] Built target lcm
[ 15%] Built target collatz
[ 15%] Built target mirror
[ 16%] Built target factorial_large_number
[ 17%] Built target rselect
[ 18%] Built target palindrome
[ 19%] Built target poly_add
[ 19%] Built target lexicographic_permutations
[ 19%] Built target postfix_evaluation
[ 20%] Built target prime
[ 21%] Built target catalan
[ 22%] Built target quartile
[ 22%] Built target longest_subsequence
[ 23%] Built target prime_factoriziation
[ 24%] Built target lerp
[ 24%] Built target prime_seive
[ 24%] Built target tic_tac_toe
[ 24%] Built target naval_battle
[ 25%] Built target alaw
[ 26%] Built target stooge_sort
[ 27%] Built target shaker_sort
[ 28%] Built target bucket_sort
[ 28%] Built target cycle_sort
[ 28%] Built target radix_sort
[ 28%] Built target shell_sort
[ 29%] Built target bubble_sort_recursion
[ 30%] Built target counting_sort
[ 30%] Built target bubble_sort_2
[ 30%] Built target heap_sort
[ 31%] Built target shell_sort2
[ 31%] Built target partition_sort
[ 32%] Built target gnome_sort
[ 32%] Built target cocktail_sort
[ 33%] Built target bubble_sort
[ 33%] Built target bogo_sort
[ 33%] Built target binary_insertion_sort
[ 34%] Built target pancake_sort
[ 35%] Built target bead_sort
[ 36%] Built target heap_sort_2
[ 37%] Built target multikey_quick_sort
[ 38%] Built target random_quick_sort
[ 38%] Built target comb_sort
[ 38%] Built target merge_sort
[ 38%] Built target insertion_sort_recursive
[ 39%] Built target merge_sort_nr
[ 39%] Built target odd_even_sort
[ 39%] Built target pigeonhole_sort
[ 40%] Built target quick_sort
[ 41%] Built target selection_sort_recursive
[ 42%] Built target insertion_sort
[ 43%] Built target radix_sort_2
[ 43%] Built target selection_sort
[ 44%] Built target vectors_3d
[ 44%] Built target quaternions
graphics/CMakeFiles/spirograph.dir/build.make:77: CMakeFiles/spirograph.dir/flags.make: No such file or directory
make[2]: *** No rule to make target 'CMakeFiles/spirograph.dir/flags.make'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2834: graphics/CMakeFiles/spirograph.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
adammaj1 commented 2 years ago
a@zalman:~/C/graphics$ cmake -B build -S .
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:1 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.18)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/C/graphics/build
a@zalman:~/C/graphics$ make
[ 50%] Linking C executable spirograph
/usr/bin/ld: CMakeFiles/spirograph.dir/spirograph.o: undefined reference to symbol 'sin@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/spirograph.dir/build.make:107: spirograph] Błąd 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/spirograph.dir/all] Błąd 2
make: *** [Makefile:149: all] Błąd 2
adammaj1 commented 2 years ago
ldd --version
ldd (Ubuntu GLIBC 2.34-0ubuntu3) 2.34

a@zalman:~/C/graphics$ getconf GNU_LIBC_VERSION
glibc 2.34

is it a problem caused by different glibc version ?

github-actions[bot] commented 2 years ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 years ago

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!