Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitlab/build-codecompass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export LDFLAGS="-Wl,-rpath-link,$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib "\
# otherwise version in postgresql-install/lib is used

export LD_LIBRARY_PATH=$DEPS_INSTALL_RUNTIME_DIR/odb-install/lib\
:$DEPS_INSTALL_RUNTIME_DIR/python-install/lib\
:$LD_LIBRARY_PATH
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LD_LIBRARY_PATH construction can leave a trailing : when $LD_LIBRARY_PATH is empty/unset, which adds the current working directory to the dynamic loader search path. To avoid security/non-determinism issues, append the existing value conditionally (only when non-empty).

Suggested change
:$LD_LIBRARY_PATH
${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

Copilot uses AI. Check for mistakes.

export CMAKE_PREFIX_PATH=$DEPS_INSTALL_RUNTIME_DIR/libgit2-install\
Expand Down
6 changes: 4 additions & 2 deletions .gitlab/build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,13 @@ export LD_LIBRARY_PATH=$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib:$LD_LIBRARY
--quiet \
--prefix=$DEPS_INSTALL_RUNTIME_DIR/python-install \
--with-openssl=$DEPS_INSTALL_RUNTIME_DIR/openssl-install \
--enable-optimizations
--enable-optimizations \
--enable-shared
Comment on lines 238 to +242
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--enable-shared typically makes the installed python3 binary depend on libpython3.9.so in $DEPS_INSTALL_RUNTIME_DIR/python-install/lib. Right now this script compensates by exporting LD_LIBRARY_PATH later, but other runtime entrypoints (e.g. .gitlab/cc-env.sh, which is used for running tools interactively) don’t include python-install/lib, so python3 can fail to start outside this script. Consider either (a) updating the runtime environment scripts to include python-install/lib as well, or (b) adding an rpath during the Python build so the interpreter can locate its own lib directory without relying on LD_LIBRARY_PATH.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a valid concern? @barnabasdomozi

make install --quiet --jobs $(nproc)
rm -f $PACKAGES_DIR/Python-3.9.0.tar.xz

export PATH=$DEPS_INSTALL_RUNTIME_DIR/python-install/bin:$PATH
export LD_LIBRARY_PATH="$DEPS_INSTALL_RUNTIME_DIR/python-install/lib:$LD_LIBRARY_PATH"

##############
# LLVM/Clang #
Expand Down Expand Up @@ -311,7 +313,7 @@ if [ ! -f $DEPS_INSTALL_RUNTIME_DIR/boost-install/lib/libboost_program_options.s

./bootstrap.sh \
--prefix=$DEPS_INSTALL_RUNTIME_DIR/boost-install \
--with-python=$DEPS_INSTALL_RUNTIME_DIR/python-install/bin/python
--with-python=$DEPS_INSTALL_RUNTIME_DIR/python-install/bin/python3
./b2 -j $(nproc) install

rm -f $PACKAGES_DIR/boost_1_74_0.tar.gz
Expand Down