Opened 6 years ago

Closed 6 years ago

#57043 closed defect (fixed)

metis @5.1.0 Configure error - build failure snowleopard

Reported by: chrisjohgorman (Chris Gorman) Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: snowleopard Cc: chrisgorman@…, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: metis

Description

I'm not too sure if this belongs to metis or to cmake, but I will file it under metis for the time being. I have tried this with cmake @3.7.2_0, cmake @3.11.1_0 and cmake @3.12.1_0. With the main difference being the line numbers where the error occurs. The following is for cmake @3.12.1_0

Chris-Gormans-Mac-mini:~ chrisgorman$ sudo port -v install metis
--->  Computing dependencies for metis.
--->  Fetching distfiles for metis
--->  Verifying checksums for metis
--->  Checksumming metis-5.1.0.tar.gz
--->  Extracting metis
--->  Extracting metis-5.1.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/metis/metis-5.1.0.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
--->  Applying patches to metis
--->  Applying remove_home_dir.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/remove_home_dir.patch'
patching file programs/CMakeLists.txt
--->  Applying cmake64.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/cmake64.patch'
patching file BUILD.txt
patching file Install.txt
patching file Makefile
patching file include/CMakeLists.txt
patching file include/metis.h
patching file include/metis.h.in
patching file libmetis/CMakeLists.txt
patching file programs/CMakeLists.txt
--->  Applying sharedprefix.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/sharedprefix.patch'
patching file CMakeLists.txt
--->  Applying missing_includes.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/missing_includes.patch'
patching file libmetis/CMakeLists.txt
--->  Applying cmake_tls.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/cmake_tls.patch'
patching file Makefile
--->  Applying gkl.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/gkl.patch'
patching file GKlib/GKlibSystem.cmake
patching file GKlib/conf/check_thread_storage.c
patching file GKlib/error.c
patching file GKlib/gk_arch.h
patching file GKlib/gk_externs.h
patching file GKlib/gklib_tls.h.in
patching file GKlib/memory.c
patching file GKlib/string.c
--->  Applying cmake_gklib_tls.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/cmake_gklib_tls.patch'
patching file include/CMakeLists.txt
--->  Applying cmake_system_include.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/cmake_system_include.patch'
patching file CMakeLists.txt
--->  Configuring metis
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/opt/local;/usr" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -Wno-dev -DGKLIB_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0/GKlib -DSHARED=1 -DMETIS_USE_DOUBLEPRECISION=1 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0 
-- The C compiler identification is Clang 3.9.1
-- The CXX compiler identification is Clang 3.9.1
-- Check for working C compiler: /opt/local/bin/clang-mp-3.9
-- Check for working C compiler: /opt/local/bin/clang-mp-3.9 -- 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++-mp-3.9
-- Check for working CXX compiler: /opt/local/bin/clang++-mp-3.9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for getline
-- Looking for getline - not found
-- Performing Test HAVE__thread
-- Performing Test HAVE__thread - Failed
-- checking for __thread thread-local storage - not found
-- Performing Test HAVE__declspec(thread)
CMake Error at /opt/local/share/cmake-3.12/Modules/CheckCSourceRuns.cmake:102 (if):
  Syntax error in cmake code at

    /opt/local/share/cmake-3.12/Modules/CheckCSourceRuns.cmake:102

  when parsing string

    ${HAVE__declspec(thread)_EXITCODE}

  syntax error, unexpected cal_SYMBOL, expecting } (34)
Call Stack (most recent call first):
  GKlib/GKlibSystem.cmake:104 (check_c_source_runs)
  CMakeLists.txt:23 (include)


-- Configuring incomplete, errors occurred!
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0/CMakeFiles/CMakeOutput.log".
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0/CMakeFiles/CMakeError.log".
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/opt/local;/usr" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -Wno-dev -DGKLIB_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0/GKlib -DSHARED=1 -DMETIS_USE_DOUBLEPRECISION=1 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0 
Exit code: 1
Error: Failed to configure metis: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port metis failed

I have attached the three files main.log, CMakeError.log and CMakeOutput.log.

Attachments (3)

main.log (108.0 KB) - added by chrisjohgorman (Chris Gorman) 6 years ago.
CMakeOutput.log (39.1 KB) - added by chrisjohgorman (Chris Gorman) 6 years ago.
CMakeError.log (3.5 KB) - added by chrisjohgorman (Chris Gorman) 6 years ago.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by chrisjohgorman (Chris Gorman)

Attachment: main.log added

Changed 6 years ago by chrisjohgorman (Chris Gorman)

Attachment: CMakeOutput.log added

Changed 6 years ago by chrisjohgorman (Chris Gorman)

Attachment: CMakeError.log added

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Cc: sean@… removed
Keywords: metis cmake removed
Owner: set to seanfarley
Status: newassigned

comment:2 Changed 6 years ago by kencu (Ken)

SnowLeopard indeed has neither getline nor does it (easily) have thread_local. There are some workarounds available.

getline can be replaced by the PortGroup snowleopard_fixes 1.0.

thread_local can be supplied by gcc versions > about 4.7, certainly by gcc7 which is probably the one to go-to at present, if that matches up with your stdlib needs. This works great for the_silver_searcher, for example.

I have modified a version of clang-5.0 to provide thread_local (most implementations) on SnowLeopard. It's a bit - shall we say - experimental, but I've been using it for about six months with moderate, if not complete, success <https://github.com/kencu/SnowLeopardPorts/tree/master/lang/llvm-5.0>.

comment:3 Changed 6 years ago by chrisjohgorman (Chris Gorman)

Thanks Ken,

Your information allowed me to build metis. (I passed configure.compiler=macports-gcc-7 and the package built without complaint.) I will look into applying your clang-5.0 patches to clang-6.0 as I now have that installed to do most of my building.

comment:4 Changed 6 years ago by kencu (Ken)

Looking over my SnowLeopardPorts repo, it looks like I fixed this port some time ago with this addition:

if { ${os.platform} eq "darwin" && ${os.major} <= 10 } {
    # no thread_local
    patchfiles-delete     cmake_tls.patch
    patchfiles-delete     gkl.patch
    patchfiles-delete     cmake_gklib_tls.patch
    
    configure.args-append -DHAVE_THREADLOCALSTORAGE=NO
}

and it built OK with clang with that block in the portfile.

comment:5 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:6 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

There is a pull request that attempts to solve this problem.

comment:7 Changed 6 years ago by chrisjohgorman (Chris Gorman)

Downloaded a git branch with the new patch. Copied the new gkl.patch to my ports tree. Ran sudo port -v upgrade -s -n --force metis.

--->  Applying gkl.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_metis/metis/work/metis-5.1.0" && /usr/bin/patch -p1 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/math/metis/files/gkl.patch'
patching file GKlib/GKlibSystem.cmake
patching file GKlib/conf/check_thread_storage.c
patching file GKlib/error.c
patching file GKlib/gk_arch.h
patching file GKlib/gk_externs.h
patching file GKlib/gklib_tls.h.in
patching file GKlib/memory.c
patching file GKlib/string.c

Rebuilt metis without error using clang-6.0.1. Suggest closing bug.

comment:8 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In 7d51f6410c033f432c82bfa66543444a217e5ed1/macports-ports (master):

metis: fix thread-local storage detection patch

Fixes #57043

Note: See TracTickets for help on using tickets.