Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
7e76306a
Commit
7e76306a
authored
8 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
rpath rceommended packages on Darwin
parent
6c2ef442
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
com.oracle.truffle.r.native.recommended/Makefile
+19
-1
19 additions, 1 deletion
com.oracle.truffle.r.native.recommended/Makefile
mx.fastr/mx_copylib.py
+24
-9
24 additions, 9 deletions
mx.fastr/mx_copylib.py
with
43 additions
and
10 deletions
com.oracle.truffle.r.native.recommended/Makefile
+
19
−
1
View file @
7e76306a
...
...
@@ -27,9 +27,19 @@
# N.B. As this takes quite a while the building is conditional on the
# FASTR_RELEASE environment variable
FASTR_R_HOME
:=
$(
abspath
$(
CURDIR
)
/..
)
NATIVE_PROJECT_DIR
:=
$(
FASTR_R_HOME
)
/com.oracle.truffle.r.native
ifneq
(,$(wildcard $(NATIVE_PROJECT_DIR)/platform.mk))
include
$(NATIVE_PROJECT_DIR)/platform.mk
else
ifneq
($(MAKECMDGOALS),clean)
$(
error
no platform.mk available
)
endif
endif
.PHONY
:
all clean
FASTR_R_HOME
:=
$(
abspath
$(
CURDIR
)
/..
)
NATIVE_PROJECT
:=
$(
subst native.recommended,native,
$(
CURDIR
))
R_VERSION
:=
$(
notdir
$(
wildcard
$(
NATIVE_PROJECT
)
/gnur/R-
*
))
GNUR_HOME
:=
$(
NATIVE_PROJECT
)
/gnur/
$(
R_VERSION
)
...
...
@@ -45,6 +55,14 @@ install.recommended: $(GNUR_RECOMMENDED_TARS)
for
pkgtar
in
$(
GNUR_RECOMMENDED_TARS
);
do
\
$(
FASTR_R_HOME
)
/bin/R CMD INSTALL
--library
=
$(
FASTR_R_HOME
)
/library
$$
pkgtar
;
\
done
ifeq
($(OS_NAME),Darwin)
for
pkgname
in
$(
GNUR_RECOMMENDED_PKGNAMES
);
do
\
if
[
-e
$(
FASTR_R_HOME
)
/library/
$$
pkgname/libs/
$$
pkgname.so
]
;
then
\
install_name_tool
-id
@rpath/../library/
$$
pkgname/libs/
$$
pkgname.so
$(
FASTR_R_HOME
)
/library/
$$
pkgname/libs/
$$
pkgname.so
;
\
mx rupdatelib
$(
FASTR_R_HOME
)
/library/
$$
pkgname/libs
;
\
fi
\
done
endif
touch
install.recommended
else
install.recommended
:
...
...
This diff is collapsed.
Click to expand it.
mx.fastr/mx_copylib.py
+
24
−
9
View file @
7e76306a
...
...
@@ -25,6 +25,7 @@ import platform
import
subprocess
import
shutil
import
mx
import
mx_fastr
def
_darwin_extract_realpath
(
lib
,
libpath
):
'''
...
...
@@ -126,31 +127,45 @@ def copylib(args):
def
updatelib
(
args
):
'''
I
f we captured a library then
, on Darwin,
we patch up the references
in the target libra
ry passed as argument
to use @rpath
.
On Darwin, i
f we captured a library
,
then we patch up the references
to it to use @rpath, for all the libs in the directo
ry passed as argument .
args:
0 directory containing lib
rary
0 directory containing lib
s to patch (and may also contain the patchees)
'''
# These are not captured
ignore_list
=
[
'
R
'
,
'
Rblas
'
,
'
Rlapack
'
,
'
jniboot
'
]
def
ignorelib
(
name
):
fastr_libdir
=
os
.
path
.
join
(
mx_fastr
.
_fastr_suite
.
dir
,
'
lib
'
)
def
locally_built
(
name
):
for
ignore
in
ignore_list
:
x
=
'
lib
'
+
ignore
+
'
.dylib
'
if
x
==
name
:
return
True
return
False
def
get_captured_libs
():
cap_libs
=
[]
for
lib
in
os
.
listdir
(
fastr_libdir
):
if
not
'
.dylib
'
in
lib
:
# ignore non-libraries
continue
if
locally_built
(
lib
)
or
os
.
path
.
islink
(
os
.
path
.
join
(
fastr_libdir
,
lib
)):
continue
cap_libs
.
append
(
lib
)
return
cap_libs
libdir
=
args
[
0
]
cap_libs
=
[]
cap_libs
=
get_captured_libs
()
libs
=
[]
for
lib
in
os
.
listdir
(
libdir
):
if
not
'
.dylib
'
in
lib
:
if
not
(
'
.dylib
'
in
lib
or
'
.so
'
in
lib
):
# ignore non-libraries
continue
if
not
os
.
path
.
islink
(
os
.
path
.
join
(
libdir
,
lib
)):
libs
.
append
(
lib
)
if
ignorelib
(
lib
)
or
os
.
path
.
islink
(
os
.
path
.
join
(
libdir
,
lib
)):
continue
cap_libs
.
append
(
lib
)
# for each of the libs, check whether they depend
# on any of the captured libs, @rpath the dependency if so
for
lib
in
libs
:
...
...
This diff is collapsed.
Click to expand it.
Julien Lopez
@jlopez
Mentioned in commit
57e9067c
·
8 years ago
Mentioned in commit
57e9067c
Mentioned in commit 57e9067cbdf10e538e65ac6be6d0200a7fcaab42
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment