Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22157

Please help me with make errors [closed]

$
0
0

Upload CMakeLists and makefiles.I want to build allegeo. I want to build allegro itself. I get an error when I run make. What is the problem?


Here is the CMakeLists.txt file :

        # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying        # file Copyright.txt or https://cmake.org/licensing for details.        cmake_minimum_required(VERSION ${CMAKE_VERSION})        project(VerifyFortranC C Fortran)            enter code here        option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF)        if(VERIFY_CXX)          enable_language(CXX)          set(VerifyCXX VerifyCXX.cxx)          add_definitions(-DVERIFY_CXX)        endif()        include(FortranCInterface)        FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran)        include_directories(${HOME}/Android/Sdk/cmake/3.10.2.4988404/share/cmake-3.10/Modules/FortranCInterface/Verify)        LINK_DIRECTORIES(${HOME}/Android/Sdk/cmake/3.10.2.4988404/share/cmake-3.10/Modules/FortranCInterface/Verify)        add_library(VerifyFortran STATIC VerifyFortran.f)        add_executable(VerifyFortranC main.c VerifyC.c ${VerifyCXX})        target_link_libraries(VerifyFortranC VerifyFortran)        if(NOT VERIFY_CXX)          # The entry point (main) is defined in C; link with the C compiler.          set_property(TARGET VerifyFortranC PROPERTY LINKER_LANGUAGE C)        endif()        ------------------------------------------------------------------------

Here is the Makefile.txt file :

        # CMAKE generated file: DO NOT EDIT!        # Generated by "Unix Makefiles" Generator, CMake Version 3.10        # Default target executed when no arguments are given to make.        default_target: all        .PHONY : default_target        # Allow only one "make -f Makefile2" at a time, but pass parallelism.        .NOTPARALLEL:        #=============================================================================        # Special targets provided by cmake.        # Disable implicit rules so canonical targets will work.        .SUFFIXES:        # Remove some rules from gmake that .SUFFIXES does not remove.        SUFFIXES =        .SUFFIXES: .hpux_make_needs_suffix_list        # Suppress display of executed commands.        $(VERBOSE).SILENT:        # A target that is always out of date.        cmake_force:        .PHONY : cmake_force        #=============================================================================        # Set environment variables for the build.        # The shell in which to execute make rules.        SHELL = /bin/sh        # The CMake executable.        CMAKE_COMMAND = /usr/bin/cmake        # The command to remove a file.        RM = /usr/bin/cmake -E remove -f        # Escaping for special characters.        EQUALS = =        # The top-level source directory on which CMake was run.        CMAKE_SOURCE_DIR = /home/ryu-linux/allegro        # The top-level build directory on which CMake was run.        CMAKE_BINARY_DIR = /home/ryu-linux/allegro/build        #=============================================================================        # Targets provided globally by CMake.        # Special rule for the target rebuild_cache        rebuild_cache:            @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."            /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)        .PHONY : rebuild_cache        # Special rule for the target rebuild_cache        rebuild_cache/fast: rebuild_cache        .PHONY : rebuild_cache/fast        # Special rule for the target edit_cache        edit_cache:            @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."            /usr/bin/cmake-gui -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)        .PHONY : edit_cache        # Special rule for the target edit_cache        edit_cache/fast: edit_cache        .PHONY : edit_cache/fast        # The main all target        all: cmake_check_build_system            $(CMAKE_COMMAND) -E cmake_progress_start /home/ryu-linux/allegro/build/CMakeFiles /home/ryu-linux/allegro/build/CMakeFiles/progress.marks            $(MAKE) -f CMakeFiles/Makefile2 all            $(CMAKE_COMMAND) -E cmake_progress_start /home/ryu-linux/allegro/build/CMakeFiles 0        .PHONY : all        # The main clean target        clean:            $(MAKE) -f CMakeFiles/Makefile2 clean        .PHONY : clean        # The main clean target        clean/fast: clean        .PHONY : clean/fast        # Prepare targets for installation.        preinstall: all            $(MAKE) -f CMakeFiles/Makefile2 preinstall        .PHONY : preinstall        # Prepare targets for installation.        preinstall/fast:            $(MAKE) -f CMakeFiles/Makefile2 preinstall        .PHONY : preinstall/fast        # clear depends        depend:            $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1        .PHONY : depend        #=============================================================================        # Target rules for targets named VerifyFortran        # Build rule for target.        VerifyFortran: cmake_check_build_system            $(MAKE) -f CMakeFiles/Makefile2 VerifyFortran        .PHONY : VerifyFortran        # fast build rule for target.        VerifyFortran/fast:            $(MAKE) -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/build        .PHONY : VerifyFortran/fast        #=============================================================================        # Target rules for targets named VerifyFortranC        # Build rule for target.        VerifyFortranC: cmake_check_build_system            $(MAKE) -f CMakeFiles/Makefile2 VerifyFortranC        .PHONY : VerifyFortranC        # fast build rule for target.        VerifyFortranC/fast:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/build        .PHONY : VerifyFortranC/fast        VerifyC.o: VerifyC.c.o        .PHONY : VerifyC.o        # target to build an object file        VerifyC.c.o:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/VerifyC.c.o        .PHONY : VerifyC.c.o        VerifyC.i: VerifyC.c.i        .PHONY : VerifyC.i        # target to preprocess a source file        VerifyC.c.i:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/VerifyC.c.i        .PHONY : VerifyC.c.i        VerifyC.s: VerifyC.c.s        .PHONY : VerifyC.s        # target to generate assembly for a file        VerifyC.c.s:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/VerifyC.c.s        .PHONY : VerifyC.c.s        VerifyFortran.o: VerifyFortran.f.o        .PHONY : VerifyFortran.o        # target to build an object file        VerifyFortran.f.o:            $(MAKE) -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o        .PHONY : VerifyFortran.f.o        VerifyFortran.i: VerifyFortran.f.i        .PHONY : VerifyFortran.i        # target to preprocess a source file        VerifyFortran.f.i:            $(MAKE) -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/VerifyFortran.f.i        .PHONY : VerifyFortran.f.i        VerifyFortran.s: VerifyFortran.f.s        .PHONY : VerifyFortran.s        # target to generate assembly for a file        VerifyFortran.f.s:            $(MAKE) -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/VerifyFortran.f.s        .PHONY : VerifyFortran.f.s        main.o: main.c.o        .PHONY : main.o        # target to build an object file        main.c.o:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/main.c.o        .PHONY : main.c.o        main.i: main.c.i        .PHONY : main.i        # target to preprocess a source file        main.c.i:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/main.c.i        .PHONY : main.c.i        main.s: main.c.s        .PHONY : main.s        # target to generate assembly for a file        main.c.s:            $(MAKE) -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/main.c.s        .PHONY : main.c.s        # Help Target        help:            @echo "The following are some of the valid targets for this Makefile:"            @echo "... all (the default if no target is provided)"            @echo "... clean"            @echo "... depend"            @echo "... rebuild_cache"            @echo "... VerifyFortran"            @echo "... edit_cache"            @echo "... VerifyFortranC"            @echo "... VerifyC.o"            @echo "... VerifyC.i"            @echo "... VerifyC.s"            @echo "... VerifyFortran.o"            @echo "... VerifyFortran.i"            @echo "... VerifyFortran.s"            @echo "... main.o"            @echo "... main.i"            @echo "... main.s"        .PHONY : help        #=============================================================================        # Special targets to cleanup operation of make.        # Special rule to run CMake to check the build system integrity.        # No rule that depends on this can have commands that come from listfiles        # because they might be regenerated.        cmake_check_build_system:            $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0        .PHONY : cmake_check_build_system        ----------------------------------------------------------------

The following is the error content when make is executed :

            ryu-linux@ryulinux-15Z960-GA70K:~/allegro/build$ make            [ 60%] Built target VerifyFortran            [ 60%] Linking C executable VerifyFortranC            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgfortran.so while searching for gfortran            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lgfortran            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libquadmath.so while searching for quadmath            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lquadmath            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_s.so.1 while searching for libgcc_s.so.1            /home/ryu-linux/Android/Sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find libgcc_s.so.1            CMakeFiles/VerifyFortranC.dir/main.c.o:main.c:function main: error: undefined reference to 'VerifyFortran'            clang: error: linker command failed with exit code 1 (use -v to see invocation)            CMakeFiles/VerifyFortranC.dir/build.make:121: recipe for target 'VerifyFortranC' failed            make[2]: *** [VerifyFortranC] Error 1            CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/VerifyFortranC.dir/all' failed            make[1]: *** [CMakeFiles/VerifyFortranC.dir/all] Error 2            Makefile:83: recipe for target 'all' failed            make: *** [all] Error 2

What is the problem?

I would like to know how to fix "error: cannot find -lquadmath" and "error: cannot find libgcc_s.so.1".


Viewing all articles
Browse latest Browse all 22157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>