Skip to content

Commit 88cf2ab

Browse files
authored
Merge pull request #172 from FloopCZ/arch-gcc
Arch gcc
2 parents 419eb9d + a510619 commit 88cf2ab

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Dockerfiles/install-archlinux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pacman -Syu --noconfirm --needed \
3030

3131
if $shared; then
3232
pacman -S --noconfirm --needed \
33-
gcc7 \
33+
gcc \
3434
java-environment=8 \
3535
libarchive \
3636
protobuf \

tensorflow_cc/cmake/TensorflowShared.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ExternalProject_Add(
1111
DOWNLOAD_COMMAND ""
1212
UPDATE_COMMAND ""
1313
CONFIGURE_COMMAND tensorflow/contrib/makefile/compile_linux_protobuf.sh
14-
# patch nsync to use g++-7
15-
COMMAND sed -i "s/ g++/ g++-7/g" tensorflow/contrib/makefile/compile_nsync.sh
14+
# Do not fail on warnings when building nsync
15+
COMMAND sed -i "s/ -Werror//g" tensorflow/contrib/makefile/compile_nsync.sh
1616
COMMAND tensorflow/contrib/makefile/compile_nsync.sh
1717
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/build_tensorflow.sh"
1818
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy_links.sh" .

tensorflow_cc/cmake/build_tensorflow.sh.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ if [ "@ALLOW_CUDA@" = "ON" ] && [ -n "${CUDA_TOOLKIT_PATH}" ]; then
6868

6969
# choose the right version of CUDA compiler
7070
if [ -z "$GCC_HOST_COMPILER_PATH" ]; then
71-
if hash gcc-7 2>/dev/null && version_gt 7.5 `gcc-7 -dumpversion`; then
71+
if hash gcc 2>/dev/null && version_gt 8.5 `gcc -dumpversion`; then
72+
export GCC_HOST_COMPILER_PATH=${GCC_HOST_COMPILER_PATH:-"/usr/bin/gcc"}
73+
elif hash gcc-7 2>/dev/null && version_gt 7.5 `gcc-7 -dumpversion`; then
7274
export GCC_HOST_COMPILER_PATH=${GCC_HOST_COMPILER_PATH:-"/usr/bin/gcc-7"}
7375
elif hash gcc-6 2>/dev/null && version_gt 6.4 `gcc-6 -dumpversion`; then
7476
export GCC_HOST_COMPILER_PATH=${GCC_HOST_COMPILER_PATH:-"/usr/bin/gcc-6"}

0 commit comments

Comments
 (0)