Building Taskwarrior with Clang

23 views
Skip to first unread message

Brent J. Nordquist

unread,
Dec 15, 2018, 6:23:12 AM12/15/18
to taskwar...@googlegroups.com
[Sorry if this is the wrong place to ask this; feel free to redirect me.]

I'm trying to build Taskwarrior (from git clone) on Amazon Linux (RHEL/CentOS-like Linux). This box has both gcc/g++ and clang/clang++ installed; I don't want to uninstall/upgrade the former since other stuff is compiled with it at that version.

The INSTALL file says "gcc or clang" so I thought I could pick one. I'm able to set Clang as the compiler using the CMake -D options (see below), but once I do "make" you can see from the output that it's still trying to use gcc/g++, and failing (probably because my gcc/g++ is too old).

Is there a way to make this work? TIA for any help, and let me know if there's more data I can add,

Brent

-- details

# uname -a
Linux [hostname] 4.9.93-41.60.amzn1.x86_64 #1 SMP Fri Apr 13 21:58:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# cmake3 --version
cmake3 version 3.6.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
# g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# clang++ --version
clang version 3.6.2 (tags/RELEASE_362/final)
Target: x86_64-amazon-linux-gnu
Thread model: posix
# cmake3 --version
cmake3 version 3.6.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
# cmake3 -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
-- The C compiler identification is Clang 3.6.2
-- The CXX compiler identification is Clang 3.6.2
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring C++14
-- System: Linux
-- Performing Test _HAS_CXX14
-- Performing Test _HAS_CXX14 - Success
-- Looking for libshared
-- Found libshared
-- Looking for SHA1 references
-- Found SHA1 reference: bd221a5ad
-- Looking for GnuTLS
-- Found GnuTLS: /usr/lib64/libgnutls.so (found version "2.12.23")
-- Looking for timegm
-- Looking for timegm - found
-- Looking for get_current_dir_name
-- Looking for get_current_dir_name - found
-- Looking for wordexp
-- Looking for wordexp - found
-- Performing Test HAVE_TM_GMTOFF
-- Performing Test HAVE_TM_GMTOFF - Success
-- Performing Test HAVE_ST_BIRTHTIME
-- Performing Test HAVE_ST_BIRTHTIME - Failed
-- Looking for libuuid
-- Looking for uuid_unparse_lower
-- Looking for uuid_unparse_lower - found
-- Found libuuid
-- Configuring cmake.h
-- Configuring man pages
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/taskwarrior
# make
Scanning dependencies of target columns
[ 0%] Building CXX object src/columns/CMakeFiles/columns.dir/Column.cpp.o
In file included from /usr/local/src/taskwarrior/src/columns/Column.cpp:28:
In file included from /usr/local/src/taskwarrior/src/columns/Column.h:31:
In file included from /usr/bin/../lib/gcc/x86_64-amazon-linux/4.8.5/../../../../include/c++/4.8.5/string:52:
In file included from /usr/bin/../lib/gcc/x86_64-amazon-linux/4.8.5/../../../../include/c++/4.8.5/bits/basic_string.h:2815:
In file included from /usr/bin/../lib/gcc/x86_64-amazon-linux/4.8.5/../../../../include/c++/4.8.5/ext/string_conversions.h:43:
/usr/bin/../lib/gcc/x86_64-amazon-linux/4.8.5/../../../../include/c++/4.8.5/cstdio:120:11: error: no member named 'gets' in the global namespace
using ::gets;
~~^
1 error generated.
make[2]: *** [src/columns/CMakeFiles/columns.dir/Column.cpp.o] Error 1
make[1]: *** [src/columns/CMakeFiles/columns.dir/all] Error 2
make: *** [all] Error 2

-- end details

--
Brent J. Nordquist <br...@nordist.net>
Contact information: https://nordist.net/~bjn/contact.html
Reply all
Reply to author
Forward
0 new messages