You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bb...@apache.org on 2019/04/30 17:20:42 UTC
[geode-native] branch develop updated: GEODE-6275: Support RHEL6
builds. (#470)
This is an automated email from the ASF dual-hosted git repository.
bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new 797002d GEODE-6275: Support RHEL6 builds. (#470)
797002d is described below
commit 797002d92f01872056292b983ff521eb80f5c253
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Tue Apr 30 10:20:37 2019 -0700
GEODE-6275: Support RHEL6 builds. (#470)
* Support RHEL6 builds.
* Cleanup __STDC_FORMAT_MACROS and cinttypes
* Packer script to provision RHEL6
---
CMakeLists.txt | 6 ++++
cppcache/CMakeLists.txt | 1 -
cppcache/integration-test/testSerialization.cpp | 4 +--
.../integration-test/testThinClientBigValue.cpp | 3 +-
.../testXmlCacheCreationWithPools.cpp | 2 +-
dependencies/ACE/CMakeLists.txt | 5 ++--
dependencies/benchmark/CMakeLists.txt | 10 +++++--
dhimpl/DHImpl.hpp | 1 -
packer/build-linux.json | 7 ++---
packer/{build-linux.json => build-rhel-6.json} | 32 ++++++++--------------
packer/rhel-7-base.json | 3 +-
packer/rhel/disable-selinux.sh | 10 +------
.../etc/cloud/cloud.cfg.d/10_hosts.cfg} | 14 ++--------
packer/rhel/install-build-rpms.sh | 5 +++-
tests/cpp/fwklib/FwkStrCvt.hpp | 2 +-
tests/cpp/testobject/BatchObject.hpp | 3 +-
tests/cpp/testobject/CMakeLists.txt | 1 -
tests/cpp/testobject/DeltaFastAssetAccount.hpp | 3 +-
tests/cpp/testobject/DeltaPSTObject.hpp | 3 +-
tests/cpp/testobject/EqStruct.hpp | 3 +-
tests/cpp/testobject/FastAssetAccount.cpp | 2 +-
tests/cpp/testobject/PSTObject.hpp | 3 +-
22 files changed, 50 insertions(+), 73 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a059ac..b0ce016 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,6 +183,12 @@ if(ipo_supported)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
endif()
+include(CheckCXXSymbolExists)
+check_cxx_symbol_exists("PRId8" "cinttypes" HAVE_STDC_FORMAT_MACROS)
+if (NOT HAVE_STDC_FORMAT_MACROS)
+ target_compile_definitions(c++11 INTERFACE __STDC_FORMAT_MACROS)
+endif()
+
if(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
# Force linker to error on undefined symbols in shared libraries
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z defs")
diff --git a/cppcache/CMakeLists.txt b/cppcache/CMakeLists.txt
index 524e52a..fc357bb 100644
--- a/cppcache/CMakeLists.txt
+++ b/cppcache/CMakeLists.txt
@@ -74,7 +74,6 @@ set(SOURCES_ALL ${SOURCES} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS} ${CONFIGURE_IN_F
add_library(_apache-geode INTERFACE)
target_compile_definitions(_apache-geode INTERFACE
- __STDC_FORMAT_MACROS
BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
)
diff --git a/cppcache/integration-test/testSerialization.cpp b/cppcache/integration-test/testSerialization.cpp
index 14b8816..24c4b07 100644
--- a/cppcache/integration-test/testSerialization.cpp
+++ b/cppcache/integration-test/testSerialization.cpp
@@ -15,9 +15,7 @@
* limitations under the License.
*/
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-
+#include <cinttypes>
#include <memory>
#include <geode/internal/geode_base.hpp>
diff --git a/cppcache/integration-test/testThinClientBigValue.cpp b/cppcache/integration-test/testThinClientBigValue.cpp
index fc9ad73..5c2ad19 100644
--- a/cppcache/integration-test/testThinClientBigValue.cpp
+++ b/cppcache/integration-test/testThinClientBigValue.cpp
@@ -15,8 +15,7 @@
* limitations under the License.
*/
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
+#include <cinttypes>
#include <geode/internal/geode_base.hpp>
diff --git a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
index 81329a5..6a779e6 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-#include <inttypes.h>
+#include <cinttypes>
#include <cstdint>
#include <iostream>
#include <string>
diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt
index 3799cf7..8d48b37 100644
--- a/dependencies/ACE/CMakeLists.txt
+++ b/dependencies/ACE/CMakeLists.txt
@@ -162,8 +162,9 @@ target_include_directories(ACE_ACE SYSTEM INTERFACE
$<BUILD_INTERFACE:${INSTALL_DIR}/include>
)
target_compile_definitions(ACE_ACE INTERFACE
- -D__ACE_INLINE__
- -DACE_AS_STATIC_LIBS
+ __ACE_INLINE__
+ ACE_AS_STATIC_LIBS
+ __STDC_FORMAT_MACROS # ACE slurps in inttypes.h before cinttypes and clobbers these macros
)
target_link_libraries(ACE_ACE INTERFACE
${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}ACE${CMAKE_STATIC_LIBRARY_SUFFIX}
diff --git a/dependencies/benchmark/CMakeLists.txt b/dependencies/benchmark/CMakeLists.txt
index 1a31a0c..9372660 100644
--- a/dependencies/benchmark/CMakeLists.txt
+++ b/dependencies/benchmark/CMakeLists.txt
@@ -67,9 +67,13 @@ target_link_libraries(benchmark_benchmark INTERFACE
Threads::Threads
)
if (WIN32)
-target_link_libraries(benchmark_benchmark INTERFACE
- Shlwapi
-)
+ target_link_libraries(benchmark_benchmark INTERFACE
+ Shlwapi
+ )
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_link_libraries(benchmark_benchmark INTERFACE
+ rt
+ )
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
target_link_libraries(benchmark_benchmark INTERFACE
kstat
diff --git a/dhimpl/DHImpl.hpp b/dhimpl/DHImpl.hpp
index c2b2229..38ba3c8 100644
--- a/dhimpl/DHImpl.hpp
+++ b/dhimpl/DHImpl.hpp
@@ -22,7 +22,6 @@
#include <openssl-compat.h>
#include <openssl/asn1t.h>
-#include <openssl/dh.h>
#include <openssl/x509.h>
#include <string>
diff --git a/packer/build-linux.json b/packer/build-linux.json
index 4adbae0..7b47588 100644
--- a/packer/build-linux.json
+++ b/packer/build-linux.json
@@ -1,8 +1,8 @@
{
"variables":{
"region":"us-west-2",
- "source_ami":"ami-1e41877e",
- "source_image_name":"X.vmx",
+ "source_ami":"",
+ "source_image_name":"",
"image_name":"build-linux"
},
"builders":[
@@ -94,8 +94,7 @@
"type":"shell",
"execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts":[
- "rhel/cleanup.sh",
- "rhel/zerodisk.sh"
+ "rhel/cleanup.sh"
]
}
]
diff --git a/packer/build-linux.json b/packer/build-rhel-6.json
similarity index 77%
copy from packer/build-linux.json
copy to packer/build-rhel-6.json
index 4adbae0..cbd6004 100644
--- a/packer/build-linux.json
+++ b/packer/build-rhel-6.json
@@ -1,9 +1,9 @@
{
"variables":{
"region":"us-west-2",
- "source_ami":"ami-1e41877e",
- "source_image_name":"X.vmx",
- "image_name":"build-linux"
+ "source_ami":"ami-80296ff8",
+ "source_image_name":"",
+ "image_name":"build-rhel6"
},
"builders":[
{
@@ -16,6 +16,14 @@
"source_ami":"{{user `source_ami`}}",
"subnet_id":"{{user `subnet_id`}}",
"vpc_id":"{{user `vpc_id`}}",
+ "launch_block_device_mappings":[
+ {
+ "device_name":"/dev/sda1",
+ "delete_on_termination":true,
+ "volume_type": "gp2",
+ "volume_size":100
+ }
+ ],
"tags":{
"team":"native",
"version":"{{user `version`}}",
@@ -52,28 +60,13 @@
]
},
{
- "type":"file",
- "source":"rhel/init-hosts.rc.local",
- "destination":"/tmp/init-hosts.rc.local"
- },
- {
- "type":"shell",
- "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
- "inline":[
- "cat /tmp/init-hosts.rc.local >> /etc/rc.local"
- ]
- },
- {
"type":"shell",
"execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts":[
"rhel/disable-selinux.sh",
"rhel/add-user-build.sh",
- "rhel/install-repos.sh",
"rhel/install-scl-devtoolset.sh",
- "rhel/install-scl-python27.sh",
"rhel/install-build-rpms.sh",
- "rhel/install-coverage-tools.sh",
"rhel/install-cmake.sh",
"rhel/install-jdk-1.8.sh"
]
@@ -94,8 +87,7 @@
"type":"shell",
"execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts":[
- "rhel/cleanup.sh",
- "rhel/zerodisk.sh"
+ "rhel/cleanup.sh"
]
}
]
diff --git a/packer/rhel-7-base.json b/packer/rhel-7-base.json
index cd03619..84d43f8 100644
--- a/packer/rhel-7-base.json
+++ b/packer/rhel-7-base.json
@@ -41,8 +41,7 @@
"type":"shell",
"execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts":[
- "rhel/cleanup.sh",
- "rhel/zerodisk.sh"
+ "rhel/cleanup.sh"
]
}
]
diff --git a/packer/rhel/disable-selinux.sh b/packer/rhel/disable-selinux.sh
index 777b82d..9a8af60 100644
--- a/packer/rhel/disable-selinux.sh
+++ b/packer/rhel/disable-selinux.sh
@@ -17,11 +17,7 @@
set -x -e -o pipefail
-bin=`dirname "$0"`
-bin=`cd "$bin">/dev/null; pwd`
-
-main() {
- cat > /etc/sysconfig/selinux <<EOF
+cat > /etc/sysconfig/selinux <<EOF
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
@@ -34,7 +30,3 @@ SELINUX=disabled
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
EOF
-
-}
-
-main "$@"
diff --git a/packer/rhel/zerodisk.sh b/packer/rhel/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
similarity index 86%
rename from packer/rhel/zerodisk.sh
rename to packer/rhel/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
index 809eb14..bb02494 100644
--- a/packer/rhel/zerodisk.sh
+++ b/packer/rhel/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
@@ -1,24 +1,16 @@
-#!/usr/bin/env bash
-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
-# TODO does this really help image launch times?
-
-exit 0
-
-dd if=/dev/zero of=/EMPTY bs=1M
-rm -f /
+manage_etc_hosts: true
diff --git a/packer/rhel/install-build-rpms.sh b/packer/rhel/install-build-rpms.sh
index 08cb45d..2809a1f 100644
--- a/packer/rhel/install-build-rpms.sh
+++ b/packer/rhel/install-build-rpms.sh
@@ -17,4 +17,7 @@
set -x -e -o pipefail
-yum install -y git2u make doxygen zlib-devel patch openssl-devel
\ No newline at end of file
+yum install -y make doxygen zlib-devel patch openssl-devel
+
+yum install -y rh-git29
+echo "source scl_source enable rh-git29" >> ~build/.bashrc
diff --git a/tests/cpp/fwklib/FwkStrCvt.hpp b/tests/cpp/fwklib/FwkStrCvt.hpp
index c7914ce..bfbe1c8 100644
--- a/tests/cpp/fwklib/FwkStrCvt.hpp
+++ b/tests/cpp/fwklib/FwkStrCvt.hpp
@@ -23,7 +23,7 @@
#include "config.h"
#if defined(_MACOSX)
-#include <inttypes.h>
+#include <cinttypes>
#endif
#include <string>
diff --git a/tests/cpp/testobject/BatchObject.hpp b/tests/cpp/testobject/BatchObject.hpp
index 310eab5..8a8d29e 100644
--- a/tests/cpp/testobject/BatchObject.hpp
+++ b/tests/cpp/testobject/BatchObject.hpp
@@ -20,8 +20,7 @@
#ifndef GEODE_TESTOBJECT_BATCHOBJECT_H_
#define GEODE_TESTOBJECT_BATCHOBJECT_H_
-#include <inttypes.h>
-
+#include <cinttypes>
#include <string>
#include <ace/ACE.h>
diff --git a/tests/cpp/testobject/CMakeLists.txt b/tests/cpp/testobject/CMakeLists.txt
index 253b9ce..c5cfeb5 100644
--- a/tests/cpp/testobject/CMakeLists.txt
+++ b/tests/cpp/testobject/CMakeLists.txt
@@ -79,7 +79,6 @@ target_include_directories(testobject
target_compile_definitions(testobject
PRIVATE
BUILD_TESTOBJECT
- __STDC_FORMAT_MACROS
)
target_include_directories(testobject
diff --git a/tests/cpp/testobject/DeltaFastAssetAccount.hpp b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
index 30b1600..ad96bdc 100644
--- a/tests/cpp/testobject/DeltaFastAssetAccount.hpp
+++ b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
@@ -20,8 +20,7 @@
#ifndef GEODE_TESTOBJECT_DELTAFASTASSETACCOUNT_H_
#define GEODE_TESTOBJECT_DELTAFASTASSETACCOUNT_H_
-#include <inttypes.h>
-
+#include <cinttypes>
#include <string>
#include <ace/ACE.h>
diff --git a/tests/cpp/testobject/DeltaPSTObject.hpp b/tests/cpp/testobject/DeltaPSTObject.hpp
index db548a7..ddab236 100644
--- a/tests/cpp/testobject/DeltaPSTObject.hpp
+++ b/tests/cpp/testobject/DeltaPSTObject.hpp
@@ -20,8 +20,7 @@
#ifndef GEODE_TESTOBJECT_DELTAPSTOBJECT_H_
#define GEODE_TESTOBJECT_DELTAPSTOBJECT_H_
-#include <inttypes.h>
-
+#include <cinttypes>
#include <string>
#include <ace/ACE.h>
diff --git a/tests/cpp/testobject/EqStruct.hpp b/tests/cpp/testobject/EqStruct.hpp
index 7b0333b..538063d 100644
--- a/tests/cpp/testobject/EqStruct.hpp
+++ b/tests/cpp/testobject/EqStruct.hpp
@@ -20,8 +20,7 @@
#ifndef GEODE_TESTOBJECT_EQSTRUCT_H_
#define GEODE_TESTOBJECT_EQSTRUCT_H_
-#include <inttypes.h>
-
+#include <cinttypes>
#include <fwklib/FwkException.hpp>
#include <string>
diff --git a/tests/cpp/testobject/FastAssetAccount.cpp b/tests/cpp/testobject/FastAssetAccount.cpp
index 1b907ac..9f154d5 100644
--- a/tests/cpp/testobject/FastAssetAccount.cpp
+++ b/tests/cpp/testobject/FastAssetAccount.cpp
@@ -17,7 +17,7 @@
#include "FastAssetAccount.hpp"
-#include <inttypes.h>
+#include <cinttypes>
#include "FastAsset.hpp"
diff --git a/tests/cpp/testobject/PSTObject.hpp b/tests/cpp/testobject/PSTObject.hpp
index c6f4a7f..fddb1c4 100644
--- a/tests/cpp/testobject/PSTObject.hpp
+++ b/tests/cpp/testobject/PSTObject.hpp
@@ -20,8 +20,7 @@
#ifndef GEODE_TESTOBJECT_PSTOBJECT_H_
#define GEODE_TESTOBJECT_PSTOBJECT_H_
-#include <inttypes.h>
-
+#include <cinttypes>
#include <string>
#include <ace/ACE.h>