Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 4dbbf3f

Browse files
committed
It's Saturday night and the terrier are just hanging out working the ol' database.
This commit provides some fixes to get the system to build correctly and run on Ubuntu 17.10. There is a funky problem with g++5.4 that you have to fix with some compiler directives. I also added 'libssl-dev' in packages.sh
1 parent 7303e51 commit 4dbbf3f

File tree

5 files changed

+647
-606
lines changed

5 files changed

+647
-606
lines changed

CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ else()
5050
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++1Y support. Please use a different C++ compiler.")
5151
endif()
5252

53-
# Create a new pre-processor macro __PELOTONFILE__ that has a truncated
53+
# Create a new pre-processor macro __PELOTONFILE__ that has a truncated
5454
# path to reduce the size of the debug log messages.
5555
# Source: http://stackoverflow.com/a/16658858
5656
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__PELOTONFILE__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
@@ -62,7 +62,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
6262
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
6363
endif()
6464

65-
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
65+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
6666
(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9))
6767
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=auto")
6868
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=auto")
@@ -79,6 +79,21 @@ if(UNIX OR APPLE)
7979
endif()
8080
endif()
8181

82+
# There is a problem with building on g++5.4 on Ubuntu 17.10 where
83+
# the compiler will not support a bunch of stuff in std for some reason.
84+
# For example, it would say that 'to_string' is not part of 'std'.
85+
# These flags fix these problems. I don't know whether g++5.5 has the same
86+
# problem, so I am only making this fix target all variants of 5.4.
87+
#
88+
# More Info: https://stackoverflow.com/a/38034394
89+
# https://github.com/opencv/opencv/issues/10032#issuecomment-342347482
90+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
91+
(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.4 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.4) AND
92+
(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.5))
93+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_C99=1 -D_GLIBCXX_USE_C99_MATH=1")
94+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_C99=1 -D_GLIBCXX_USE_C99_MATH=1")
95+
endif()
96+
8297
# ---[ Warnings
8398
peloton_warnings_disable(CMAKE_CXX_FLAGS -Wno-strict-aliasing -Wno-implicit-fallthrough)
8499

script/installation/packages.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,21 @@ if [ "$DISTRO" = "UBUNTU" ]; then
8888
$PKG_CLANG \
8989
git \
9090
g++ \
91-
libgflags-dev \
92-
libprotobuf-dev \
93-
protobuf-compiler \
9491
bison \
9592
flex \
93+
valgrind \
94+
lcov \
95+
protobuf-compiler \
96+
libgflags-dev \
97+
libprotobuf-dev \
9698
libevent-dev \
9799
libboost-dev \
98100
libboost-thread-dev \
99101
libboost-filesystem-dev \
100102
libjemalloc-dev \
101-
valgrind \
102-
lcov \
103103
libpqxx-dev \
104104
libedit-dev \
105+
libssl-dev \
105106
postgresql-client
106107

107108
## ------------------------------------------------

src/include/common/exception.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// Identification: src/include/common/exception.h
88
//
9-
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
9+
// Copyright (c) 2015-2018, Carnegie Mellon University Database Group
1010
//
1111
//===----------------------------------------------------------------------===//
1212

@@ -21,9 +21,10 @@
2121
#include <iostream>
2222
#include <memory>
2323
#include <stdexcept>
24+
#include <string>
2425

2526
#include "type/type.h"
26-
#include "internal_types.h"
27+
#include "common/internal_types.h"
2728

2829
namespace peloton {
2930

src/include/index/sorted_small_set.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Peloton
4+
//
5+
// sorted_small_set.h
6+
//
7+
// Identification: src/include/index/sorted_small_set.h
8+
//
9+
// Copyright (c) 2015-2018, Carnegie Mellon University Database Group
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113

214
#include <cassert>
315
#include <algorithm>

0 commit comments

Comments
 (0)