Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56941 closed defect (worksforme)

cmake @3.12.0_0 and gcc7 @7.3.0_3 don't work well together

Reported by: iqgrande Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc:
Port: cmake, gcc

Description

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

Attachments (2)

macports_build_issues.tar.gz (8.6 KB) - added by iqgrande 6 years ago.
libgcc6-7_kateyalatalo.txt (23.0 KB) - added by kateyalatalo (Dr. Katherine Alatalo) 6 years ago.
rev-upgrade output

Download all attachments as: .zip

Change History (23)

Changed 6 years ago by iqgrande

comment:1 Changed 6 years ago by michaelld (Michael Dickens)

For my knowledge, what do the following return:

uname -a
port version
port installed and active

comment:2 in reply to:  1 Changed 6 years ago by iqgrande

Replying to michaelld:

For my knowledge, what do the following return:

uname -a
port version
port installed and active

Thank you for the very prompt response! I have your information below. I apologize for not including it in my initial ticket.

$ uname -a
Darwin Macswell.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
$ port version
Version: 2.5.3
$ port installed and active
The following ports are currently installed:
  aalib @1.4rc5_5 (active)
  appstream-glib @0.7.10_0 (active)
  apr @1.6.3_0 (active)
  apr-util @1.6.1_1 (active)
  aquaterm @1.1.1_0 (active)
  arpack @3.6.2_0+accelerate+gfortran (active)
  aspell @0.60.6.1_1 (active)
  aspell-dict-en @2018.04.16_0 (active)
  at-spi2-atk @2.26.2_1 (active)
  at-spi2-core @2.28.0_0 (active)
  atk @2.28.1_0 (active)
  atkmm @2.24.2_0 (active)
  atlas @3.10.2_2 (active)
  auctex @12.1_0+emacs_app (active)
  autoconf @2.69_5 (active)
  autoconf-archive @2018.03.13_0 (active)
  automake @1.16.1_0 (active)
  avahi @0.7_3+gtk+gtk3+x11 (active)
  babl @0.1.54_0 (active)
  bash @4.4.23_0 (active)
  bash-completion @2.8_0 (active)
  bison @3.0.5_0 (active)
  bison-runtime @3.0.5_0 (active)
  blosc @1.14.3_0 (active)
  boehmgc @7.6.6_0 (active)
  boost @1.66.0_3+no_single+no_static+python27 (active)
  brotli @1.0.5_0 (active)
  bsdmake @24_1 (active)
  bzip2 @1.0.6_0 (active)
  cairo @1.14.12_0+quartz+x11 (active)
  cairomm @1.12.2_0+x11 (active)
  cctools @895_5+llvm40 (active)
  cdparanoia @10.2_1 (active)
  cfitsio @3.440_0 (active)
  chromaprint @1.4.2_2 (active)
  clang-4.0 @4.0.1_5+analyzer+libstdcxx (active)
  clang-5.0 @5.0.2_1+analyzer+libstdcxx (active)
  clang_select @2_0 (active)
  cmake @3.12.0_0 (active)
  coreutils @8.30_0 (active)
  cppunit @1.14.0_0 (active)
  ctags @5.8_2 (active)
  curl @7.61.0_0+ssl (active)
  curl-ca-bundle @7.61.0_1 (active)
  cvs @1.11.23_2 (active)
  cyrus-sasl2 @2.1.26_6+kerberos (active)
  cython_select @0.1_0 (active)
  db46 @4.6.21_10 (active)
  db48 @4.8.30_4 (active)
  dblatex @0.3.10_2 (active)
  dbus @1.12.8_2 (active)
  dbus-glib @0.110_0 (active)
  dbus-python27 @1.2.4_0 (active)
  dcraw @9.28.0_0 (active)
  dejavu-fonts @2.37_0 (active)
  desktop-file-utils @0.23_0 (active)
  detex @2.8_1 (active)
  djvulibre @3.5.27_0 (active)
  docbook-xml @5.0_3 (active)
  docbook-xml-4.1.2 @5.0_1 (active)
  docbook-xml-4.2 @5.0_1 (active)
  docbook-xml-4.3 @5.0_1 (active)
  docbook-xml-4.4 @5.0_1 (active)
  docbook-xml-4.5 @5.0_1 (active)
  docbook-xml-5.0 @5.0_1 (active)
  docbook-xsl-nons @1.79.2_0 (active)
  docbook2X @0.8.8_9 (active)
  dos2unix @7.4.0_0 (active)
  doxygen @1.8.14_0 (active)
  dvdauthor @0.7.1_8 (active)
  dvdbackup @0.4.2_0 (active)
  dvipng @1.15_3 (active)
  emacs @26.1_2 (active)
  emacs-app @26.1_3 (active)
  enchant @1.6.0_5+applespell (active)
  epstool @3.08_9 (active)
  exiv2 @0.26_1 (active)
  expat @2.2.5_0 (active)
  faad2 @2.7_0 (active)
  ffmpeg @4.0.2_0+gpl2 (active)
  fftw-3 @3.3.8_0 (active)
  fftw-3-single @3.3.8_0 (active)
  fig2dev @3.2.7a_1 (active)
  FileZilla @3.35.2_0 (active)
  findutils @4.6.0_0 (active)
  flac @1.3.2_0 (active)
  flex @2.6.4_0 (active)
  fltk @1.3.4_0 (active)
  fluidsynth @1.1.6_6 (active)
  fontconfig @2.13.0_0 (active)
  fop @1.1_0 (active)
  fortune @6.2.0-RELEASE_0 (active)
  freeglut @3.0.0_0 (active)
  freetype @2.8.1_0 (active)
  fribidi @0.19.7_1 (active)
  gawk @4.2.1_0 (active)
  gcab @1.1_1 (active)
  gcc5 @5.5.0_1 (active)
  gcc6 @6.4.0_2 (active)
  gcc7 @7.3.0_3 (active)
  gcc8 @8.2.0_0 (active)
  gcc_select @0.1_8 (active)
  gcr @3.28.0_0 (active)
  gd2 @2.2.5_0+x11 (active)
  gdb @8.0.1_0 (active)
  gdbm @1.16_0 (active)
  gdk-pixbuf2 @2.36.12_0+x11 (active)
  gegl @0.2.0-20180218_2+x11 (active)
  gegl-0.4 @0.4.6_1+x11 (active)
  geoclue2 @2.4.11_2+x11 (active)
  getopt @1.1.6_0 (active)
  gettext @0.19.8.1_0 (active)
  gexiv2 @0.10.8_1+python27+python36 (active)
  ghc @7.8.3_6 (active)
  ghostscript @9.23_3+x11 (active)
  giflib @4.2.3_0+x11 (active)
  gimp @2.10.4_1 (active)
  gimp-app @2.8.2_2 (active)
  gimp-jp2 @2.2.0_7 (active)
  gimp-lqr-plugin @0.7.2_1 (active)
  gimp2 @2.10.4_1+python27 (active)
  git @2.18.0_0+credential_osxkeychain+doc+pcre+perl5_26 (active)
  gl2ps @1.4.0_0 (active)
  glib-networking @2.54.1_0 (active)
  glib2 @2.56.1_0+x11 (active)
  glibmm @2.56.0_1+x11 (active)
  glpk @4.65_0 (active)
  glui @2.36_1 (active)
  glw @20120116_2 (active)
  gmake @4.2.1_0 (active)
  gmp @6.1.2_1 (active)
  gnome-common @3.18.0_0 (active)
  gnome-doc-utils @0.20.10_2 (active)
  gnome-online-accounts @3.28.0_0 (active)
  gnupg2 @2.2.9_0+pinentry_mac (active)
  gnuplot @5.2.4_0+aquaterm+luaterm+pangocairo+wxwidgets+x11 (active)
  gnutar @1.29_1 (active)
  gnutls @3.5.19_0+doc (active)
  gobject-introspection @1.56.1_1 (active)
  gperf @3.1_0 (active)
  gperftools @2.7_0 (active)
  graphene @1.8.2_2 (active)
  GraphicsMagick @1.3.30_0+q8 (active)
  graphite2 @1.3.9_0 (active)
  graphviz @2.40.1_1+pangocairo+x11 (active)
  grep @3.1_0 (active)
  gsed @4.5_0 (active)
  gsettings-desktop-schemas @3.28.0_0 (active)
  gsl @2.4_2 (active)
  gssdp @1.0.2_0 (active)
  gstreamer1 @1.14.2_0 (active)
  gstreamer1-gst-plugins-bad @1.14.1_1 (active)
  gstreamer1-gst-plugins-base @1.14.2_0+ogg+x11 (active)
  gstreamer1-gst-plugins-good @1.14.1_1+pulseaudio+x11 (active)
  gtime @1.7_1 (active)
  gtk-doc @1.28_2 (active)
  gtk-theme-switch @2.0.4_2 (active)
  gtk2 @2.24.32_0+x11 (active)
  gtk3 @3.22.30_0+x11 (active)
  gtkimageview @1.6.4_7+x11 (active)
  gtkmm @2.24.5_1+x11 (active)
  gtkspell2 @2.0.16_7+x11 (active)
  gts @0.7.6_3 (active)
  gupnp @1.0.2_0 (active)
  gupnp-igd @0.2.5_0+python27 (active)
  gutenprint @5.2.14_0 (active)
  gvfs @1.36.2_0+python36 (active)
  gzip @1.9_0 (active)
  harfbuzz @1.8.5_0 (active)
  harfbuzz-icu @1.8.5_0 (active)
  hdf5 @1.10.2_0+cxx+hl (active)
  help2man @1.47.6_0 (active)
  hicolor-icon-theme @0.17_0 (active)
  hiredis @0.13.3_0 (active)
  hs-aeson @0.7.0.4_1 (active)
  hs-alex @3.1.3_1 (active)
  hs-async @2.0.1.5_1 (active)
  hs-attoparsec @0.10.4.0_4 (active)
  hs-base-unicode-symbols @0.2.2.4_2 (active)
  hs-base64-bytestring @1.0.0.1_5 (active)
  hs-blaze-builder @0.3.3.4_1 (active)
  hs-blaze-html @0.7.0.3_1 (active)
  hs-blaze-markup @0.6.2.0_1 (active)
  hs-conduit @1.2.3.1_1 (active)
  hs-data-default @0.5.3_4 (active)
  hs-data-default-class @0.0.1_3 (active)
  hs-data-default-instances-base @0.0.1_3 (active)
  hs-data-default-instances-containers @0.0.1_3 (active)
  hs-data-default-instances-dlist @0.0.1_4 (active)
  hs-data-default-instances-old-locale @0.0.1_3 (active)
  hs-deepseq-generics @0.1.1.2_1 (active)
  hs-digest @0.0.1.2_5 (active)
  hs-dlist @0.6.0.1_2 (active)
  hs-enclosed-exceptions @1.0.1_1 (active)
  hs-exceptions @0.6.1_1 (active)
  hs-extensible-exceptions @0.1.1.4_3 (active)
  hs-happy @1.19.4_1 (active)
  hs-hashable @1.2.2.0_1 (active)
  hs-highlighting-kate @0.5.11.1_1 (active)
  hs-hslua @0.3.9_2 (active)
  hs-http @4000.2.10_1 (active)
  hs-lifted-base @0.2.1.1_2 (active)
  hs-mmorph @1.0.0_2 (active)
  hs-monad-control @0.3.2.2_2 (active)
  hs-mtl @2.1.3.1_1 (active)
  hs-nats @0.1.2_2 (active)
  hs-network @2.4.2.3_1 (active)
  hs-pandoc-types @1.12.4.1_2 (active)
  hs-parsec @3.1.5_1 (active)
  hs-pcre-light @0.4.0.3_1 (active)
  hs-primitive @0.5.2.1_1 (active)
  hs-quickcheck @2.6_3 (active)
  hs-random @1.0.1.1_5 (active)
  hs-resourcet @1.1.3.3_1 (active)
  hs-scientific @0.2.0.2_1 (active)
  hs-semigroups @0.16.0.1_1 (active)
  hs-sha @1.6.4.1_1 (active)
  hs-stm @2.4.2_3 (active)
  hs-syb @0.4.1_1 (active)
  hs-tagsoup @0.13.3_1 (active)
  hs-temporary @1.2.0.3_1 (active)
  hs-texmath @0.6.6.3_1 (active)
  hs-text @1.1.0.0_1 (active)
  hs-transformers-base @0.4.1_2 (active)
  hs-unordered-containers @0.2.4.0_1 (active)
  hs-utf8-string @0.3.7_5 (active)
  hs-vector @0.10.9.1_1 (active)
  hs-void @0.7_1 (active)
  hs-xml @1.3.13_3 (active)
  hs-yaml @0.8.10.1_1 (active)
  hs-zip-archive @0.1.4_1 (active)
  hs-zlib @0.5.4.1_4 (active)
  hunspell @1.6.2_0 (active)
  hunspell-en_US_large @2018.04.16_0 (active)
  hyphen @2.8.8_0 (active)
  icoutils @0.32.3_0 (active)
  icu @58.2_2 (active)
  ilmbase @2.2.1_0 (active)
  ImageMagick @6.9.9-40_1+x11 (active)
  inkscape @0.92.3_3+x11 (active)
  intltool @0.51.0_4 (active)
  ipython2_select @0.1_0 (active)
  ipython3_select @0.1_0 (active)
  ipython_select @0.4_0 (active)
  irrlicht @1.8.4_0 (active)
  isl @0.18_0 (active)
  iso-codes @3.77_0 (active)
  itstool @2.0.2_3 (active)
  jasper @2.0.14_0 (active)
  jbig2dec @0.14_0 (active)
  jbigkit @2.1_0 (active)
  jpeg @9c_0 (active)
  json-c @0.13-20171207_1 (active)
  json-glib @1.2.8_0 (active)
  jsoncpp @1.8.4_0 (active)
  kerberos5 @1.16.1_0 (active)
  lame @3.100_0 (active)
  latexdiff @1.2.1_1 (active)
  latexmk @4.55_0 (active)
  lcdf-typetools @2.107_0+texlive (active)
  lcms @1.19_5 (active)
  lcms2 @2.9_0 (active)
  ld64 @3_1+ld64_xcode (active)
  ld64-latest @274.2_2+llvm40 (active)
  ld64-xcode @2_1 (active)
  lensfun @0.3.2_3 (active)
  less @530_0+pcre (active)
  leveldb @1.20_3 (active)
  libarchive @3.3.2_1 (active)
  libass @0.14.0_0 (active)
  libassuan @2.5.1_0 (active)
  libatomic_ops @7.6.4_0 (active)
  libbluray @1.0.2_0 (active)
  libcaca @0.99.beta19_6 (active)
  libcdr-0.1 @0.1.4_2 (active)
  libcerf @1.5_0 (active)
  libcomerr @1.44.3_0 (active)
  libcroco @0.6.12_0 (active)
  libcxx @5.0.1_2+universal (active)
  libdaemon @0.14_1 (active)
  libdca @0.0.6_0 (active)
  libdv @1.0.0_0 (active)
  libdvdcss @1.4.2_0 (active)
  libdvdnav @6.0.0_0 (active)
  libdvdread @6.0.0_0 (active)
  libedit @20170329-3.1_2 (active)
  libepoxy @1.5.2_0+python36 (active)
  libevent @2.1.8_0 (active)
  libexif @0.6.21_0 (active)
  libffi @3.2.1_0 (active)
  libfilezilla @0.13.0_0 (active)
  libgcc @1.0_0 (active)
  libgcc6 @6.4.0_3 (active)
  libgcc7 @7.3.0_1 (active)
  libgcc8 @8.2.0_0 (active)
  libgcrypt @1.8.3_0 (active)
  libgdata @0.17.9_0 (active)
  libglade2 @2.6.4_8 (active)
  libGLU @9.0.0_0 (active)
  libgpg-error @1.32_0 (active)
  libiconv @1.15_0 (active)
  libidn @1.35_0 (active)
  libidn2 @2.0.5_0 (active)
  libksba @1.3.5_1 (active)
  libLASi @1.1.1_1 (active)
  liblqr @1-0.4.2_0 (active)
  libmacho-headers @895_0 (active)
  libmagic @5.34_0 (active)
  libmms @0.6.4_0 (active)
  libmng @2.0.3_0 (active)
  libmodplug @0.8.9.0_0 (active)
  libmpc @1.1.0_1 (active)
  libmpcdec @1.2.6_0 (active)
  libmypaint @1.3.0_0 (active)
  libnetpbm @10.83.01_0 (active)
  libnice @0.1.14_0 (active)
  libnotify @0.7.7_0 (active)
  liboauth @1.0.3_1 (active)
  libogg @1.3.3_0 (active)
  libomp @6.0.1_0+universal (active)
  libopenraw @0.1.3_0+gnome (active)
  libopus @1.2.1_0 (active)
  libpaper @1.1.24.5_0 (active)
  libpcap @1.9.0_0 (active)
  libpixman @0.34.0_0 (active)
  libpng @1.6.34_1 (active)
  libproxy @0.4.15_2+python27 (active)
  libpsl @0.20.2-20180522_0 (active)
  libraw @0.19.0_0 (active)
  librevenge @0.0.4_2 (active)
  librsvg @2.42.2_2 (active)
  libsdl2 @2.0.8_0 (active)
  libsecret @0.18.6_0 (active)
  libshout2 @2.4.1_1 (active)
  libsigcxx2 @2.10.0_0 (active)
  libsndfile @1.0.28_1 (active)
  libsoup @2.62.2_0+gnome (active)
  libspiro @0.5.20150702_0 (active)
  libssh2 @1.8.0_0 (active)
  libstemmer @0.1-20170303_0 (active)
  libtasn1 @4.13_0 (active)
  libtheora @1.1.1_2 (active)
  libtool @2.4.6_5 (active)
  libunistring @0.9.10_0 (active)
  libunwind-headers @5.0.1_0 (active)
  libusb @1.0.22_0 (active)
  libusb-compat @0.1.5_0 (active)
  libutf8proc @2.2.0_0 (active)
  libuv @1.22.0_0 (active)
  libvisio-0.1 @0.1.6_2 (active)
  libvorbis @1.3.6_0 (active)
  libvpx @1.7.0_0 (active)
  libwmf @0.2.8.4_8 (active)
  libwpd-0.10 @0.10.2_0 (active)
  libwpg-0.3 @0.3.2_0 (active)
  libxml2 @2.9.7_0 (active)
  libxslt @1.1.32_0 (active)
  libyaml @0.2.1_0 (active)
  libzzip @0.13.69_0 (active)
  llvm-3.5 @3.5.2_9 (active)
  llvm-4.0 @4.0.1_2 (active)
  llvm-5.0 @5.0.2_0 (active)
  llvm_select @2_0 (active)
  lua @5.3.4_1 (active)
  luajit @2.0.5_0 (active)
  LyX @2.3.0_0+python27+qt5 (active)
  lz4 @1.8.2_0 (active)
  lzip @1.20_0 (active)
  lzo2 @2.10_0 (active)
  m4 @1.4.18_2 (active)
  MacVim @8.1.snapshot147_1+huge (active)
  md5sha1sum @0.9.5_2 (active)
  mesa @17.1.6_0+osmesa+python27 (active)
  mm-common @0.9.12_0 (active)
  moreutils @0.62_0+doc (active)
  mpfr @4.0.1_0 (active)
  mpg123 @1.25.10_0 (active)
  mpi-doc @3.2_0 (active)
  mpi_select @0.0_3 (active)
  mpich-default @3.2.1_3+gcc7 (active)
  mypaint-brushes @1.3.0_0 (active)
  nasm @2.13.03_0 (active)
  ncftp @3.2.6_1 (active)
  ncurses @6.1_0 (active)
  neon @0.30.2_0 (active)
  net-snmp @5.7.3_8+ssl (active)
  netpbm @10.83.01_0+x11 (active)
  nettle @3.4_0 (active)
  nmap @7.70_0+pcre+ssl+subversion (active)
  nosetests_select @0.1_0 (active)
  npth @1.5_0 (active)
  octave @4.4.0_5+accelerate+app+docs+gfortran+graphicsmagick+qt5+sound (active)
  openal-soft @1.15.1_2 (active)
  openexr @2.2.1_0 (active)
  openjade @1.3.2_11 (active)
  openjpeg @2.3.0_0 (active)
  openjpeg15 @1.5.2_0 (active)
  openldap @2.4.46_0 (active)
  openmotif @2.3.8_0 (active)
  opensp @1.5.2_2 (active)
  openssh @7.6p1_4+kerberos5+xauth (active)
  openssl @1.0.2o_1 (active)
  orc @0.4.28_0 (active)
  org-mode @9.1.13_0 (active)
  ossp-uuid @1.6.2_11+perl5_26 (active)
  p5.26-algorithm-diff @1.190.300_0 (active)
  p5.26-authen-sasl @2.160.0_0 (active)
  p5.26-cgi @4.380.0_0 (active)
  p5.26-data-dump @1.230.0_0 (active)
  p5.26-digest-hmac @1.30.0_0 (active)
  p5.26-digest-sha1 @2.130.0_4 (active)
  p5.26-encode-locale @1.50.0_0 (active)
  p5.26-error @0.170.260_0 (active)
  p5.26-file-listing @6.40.0_1 (active)
  p5.26-getopt-long @2.500.0_0 (active)
  p5.26-gssapi @0.280.0_3 (active)
  p5.26-html-form @6.30.0_1 (active)
  p5.26-html-parser @3.720.0_0 (active)
  p5.26-html-tagset @3.200.0_4 (active)
  p5.26-http-cookies @6.40.0_0 (active)
  p5.26-http-daemon @6.10.0_1 (active)
  p5.26-http-date @6.20.0_1 (active)
  p5.26-http-message @6.180.0_0 (active)
  p5.26-http-negotiate @6.10.0_1 (active)
  p5.26-io-html @1.1.0_0 (active)
  p5.26-io-socket-ssl @2.58.0_0 (active)
  p5.26-io-tty @1.120.0_0 (active)
  p5.26-ipc-run @20180523.0.0_0 (active)
  p5.26-libwww-perl @6.350.0_0 (active)
  p5.26-locale-gettext @1.70.0_0 (active)
  p5.26-lwp-mediatypes @6.20.0_1 (active)
  p5.26-lwp-protocol-https @6.70.0_0 (active)
  p5.26-mozilla-ca @20180117_0 (active)
  p5.26-net-http @6.180.0_0 (active)
  p5.26-net-libidn @0.120.0_5 (active)
  p5.26-net-smtp-ssl @1.40.0_0 (active)
  p5.26-net-ssleay @1.850.0_0 (active)
  p5.26-pathtools @3.740.0_0 (active)
  p5.26-scalar-list-utils @1.500.0_0 (active)
  p5.26-sub-name @0.210.0_0 (active)
  p5.26-sub-uplevel @0.280.0_0 (active)
  p5.26-term-readkey @2.370.0_0 (active)
  p5.26-test-exception @0.430.0_0 (active)
  p5.26-test-needs @0.2.5_0 (active)
  p5.26-test-nowarnings @1.40.0_1 (active)
  p5.26-test-warn @0.360.0_0 (active)
  p5.26-time-duration @1.200.0_0 (active)
  p5.26-timedate @2.300.0_1 (active)
  p5.26-try-tiny @0.300.0_0 (active)
  p5.26-uri @1.740.0_0 (active)
  p5.26-www-robotrules @6.20.0_1 (active)
  p5.26-xml-namespacesupport @1.120.0_0 (active)
  p5.26-xml-parser @2.440.0_0 (active)
  p5.26-xml-sax @1.0.0_0 (active)
  p5.26-xml-sax-base @1.90.0_0 (active)
  p5.26-xml-sax-expat @0.510.0_1 (active)
  p7zip @16.02_4 (active)
  p11-kit @0.23.12_0 (active)
  pandoc @1.12.4.2_1 (active)
  pango @1.42.3_0+quartz+x11 (active)
  pangomm @2.40.1_0+x11 (active)
  parallel @20180622_0 (active)
  pcre @8.42_0 (active)
  pcre2 @10.31_0 (active)
  pdf2svg @0.2.3_2 (active)
  pdfjam @2.08_0 (active)
  perl5 @5.26.1_0+perl5_26 (active)
  perl5.24 @5.24.4_1 (active)
  perl5.26 @5.26.2_1 (active)
  pgf @3.0.1_0 (active)
  pinentry-mac @0.9.4_0 (active)
  pkgconfig @0.29.2_0 (active)
  plotutils @2.6_5 (active)
  poppler @0.67.0_0 (active)
  poppler-data @0.4.9_0 (active)
  popt @1.16_0 (active)
  portaudio @19.20140130_2 (active)
  potrace @1.15_0 (active)
  ps2eps @1.68_1 (active)
  pstoedit @3.73_1 (active)
  psutils @p17_1 (active)
  pth @2.0.7_1 (active)
  pulseaudio @12.1_0+x11 (active)
  py27-altgraph @0.15_0 (active)
  py27-appnope @0.1.0_0 (active)
  py27-backports @1.0_0 (active)
  py27-backports-shutil_get_terminal_size @1.0.0_0 (active)
  py27-backports_abc @0.5_0 (active)
  py27-beaker @1.9.1_0 (active)
  py27-bottleneck @1.2.1_0 (active)
  py27-cairo @1.17.1_0 (active)
  py27-certifi @2018.04.16_0 (active)
  py27-cycler @0.10.0_0 (active)
  py27-cython @0.28.3_0 (active)
  py27-dateutil @2.7.3_0 (active)
  py27-decorator @4.3.0_0 (active)
  py27-enum34 @1.1.6_0 (active)
  py27-funcsigs @1.0.2_0 (active)
  py27-functools32 @3.2.3-2_0 (active)
  py27-futures @3.2.0_0 (active)
  py27-gdbm @2.7.15_1 (active)
  py27-gnureadline @6.3.3-20151013_0 (active)
  py27-gobject @2.28.6_3 (active)
  py27-gobject3 @3.28.3_0 (active)
  py27-ipython @5.4.0_0 (active)
  py27-ipython_genutils @0.2.0_0 (active)
  py27-kiwisolver @1.0.1_0 (active)
  py27-libxml2 @2.9.7_0 (active)
  py27-lxml @4.2.3_0 (active)
  py27-macholib @1.9_0 (active)
  py27-mako @1.0.7_0 (active)
  py27-markupsafe @1.0_0 (active)
  py27-matplotlib @2.2.2_0+cairo (active)
  py27-modulegraph @0.16_0 (active)
  py27-monotonic @1.5_0 (active)
  py27-nose @1.3.7_1 (active)
  py27-numexpr @2.6.6_0 (active)
  py27-numpy @1.15.0_0+gfortran (active)
  py27-pandas @0.23.1_0 (active)
  py27-parsing @2.2.0_0 (active)
  py27-pathlib2 @2.3.2_0 (active)
  py27-pexpect @4.6.0_0 (active)
  py27-pickleshare @0.7.4_0 (active)
  py27-prompt_toolkit @1.0.14_0 (active)
  py27-ptyprocess @0.6.0_0 (active)
  py27-py2app @0.14_0 (active)
  py27-pygments @2.2.0_1 (active)
  py27-pygtk @2.24.0_3+x11 (active)
  py27-pyobjc @3.0.4_0 (active)
  py27-pyobjc-cocoa @3.0.4_1 (active)
  py27-scandir @1.7_0 (active)
  py27-scipy @1.1.0_0+gfortran (active)
  py27-setuptools @40.0.0_0 (active)
  py27-simplegeneric @0.8.1_0 (active)
  py27-singledispatch @3.4.0.3_0 (active)
  py27-six @1.11.0_0 (active)
  py27-subprocess32 @3.5.2_0 (active)
  py27-tables @3.4.4_0 (active)
  py27-tornado @5.0.2_1 (active)
  py27-traitlets @4.3.2_0 (active)
  py27-tz @2018.5_0 (active)
  py27-wcwidth @0.1.7_0 (active)
  py36-altgraph @0.15_0 (active)
  py36-anytree @2.4.3_0 (active)
  py36-appnope @0.1.0_0 (active)
  py36-backcall @0.1.0_0 (active)
  py36-bottleneck @1.2.1_0 (active)
  py36-cairo @1.17.1_0 (active)
  py36-cycler @0.10.0_0 (active)
  py36-cython @0.28.3_0 (active)
  py36-dateutil @2.7.3_0 (active)
  py36-decorator @4.3.0_0 (active)
  py36-gdbm @3.6.6_0 (active)
  py36-gnureadline @6.3.3-20151013_0 (active)
  py36-gobject3 @3.28.3_0 (active)
  py36-ipython @6.4.0_0 (active)
  py36-ipython_genutils @0.2.0_0 (active)
  py36-jedi @0.12.0_0 (active)
  py36-kiwisolver @1.0.1_0 (active)
  py36-lxml @4.2.3_0 (active)
  py36-macholib @1.9_0 (active)
  py36-matplotlib @2.2.2_0+cairo (active)
  py36-modulegraph @0.16_0 (active)
  py36-nose @1.3.7_1 (active)
  py36-numexpr @2.6.6_0 (active)
  py36-numpy @1.15.0_0+gfortran (active)
  py36-pandas @0.23.1_0 (active)
  py36-parsing @2.2.0_0 (active)
  py36-parso @0.2.1_0 (active)
  py36-pexpect @4.6.0_0 (active)
  py36-pickleshare @0.7.4_0 (active)
  py36-prompt_toolkit @1.0.14_0 (active)
  py36-ptyprocess @0.6.0_0 (active)
  py36-py2app @0.14_0 (active)
  py36-pygments @2.2.0_1 (active)
  py36-pyobjc @3.0.4_0 (active)
  py36-pyobjc-cocoa @3.0.4_1 (active)
  py36-scipy @1.1.0_0+gfortran (active)
  py36-setuptools @40.0.0_0 (active)
  py36-simplegeneric @0.8.1_0 (active)
  py36-six @1.11.0_0 (active)
  py36-tables @3.4.4_0 (active)
  py36-tornado @5.0.2_0 (active)
  py36-traitlets @4.3.2_0 (active)
  py36-tz @2018.5_0 (active)
  py36-wcwidth @0.1.7_0 (active)
  pygments_select @0.1_0 (active)
  python2_select @0.0_2 (active)
  python3_select @0.0_1 (active)
  python27 @2.7.15_0 (active)
  python36 @3.6.6_0 (active)
  python_select @0.3_7 (active)
  qhull @2015.2_1 (active)
  qrupdate @1.1.2_5+accelerate+gcc7 (active)
  qscintilla-qt5 @2.10.7_0 (active)
  qt5-qtbase @5.10.1_1+openssl (active)
  qt5-qtdeclarative @5.10.1_0 (active)
  qt5-qtmacextras @5.10.1_0 (active)
  qt5-qtsvg @5.10.1_0 (active)
  qt5-qttools @5.10.1_0 (active)
  qt5-qtxmlpatterns @5.10.1_0 (active)
  qt5-sqlite-plugin @5.10.1_0 (active)
  rarian @0.8.1_2 (active)
  readline @7.0.003_1 (active)
  rest @0.8.1_0 (active)
  rsync @3.1.3_0 (active)
  rtmpdump @2.4-20151223_0 (active)
  sane-backends @1.0.27_1+avahi (active)
  schroedinger @1.0.11_0 (active)
  screen @4.3.1_1 (active)
  serf1 @1.3.9_0 (active)
  shared-mime-info @1.7_2 (active)
  snappy @1.1.7_1 (active)
  soundtouch @2.0.0_0 (active)
  source-highlight @3.1.8_4 (active)
  soxr @0.1.3_0 (active)
  spandsp-devel @0.0.6pre21_0 (active)
  speex @1.2.0_0 (active)
  speexDSP @1.2rc3_0 (active)
  sqlite3 @3.24.0_1 (active)
  ssh-copy-id @7.6p1_0 (active)
  subversion @1.10.2_0 (active)
  SuiteSparse @4.2.1_6+accelerate (active)
  sundials2 @2.7.0_1+accelerate+gfortran+mpich (active)
  swig @3.0.12_2 (active)
  swig-python @3.0.12_2 (active)
  t1lib @5.1.2_2 (active)
  t1utils @1.41_0 (active)
  taglib @1.11.1_0 (active)
  tcp_wrappers @20_2 (active)
  telepathy-glib @0.24.1_0+vala (active)
  texinfo @6.5_2 (active)
  texlive @2018_0+doc+full+letter (active)
  texlive-basic @47434_0+doc (active)
  texlive-bibtex-extra @47418_0+doc (active)
  texlive-bin @2018.47642_2+x11 (active)
  texlive-bin-extra @47446_0+doc (active)
  texlive-common @2018_0 (active)
  texlive-context @47403_0+doc (active)
  texlive-fonts-extra @47288_0+doc (active)
  texlive-fonts-recommended @45777_0+doc (active)
  texlive-fontutils @47198_0+doc (active)
  texlive-formats-extra @47198_0+doc (active)
  texlive-games @46791_0+doc (active)
  texlive-humanities @47359_0+doc (active)
  texlive-lang-arabic @47226_0+doc (active)
  texlive-lang-chinese @47408_0+doc (active)
  texlive-lang-cjk @47198_0+doc (active)
  texlive-lang-cyrillic @47458_0+doc (active)
  texlive-lang-czechslovak @47441_0+doc (active)
  texlive-lang-english @47419_0+doc (active)
  texlive-lang-european @47375_0+doc (active)
  texlive-lang-french @47463_0+doc (active)
  texlive-lang-german @47442_0+doc (active)
  texlive-lang-greek @46662_0+doc (active)
  texlive-lang-italian @47434_0+doc (active)
  texlive-lang-japanese @47402_0+doc (active)
  texlive-lang-korean @44467_0+doc (active)
  texlive-lang-other @47375_0+doc (active)
  texlive-lang-polish @47447_0+doc (active)
  texlive-lang-portuguese @40340_1+doc (active)
  texlive-lang-spanish @47443_0+doc (active)
  texlive-latex @47377_0+doc (active)
  texlive-latex-extra @47410_0+doc (active)
  texlive-latex-recommended @47392_0+doc (active)
  texlive-luatex @47444_0+doc (active)
  texlive-math-science @47412_0+doc (active)
  texlive-metapost @47198_0+doc (active)
  texlive-music @47198_0+doc (active)
  texlive-pictures @47373_0+doc (active)
  texlive-plain-generic @47437_0+doc (active)
  texlive-pstricks @47400_0+doc (active)
  texlive-publishers @47411_0+doc (active)
  texlive-xetex @47362_0+doc (active)
  tiff @4.0.9_0 (active)
  transmission @2.94_0 (active)
  twolame @0.3.13_1 (active)
  ufraw @0.22_7+x11 (active)
  uhttpmock @0.5.1_0 (active)
  unrar @5.6.5_0 (active)
  urw-fonts @1.0.7pre44_0 (active)
  vala @0.40.8_0 (active)
  vecLibFort @0.4.2_0 (active)
  vim @8.1.0022_1+huge (active)
  w3m @0.5.3_10 (active)
  watch @3.3.11_0 (active)
  wavpack @5.1.0_0 (active)
  webkit2-gtk @2.20.3_0+gtk2+x11 (active)
  webp @1.0.0_0 (active)
  wget @1.19.5_0+ssl (active)
  woff2 @1.0.2_0 (active)
  wxWidgets-3.0 @3.0.4_0 (active)
  wxWidgets-common @3.1.1_0 (active)
  wxWidgets_select @1.0_1 (active)
  x264 @20171225_0 (active)
  x265 @2.8_1 (active)
  xar @1.6.1_0 (active)
  xauth @1.0.9_1 (active)
  xdg-utils @1.1.3_0 (active)
  Xft2 @2.3.2_0 (active)
  xmlcatmgr @2.2_1 (active)
  xmlto @0.0.28_1 (active)
  xorg-compositeproto @0.4.2_0 (active)
  xorg-damageproto @1.2.1_0 (active)
  xorg-dri2proto @2.8_0 (active)
  xorg-fixesproto @5.0_0 (active)
  xorg-glproto @1.4.17_0 (active)
  xorg-inputproto @2.3.2_0 (active)
  xorg-kbproto @1.0.7_0 (active)
  xorg-libice @1.0.9_0 (active)
  xorg-libpthread-stubs @0.4_0 (active)
  xorg-libsm @1.2.2_0 (active)
  xorg-libX11 @1.6.5_0 (active)
  xorg-libXau @1.0.8_0 (active)
  xorg-libXaw @1.0.13_2 (active)
  xorg-libxcb @1.12_2+python27 (active)
  xorg-libXcomposite @0.4.4_0 (active)
  xorg-libXcursor @1.1.14_0 (active)
  xorg-libXdamage @1.1.4_0 (active)
  xorg-libXdmcp @1.1.2_0 (active)
  xorg-libXext @1.3.3_0 (active)
  xorg-libXfixes @5.0.3_0 (active)
  xorg-libXi @1.7.8_0 (active)
  xorg-libXinerama @1.1.3_0 (active)
  xorg-libXmu @1.1.2_0 (active)
  xorg-libXp @1.0.3_0 (active)
  xorg-libXrandr @1.5.1_0 (active)
  xorg-libXt @1.1.5_2 (active)
  xorg-libXtst @1.2.3_0 (active)
  xorg-libXv @1.0.11_0 (active)
  xorg-libXxf86vm @1.1.4_0 (active)
  xorg-printproto @1.0.5_0 (active)
  xorg-randrproto @1.5.0_0 (active)
  xorg-recordproto @1.14.2_0 (active)
  xorg-renderproto @0.11.1_0 (active)
  xorg-videoproto @2.3.3_0 (active)
  xorg-xcb-proto @1.12_1+python27 (active)
  xorg-xcb-util @0.4.0_0 (active)
  xorg-xextproto @7.3.0_0 (active)
  xorg-xf86vidmodeproto @2.3.1_0 (active)
  xorg-xineramaproto @1.2.1_0 (active)
  xorg-xproto @7.0.31_0 (active)
  xpm @3.5.12_0 (active)
  xrender @0.9.10_0 (active)
  xsane @0.998_4 (active)
  XviD @1.3.5_0 (active)
  xz @5.2.4_0 (active)
  yaml-cpp @0.6.2_0 (active)
  yasm @1.3.0_0 (active)
  zlib @1.2.11_0 (active)

comment:3 Changed 6 years ago by michaelld (Michael Dickens)

OK; good. What does these return:

port select --list clang
port select --list gcc
port select --list llvm
/bin/ls -lAF /opt/local/bin/c++* /opt/local/bin/g++*
port provides /opt/local/bin/c++
Last edited 6 years ago by michaelld (Michael Dickens) (previous) (diff)

comment:4 Changed 6 years ago by iqgrande

I have the requested output below. Please let me know if you need anything further.

$ port select --list clang
Available versions for clang:
        mp-clang-4.0
        mp-clang-5.0
        none (active)
$ port select --list gcc
Available versions for gcc:
        mp-gcc5
        mp-gcc6
        mp-gcc7 (active)
        mp-gcc8
        none
$ port select --list llvm
Available versions for llvm:
        mp-llvm-3.5
        mp-llvm-4.0
        mp-llvm-5.0
        none (active)
$ port provides /opt/local/bin/c++
/opt/local/bin/c++ is not provided by a MacPorts port.

comment:5 Changed 6 years ago by michaelld (Michael Dickens)

OK. How about this then:

/bin/ls -lAF /opt/local/bin/c++* /opt/local/bin/g++*

comment:6 Changed 6 years ago by iqgrande

Output below.

$ /bin/ls -lAF /opt/local/bin/c++* /opt/local/bin/g++*
lrwxr-xr-x  1 root  admin       23 Dec 12  2017 /opt/local/bin/c++@ -> /opt/local/bin/c++-mp-7
-rwxr-xr-x  4 root  admin  1139352 May 18 13:02 /opt/local/bin/c++-mp-5*
-rwxr-xr-x  4 root  admin  1248292 Aug  4 10:09 /opt/local/bin/c++-mp-6*
-rwxr-xr-x  4 root  admin  1347172 Aug  4 20:46 /opt/local/bin/c++-mp-7*
-rwxr-xr-x  4 root  admin  1415912 Aug  4 13:47 /opt/local/bin/c++-mp-8*
lrwxr-xr-x  1 root  admin       23 Dec 12  2017 /opt/local/bin/g++@ -> /opt/local/bin/g++-mp-7
-rwxr-xr-x  4 root  admin  1139352 May 18 13:02 /opt/local/bin/g++-mp-5*
-rwxr-xr-x  4 root  admin  1248292 Aug  4 10:09 /opt/local/bin/g++-mp-6*
-rwxr-xr-x  4 root  admin  1347172 Aug  4 20:46 /opt/local/bin/g++-mp-7*
-rwxr-xr-x  4 root  admin  1415912 Aug  4 13:47 /opt/local/bin/g++-mp-8*

comment:7 Changed 6 years ago by mouse07410 (Mouse)

Strange - your test case appears to work for me. MacOS 10.13.6, Xcode-9.4.1, current Macports, CMake, gcc8:

$ port select --list llvm
Available versions for llvm:
	mp-llvm-5.0
	mp-llvm-6.0 (active)
	none
$ port select --list gcc
Available versions for gcc:
	mp-gcc7
	mp-gcc8 (active)
	none
$ cmake .. -DCMAKE_C_COMPILER=/opt/local/bin/gcc-mp-8
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc-mp-8
-- Check for working C compiler: /opt/local/bin/gcc-mp-8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/local/bin/clang++
-- Check for working CXX compiler: /opt/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ur20980/src/cmake-tst/tst3/build
$ make
Scanning dependencies of target test
[ 50%] Building C object CMakeFiles/test.dir/main.c.o
[100%] Linking C executable test
[100%] Built target test
$ ./test
Hello world.
$ rm -rf *
$ cmake .. -DCMAKE_C_COMPILER=/opt/local/bin/gcc-mp-8 -DCMAKE_CXX_COMPILER=/opt/local/bin/g++
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc-mp-8
-- Check for working C compiler: /opt/local/bin/gcc-mp-8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/g++
-- Check for working CXX compiler: /opt/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ur20980/src/cmake-tst/tst3/build
$ make
Scanning dependencies of target test
[ 50%] Building C object CMakeFiles/test.dir/main.c.o
[100%] Linking C executable test
[100%] Built target test
$ ./test
Hello world.
$ echo $AS_INTEGRATED_ASSEMBLER 
1
$ 

comment:8 Changed 6 years ago by michaelld (Michael Dickens)

Can you try the following from the "macports_build_issues" directory:

rm -rf CMakeCache.txt CMakeFiles
mkdir build
cd build
CC=/opt/local/bin/gcc-mp-7 CXX=/opt/local/bin/g++-mp-7 cmake ..

Here's what my system returns:

% CC=/opt/local/bin/gcc-mp-7 CXX=/opt/local/bin/g++-mp-7 cmake  .. 
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc-mp-7
-- Check for working C compiler: /opt/local/bin/gcc-mp-7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/g++-mp-7
-- Check for working CXX compiler: /opt/local/bin/g++-mp-7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mlk/Desktop/TMP/macports_build_issues/build

comment:9 Changed 6 years ago by iqgrande

Output. Bummer. Thoughts?

$ CC=/opt/local/bin/gcc-mp-7 CXX=/opt/local/bin/g++-mp-7 cmake ..
-- 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: /Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/opt/local/bin/gmake" "cmTC_dddb0/fast"
    /opt/local/bin/gmake -f CMakeFiles/cmTC_dddb0.dir/build.make CMakeFiles/cmTC_dddb0.dir/build
    gmake[1]: Entering directory '/Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_dddb0.dir/testCCompiler.c.o
    /opt/local/bin/gcc-mp-7    -o CMakeFiles/cmTC_dddb0.dir/testCCompiler.c.o   -c /Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeTmp/testCCompiler.c
    FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
    gmake[1]: *** [CMakeFiles/cmTC_dddb0.dir/build.make:66: CMakeFiles/cmTC_dddb0.dir/testCCompiler.c.o] Error 1
    gmake[1]: Leaving directory '/Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:121: cmTC_dddb0/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 "/Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeOutput.log".
See also "/Users/iqgrande/Desktop/macports_build_issues/build/CMakeFiles/CMakeError.log".

comment:10 Changed 6 years ago by iqgrande

Could this be environmental?

/opt/local/bin:/opt/local/sbin:/opt/ama/bin:/Users/iqgrande/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
Macswell:build iqgrande$ printenv
TERM=xterm-256color
SHELL=/bin/bash
XLD=/Volumes/SeagateBUPDD4TB/Data/Music/XLD/
GFORTRAN_CONVERT_UNIT=big_endian
TMPDIR=/var/folders/7n/vz1b562x5ndbhsn7rgz_nb840000gp/T/
SSH_CLIENT=10.0.1.24 33316 22
OLDPWD=/Users/iqgrande/Desktop/macports_build_issues
SSH_TTY=/dev/ttys005
USER=iqgrande
MAIL=/var/mail/iqgrande
PATH=/opt/local/bin:/opt/local/sbin:/opt/ama/bin:/Users/iqgrande/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
PWD=/Users/iqgrande/Desktop/macports_build_issues/build
EDITOR=/opt/local/bin/vim
IPYTHONDIR=/Users/iqgrande/.ipython
LANG=en_US.UTF-8
EMACS_DIR=/Applications/MacPorts/Emacs.app/Contents/MacOS
MOVIE=macabre:/Volumes/FreeAgent2/Data/Movies/
SHLVL=1
HOME=/Users/iqgrande
GNUTERM=aqua
EMACS_CLI=/opt/local/bin/emacs
LOGNAME=iqgrande
SSH_CONNECTION=10.0.1.24 33316 10.0.1.23 22
EMACS_GCLIENT=/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient
EMACS_GUI=/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs

comment:11 Changed 6 years ago by michaelld (Michael Dickens)

All looks fine there except maybe the PATH ... Out of curiosity, what's in /usr/local/bin?

Also, what does the following return (when issued from the "build" directory you just created):

/opt/local/bin/gcc-mp-7 -v -o main.c.o -c ../main.c

comment:12 Changed 6 years ago by iqgrande

This may be related to a mpich-default ticket I opened today, too. Thoughts? Please note that I’ve recently (although not today) compiled source code with this compiler so a recent change has caused this issue.

$ /opt/local/bin/gcc-mp-7 -v -o main.c.o -c ../main.c
Using built-in specs.
COLLECT_GCC=/opt/local/bin/gcc-mp-7
Target: x86_64-apple-darwin17
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc7/gcc7/work/gcc-7.3.0/configure --prefix=/opt/local --build=x86_64-apple-darwin17 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7 --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-tls --with-pkgversion='MacPorts gcc7 7.3.0_3'
Thread model: posix
gcc version 7.3.0 (MacPorts gcc7 7.3.0_3) 
COLLECT_GCC_OPTIONS='-v' '-o' 'main.c.o' '-c' '-mmacosx-version-min=10.13.7' '-asm_macosx_version_min=10.13' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin17/7.3.0/cc1 -quiet -v -D__DYNAMIC__ ../main.c -fPIC -quiet -dumpbase main.c -mmacosx-version-min=10.13.7 -mtune=core2 -auxbase-strip main.c.o -version -o /var/folders/7n/vz1b562x5ndbhsn7rgz_nb840000gp/T//ccMULlRf.s
GNU C11 (MacPorts gcc7 7.3.0_3) version 7.3.0 (x86_64-apple-darwin17)
        compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.3.0/../../../../../x86_64-apple-darwin17/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.3.0/include
 /opt/local/include
 /opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.3.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C11 (MacPorts gcc7 7.3.0_3) version 7.3.0 (x86_64-apple-darwin17)
        compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7d7bf4d385bfd70f2b699ee34f8bd5a4
COLLECT_GCC_OPTIONS='-v' '-o' 'main.c.o' '-c' '-mmacosx-version-min=10.13.7'  '-mtune=core2'
 /opt/local/bin/as -arch x86_64 -v -force_cpusubtype_ALL -mmacosx-version-min=10.13 -o main.c.o /var/folders/7n/vz1b562x5ndbhsn7rgz_nb840000gp/T//ccMULlRf.s
Apple Inc version cctools-895, GNU assembler version 1.38
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
$ ls /usr/local/bin
VBoxAutostart   VBoxVRDP        gs-X11          gslp            pfbtopfa        ps2pdf12        texdist
VBoxBalloonCtrl VirtualBox      gs-noX11        gsnd            pphs            ps2pdf13        unix-lpr.sh
VBoxBugReport   dvipdf          gsbj            lprsetup.sh     printafm        ps2pdf14        vbox-img
VBoxDTrace      eps2eps         gsdj            pdf2dsc         ps2ascii        ps2pdfwr        vboxwebsrv
VBoxHeadless    font2c          gsdj500         pdf2ps          ps2epsi         ps2ps           wftopfa
VBoxManage      gs              gslj            pf2afm          ps2pdf          ps2ps2
Last edited 6 years ago by iqgrande (previous) (diff)

comment:13 Changed 6 years ago by iqgrande

I was able to get past the issue by doing the following (from another port on a similar topic).

sudo port -f uninstall cctools
sudo port install cctools 

comment:14 Changed 6 years ago by michaelld (Michael Dickens)

Yeah I think @iqgrande is onto something.

OK so it looks like /usr/local/bin/ has in it: VirtualBox && GhostScript stuff. that's probably fine.

The as being used is part of cctools, which you have installed as +llvm40. The default is +llvm39. Not sure if that makes a difference.

Can you try the following:

sudo port install cctools

and, assuming that actually works (meaning, it installs the +llvm39 version), then retry all of the various CC=... and related commands & see if it works.

comment:15 Changed 6 years ago by iqgrande

Hello @michaelld

I did your suggestion already (I forced the uninstall) and it does make things work (see comment 13). Thank you for your dedicated sleuthing on this. Your responsiveness and suggestions were great!! Your help is much appreciated.

comment:16 Changed 6 years ago by michaelld (Michael Dickens)

Awesome. You're welcome & thank you for being so responsive! Makes working with folks so much easier!

I'm going to close this ticket as "worksforme" since it does & you managed to get it working for you too, using the defaults for cctools. I'm hoping there's a ticket out there for cctools +llvm40, since it clearly doesn't work right now.

comment:17 Changed 6 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: assignedclosed

comment:18 Changed 6 years ago by basmac

Hi, the cctools reinstall fixed my issue, in that simple gfortran test would fail with "as: I don't understand 'm' flag". This error appeared between June 17 and the updates thereafter, even though the as binaries were identical, but with newer timestamps. Thanks barry

comment:19 Changed 6 years ago by michaelld (Michael Dickens)

@basmac: Thanks for reporting! Seems like "cctools" is causing issues with other installs, too. See e.g., #56943.

comment:20 Changed 6 years ago by mouse07410 (Mouse)

It also appears that cctools +llvm50 works. Today I tried the cctools +xcode, and it was fine too.

Last edited 6 years ago by mouse07410 (Mouse) (previous) (diff)

Changed 6 years ago by kateyalatalo (Dr. Katherine Alatalo)

Attachment: libgcc6-7_kateyalatalo.txt added

rev-upgrade output

comment:21 Changed 6 years ago by kateyalatalo (Dr. Katherine Alatalo)

I am having exactly the same issue right now - libgcc7 and libgcc6 are failing to build. I attempted the complete forced uninstall of both cmake and cctools. It goes into the continuous loop of broken installs of libgcc6 and libgcc7. I have just attached the rev-upgrade for my issue as well.

Note: See TracTickets for help on using tickets.