Skip to content

Commit

Permalink
Move default PATH setting from CMake to get_rocksdb_files.sh (faceboo…
Browse files Browse the repository at this point in the history
…k#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
  • Loading branch information
laurynas-biveinis authored and Herman Lee committed Oct 18, 2023
1 parent 2c144a6 commit 2564685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion storage/rocksdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ELSE()
# get a list of rocksdb library source files
# run with env -i to avoid passing variables
EXECUTE_PROCESS(
COMMAND env -i CXX=${CMAKE_CXX_COMPILER} PATH="/sbin:/usr/sbin:/bin:/usr/bin"
COMMAND env -i CXX=${CMAKE_CXX_COMPILER}
${CMAKE_SOURCE_DIR}/storage/rocksdb/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
Expand Down
4 changes: 4 additions & 0 deletions storage/rocksdb/get_rocksdb_files.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
if [ -z "$PATH" ]; then
export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
fi

MKFILE=`mktemp`
# create and run a simple makefile
# include rocksdb make file relative to the path of this script
Expand Down

0 comments on commit 2564685

Please sign in to comment.