Skip to content

Commit 5c16c50

Browse files
laurynas-biveinisHerman Lee
authored andcommitted
Move default PATH setting from CMake to get_rocksdb_files.sh (facebook#1312)
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 Differential Revision: D46285384
1 parent 982d814 commit 5c16c50

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)