Skip to content

Commit f65a4bc

Browse files
laurynas-biveinisinikep
authored andcommitted
Move default PATH setting from CMake to get_rocksdb_files.sh (percona#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
1 parent fd250d2 commit f65a4bc

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
@@ -103,7 +103,7 @@ ELSE()
103103
# get a list of rocksdb library source files
104104
# run with env -i to avoid passing variables
105105
EXECUTE_PROCESS(
106-
COMMAND env -i CXX=${CMAKE_CXX_COMPILER} PATH="/sbin:/usr/sbin:/bin:/usr/bin" ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
106+
COMMAND env -i CXX=${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY}
107107
OUTPUT_VARIABLE SCRIPT_OUTPUT
108108
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
109109
)

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)