Skip to content

Commit

Permalink
Move default PATH setting from CMake to get_rocksdb_files.sh (percona…
Browse files Browse the repository at this point in the history
…#1312)

Upstream commit ID: facebook/mysql-5.6@38b673f
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
In c3f1703231d7fec34de1479b8913a06cd9c4cd79, get_rocksdb_files.sh invocation got PATH setting. The public discussion is incomplete but b739eac1760c2451200246c5d7fe3233787053b8 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/mysql-5.6#1312

Differential Revision: D46285384

fbshipit-source-id: 11984e05db5cc61ae69e7cfd4228f01d2ac238e4
  • Loading branch information
laurynas-biveinis authored and lukin-oleksiy committed Jan 29, 2025
1 parent 1f29a9e commit 84b1abd
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 @@ -103,7 +103,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" ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
COMMAND env -i CXX=${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${CMAKE_CURRENT_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 84b1abd

Please sign in to comment.