[MacPorts] #56941: cmake @3.12.0_0 and gcc7 @7.3.0_3 don't work well together
MacPorts
noreply at macports.org
Tue Aug 7 18:34:08 UTC 2018
#56941: cmake @3.12.0_0 and gcc7 @7.3.0_3 don't work well together
----------------------+------------------------
Reporter: iqgrande | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.3
Keywords: | Port: cmake, gcc
----------------------+------------------------
Greetings:
I am unable to use MacPorts CMake with MacPorts GCC compilers. My error is
below along with a simple reproducer. I have attached my source and output
from the command below in the attached tarball. I am unsure as to which
port has the issue(s) so I included the CMake port maintainer as the owner
since there is no GCC port maintainer. Also, I tested this with every
gcc-* item within my /opt/local/bin (e.g., gcc-mp-7, gcc-ar-mp-7, gcc-
ranlib-mp-7) for both gcc7 and gcc8 ports. The CMake Port does appear to
use the Apple LLVM compilers fine. Thank you for your help with this.
=`main.c`=
{{{
#include <stdio.h>
int main()
{
printf("Hello world.\n");
return 0;
}
}}}
=`CMakeLists.txt`=
{{{
cmake_minimum_required (VERSION 2.6)
project (test)
add_executable (test main.c)
}}}
=Errors=
{{{
$ cmake -DCMAKE_C_COMPILER=/opt/local/bin/gcc-mp-7 .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /opt/local/bin/gcc-mp-7
-- Check for working C compiler: /opt/local/bin/gcc-mp-7 -- broken
CMake Error at
/opt/local/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/opt/local/bin/gcc-mp-7"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /path/to/macports_build_issues/CMakeFiles/CMakeTmp
Run Build Command:"/opt/local/bin/gmake" "cmTC_2bb49/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTC_2bb49.dir/build.make
CMakeFiles/cmTC_2bb49.dir/build
gmake[1]: Entering directory
'/path/to/macports_build_issues/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2bb49.dir/testCCompiler.c.o
/opt/local/bin/gcc-mp-7 -o
CMakeFiles/cmTC_2bb49.dir/testCCompiler.c.o -c
/path/to/macports_build_issues/CMakeFiles/CMakeTmp/testCCompiler.c
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm'
flag!
gmake[1]: *** [CMakeFiles/cmTC_2bb49.dir/build.make:66:
CMakeFiles/cmTC_2bb49.dir/testCCompiler.c.o] Error 1
gmake[1]: Leaving directory
'/path/to/macports_build_issues/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_2bb49/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/path/to/macports_build_issues/CMakeFiles/CMakeOutput.log".
See also "/path/to/macports_build_issues/CMakeFiles/CMakeError.log".
}}}
Kind regards,
Anthony
--
Ticket URL: <https://trac.macports.org/ticket/56941>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list