Skip to content

Commit 11984e0

Browse files
Luqun Louluqun
authored andcommitted
[mysql-5.6][PR] Move default PATH setting from CMake to get_rocksdb_files.sh
Summary: In c3f1703, get_rocksdb_files.sh invocation got PATH setting. The public discussion is incomplete but b739eac suggests that there is a problem with CentOS 9 and make 4.3 that undefined PATH does not get a default fallback, thus a PATH value is provided for the invocation. The provided PATH value is however incompatible with building on macOS. Fix by setting the fallback PATH value in the get_rocksdb_files.sh script itself. Pull Request resolved: facebook#1312 GitHub Author: Laurynas Biveinis <laurynas.biveinis@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewers: herman, chni Reviewed By: chni Subscribers: webscalesql-eng@fb.com Differential Revision: https://phabricator.intern.facebook.com/D46285384 Tags: accept2ship
1 parent 6dbd222 commit 11984e0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ELSE()
5252
# get a list of rocksdb library source files
5353
# run with env -i to avoid passing variables
5454
EXECUTE_PROCESS(
55-
COMMAND env -i PATH="/sbin:/usr/sbin:/bin:/usr/bin" ${CMAKE_SOURCE_DIR}/storage/rocksdb/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
55+
COMMAND env -i ${CMAKE_SOURCE_DIR}/storage/rocksdb/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
5656
OUTPUT_VARIABLE SCRIPT_OUTPUT
5757
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
5858
)

storage/rocksdb/get_rocksdb_files.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
2+
if [ -z "$PATH" ]; then
3+
export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
4+
fi
5+
26
MKFILE=`mktemp`
37
# create and run a simple makefile
48
# include rocksdb make file relative to the path of this script

0 commit comments

Comments
 (0)