Skip to content

Commit 6b99e98

Browse files
committed
[GR-19453] Make sure libc++ is found when C extension libraries are used with FFI.
PullRequest: truffleruby/1131
2 parents c65ba41 + 2141490 commit 6b99e98

File tree

5 files changed

+12
-20
lines changed

5 files changed

+12
-20
lines changed

ci.jsonnet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ local part_definitions = {
206206
JAVA_HOME: {
207207
name: "oraclejdk",
208208
# Update the openjdk8 version too below when updating this one
209-
version: "8u221-jvmci-19.3-b02",
209+
version: "8u231-jvmci-19.3-b04",
210210
platformspecific: true,
211211
},
212212
},
@@ -217,7 +217,7 @@ local part_definitions = {
217217
downloads+: {
218218
JAVA_HOME: {
219219
name: "openjdk",
220-
version: "8u222-jvmci-19.3-b02",
220+
version: "8u232-jvmci-19.3-b04",
221221
platformspecific: true,
222222
},
223223
},
@@ -227,7 +227,7 @@ local part_definitions = {
227227
downloads+: {
228228
JAVA_HOME: {
229229
name: "labsjdk",
230-
version: "ce-11.0.5+9-jvmci-19.3-b03",
230+
version: "ce-11.0.5+10-jvmci-19.3-b04",
231231
platformspecific: true,
232232
},
233233
},

lib/truffle/rbconfig-for-mkmf.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
warnflags << '-Werror' # Make sure there are no warnings in core C extensions
5959
else
6060
libtruffleruby = "#{cext_dir}/libtruffleruby.#{dlext}"
61+
62+
# GR-19453: workaround for finding libc++.so when using NFI on the library since the toolchain does not pass -rpath automatically
63+
rpath_libcxx = " -rpath #{File.expand_path("../../lib", RbConfig::CONFIG['CC'])}"
64+
ldflags << rpath_libcxx
65+
dldflags << rpath_libcxx
6166
end
6267

6368
# Link to libtruffleruby by absolute path

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "tools",
1010
"subdir": True,
1111
# version must always be equal to the version of the "sulong" import below
12-
"version": "49904bd467719eb7f4d4c33d0f5f0546ef90844e",
12+
"version": "ba52180a5c5d1b7e5a91267378383f64bc0ace89",
1313
"urls": [
1414
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1515
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -19,7 +19,7 @@
1919
"name": "sulong",
2020
"subdir": True,
2121
# version must always be equal to the version of the "tools" import above
22-
"version": "49904bd467719eb7f4d4c33d0f5f0546ef90844e",
22+
"version": "ba52180a5c5d1b7e5a91267378383f64bc0ace89",
2323
"urls": [
2424
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2525
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

tool/jt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ def checkout_enterprise_revision
18911891
# Find the commit importing that version of graal in graal-enterprise by looking at the suite file.
18921892
# The suite file is automatically updated on every graal PR merged.
18931893
graal_enterprise_commit = raw_sh(
1894-
'git', '-C', ee_path, 'log', 'origin/master', '--pretty=%H', '--grep=PullRequest:', '--reverse', '-m',
1894+
'git', '-C', ee_path, 'log', 'origin/release/graal-vm/19.3', '--pretty=%H', '--grep=PullRequest:', '--reverse', '-m',
18951895
'-S', merge_commit_in_graal, '--', suite_file, capture: true).lines.first.chomp
18961896
raw_sh('git', '-C', ee_path, 'checkout', graal_enterprise_commit)
18971897
end

tool/make-standalone-distribution.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,10 @@
99
set -e
1010
set -x
1111

12-
# Check platform
13-
case $(uname) in
14-
Linux) os=linux ;;
15-
Darwin) os=darwin ;;
16-
*) echo "unknown platform $(uname)" 1>&2; exit 1 ;;
17-
esac
18-
19-
# Check architecture
20-
case $(uname -m) in
21-
x86_64) arch=amd64 ;;
22-
*) echo "unknown architecture $(uname -m)" 1>&2; exit 1 ;;
23-
esac
24-
2512
# Build
2613
tool/jt.rb build --env native
2714

28-
release_home="$(cd ../graal/vm/mxbuild/$os-$arch/RUBY_STANDALONE_SVM*/* && pwd -P)"
15+
release_home=$(tool/jt.rb mx --env native standalone-home ruby)
2916

3017
# Test the post-install hook
3118
TRUFFLERUBY_RECOMPILE_OPENSSL=true "$release_home/lib/truffle/post_install_hook.sh"

0 commit comments

Comments
 (0)