Skip to main content
Topic: Cmake GCC error ???? (Read 4958 times) previous topic - next topic
0 Members and 6 Guests are viewing this topic.

Cmake GCC error ????

Compiling problem:

I was trying to install dnscrypt including an AUR gui and although on another installation this installed fine and recently updated, on this one here it is having compiling problems.  Anyone out there can guess what could be it.  I am physically away from the other installation so I could compare, but this is the output/error I am getting:

Code: [Select]
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp
   
    Run Build Command:"/usr/bin/make" "cmTC_61a36/fast"
    /usr/bin/make -f CMakeFiles/cmTC_61a36.dir/build.make CMakeFiles/cmTC_61a36.dir/build
    make[1]: Entering directory '/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o
    /usr/bin/cc   -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -o CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o   -c /tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp/testCCompiler.c
    /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
    make[1]: *** [CMakeFiles/cmTC_61a36.dir/build.make:66: CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o] Error 1
    make[1]: Leaving directory '/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:126: cmTC_61a36/fast] Error 2
   

 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


-- Configuring incomplete, errors occurred!
See also "/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeError.log".

Re: Cmake GCC error ????

Reply #1
Compiling problem:

I was trying to install dnscrypt including an AUR gui and although on another installation this installed fine and recently updated, on this one here it is having compiling problems.  Anyone out there can guess what could be it.  I am physically away from the other installation so I could compare, but this is the output/error I am getting:

Code: [Select]
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp
   
    Run Build Command:"/usr/bin/make" "cmTC_61a36/fast"
    /usr/bin/make -f CMakeFiles/cmTC_61a36.dir/build.make CMakeFiles/cmTC_61a36.dir/build
    make[1]: Entering directory '/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o
    /usr/bin/cc   -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -o CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o   -c /tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp/testCCompiler.c
    /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
    make[1]: *** [CMakeFiles/cmTC_61a36.dir/build.make:66: CMakeFiles/cmTC_61a36.dir/testCCompiler.c.o] Error 1
    make[1]: Leaving directory '/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:126: cmTC_61a36/fast] Error 2
   

 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


-- Configuring incomplete, errors occurred!
See also "/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/yaourt-tmp-oba/aur-dnscrypt-proxy-gui/src/dnscrypt-proxy-gui-1.11.14/build/CMakeFiles/CMakeError.log".

It's libmpfr, do you have the most recent version installed?

Re: Cmake GCC error ????

Reply #2
I have the latest of mpfr installed which provides libmpfr
I diidn't respond earlier as I just got to the place where the problem is at.
Weird because the setup is very similar and this is a clone of the other system where installation went on fine back then and recent update was also applied.


Re: Cmake GCC error ????

Reply #3
From the error message:
Quote
error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory

When you try to search for this file in repositories, you will get nothing.
Just try and you will see nothing:
Code: [Select]
pacman -Fs libmpfr.so.4

From which i assume you have outdated gcc or gcc  needs to be rebuilt, or just another prank from core devs.

 

Re: Cmake GCC error ????

Reply #4
I have the latest of mpfr installed which provides libmpfr
I diidn't respond earlier as I just got to the place where the problem is at.
Weird because the setup is very similar and this is a clone of the other system where installation went on fine back then and recent update was also applied.


If nothing else works, you could see if you have another version of libmpfr.so in your /usr/lib/ directory, and just copy it as "libmpfr.so.4". A hackish solution, but it has worked for me in the past.

Re: Cmake GCC error ????

Reply #5
From which i assume you have outdated gcc or gcc  needs to be rebuilt, or just another prank from core devs.
I do updates 2-3 times a day, there is no newer mpfr in the artix repositories than the one I have.  I also reinstalled from the repository just to make sure nothing had gone wrong.  No difference, still the same error.

Re: Cmake GCC error ????

Reply #6
I do updates 2-3 times a day, there is no newer mpfr in the artix repositories than the one I have.  I also reinstalled from the repository just to make sure nothing had gone wrong.  No difference, still the same error.

The situation is exact opposite.
mpfr is fine, there is no problem with it.
GCC is broken or behind.

I think it should be fine on gremlins already (well this works for me).

Re: Cmake GCC error ????

Reply #7
I've always run gremlins and run testing ever since testing was publicly known.  It is irrelevant as both installations have gremlins updated.  The only difference that I can see is that one had this installed a few months back and it was now updated. the other is an attempt to newly install the same package, although it still doesn't make sense, as both had to be compiled from scratch and installed, whether one pre-existed.  As for gcc they are identical and so is yaourt utilized to install the package.

Re: Cmake GCC error ????

Reply #8
"aaahhaaahh... it is yaourt's fault, you should do it by hand"

I don't want to hear any of that!

Re: Cmake GCC error ????

Reply #9
There is nothing wrong with gcc or cmake, otherwise there wouldn't be updates in the repos.
Same gcc version runs on the build server to compile packages.
Its an error on your end.

Re: Cmake GCC error ????

Reply #10
This IS NOT THE BEST of solutions, but it might solve your problem.

Download any of the binary packages libmpfr.so.4()(64bit) lib from here.

Once downloaded extract the desired file, i.e.,  libmpfr.so.4, and move it to /usr/lib

I'll try first putting it in /usrl/local/lib and see if the build works.

If the library is necessary just for building the package it might be safe to remove it after; yet, if it is used by your application, then you'll have to keep it in your system.

You may try with all the options until you download some file that works.

Regards.

Re: Cmake GCC error ????

Reply #11
If nothing else works, you could see if you have another version of libmpfr.so in your /usr/lib/ directory, and just copy it as "libmpfr.so.4". A hackish solution, but it has worked for me in the past.

I made a link libmpfr.so.4 to libmpfr.so.6.0.1* and it worked
libmpfr.so.6 is there as a link but the process was asking for libmpfr.so.4

strange?

Re: Cmake GCC error ????

Reply #12

Nope, its an AUR package, which may require an old gcc version and may need a patch.

Strange, a bit, you are on a good way to bork your compiler. Don't make artix packages fit, make the AUR package work.

Re: Cmake GCC error ????

Reply #13
Nope, its an AUR package, which may require an old gcc version and may need a patch.

Strange, a bit, you are on a good way to bork your compiler. Don't make artix packages fit, make the AUR package work.

I do understand how right you are but I am in no position to do what you advise.
Am I to understand that if I stick my nose into such an AUR pkg, and find this need for libmpfr.so.4 and switch it into libmpfr.so.6 (which comes with the current compiler) this would work better?  Also does libmpfr.so.4 not being there is a screening measure for pkgs being out of date or incorrectly packaged?

Would someone running Arch end up with the same error I did?