Skip to content

Commit

Permalink
relative rpath for librdkafka links
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Jun 8, 2024
1 parent 6746c8f commit 695e259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions support/build/extensions/no-debug-non-zts-20180731/rdkafka
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ esac

CONFIGURE_EXTRA="--with-rdkafka=${OUT_PREFIX}"

from_ext_to_lib=$(realpath --relative-to="$(php-config --extension-dir)" "${OUT_PREFIX}/lib")

MAKE_EXTRA="LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/${from_ext_to_lib}'"

source $(dirname $BASH_SOURCE)/../pecl
3 changes: 2 additions & 1 deletion support/build/extensions/pecl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ phpize
./configure \
--prefix=${OUT_PREFIX} \
${CONFIGURE_EXTRA:-}
make -s -j $(($(nproc)+1))
make -s -j $(($(nproc)+1)) \
${MAKE_EXTRA:-}

# php was a build dep, and it's in $OUT_PREFIX; we only want our build results in the final archive, and no build deps
# the easiest way is to nuke $OUT_PREFIX and running "make install", but extensions built for PHP 8.1+ need PHP headers during linking
Expand Down

0 comments on commit 695e259

Please sign in to comment.