All Projects → rmacoslib → r-macos-clang

rmacoslib / r-macos-clang

Licence: GPL-2.0 license
Setup script to create the binary installer for the released clang binaries used to compile R

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to r-macos-clang

abs
PKGBUILDs for the Arch User Repository
Stars: ✭ 38 (-33.33%)
Mutual labels:  pkgbuild
Yay
Yet another Yogurt - An AUR Helper written in Go
Stars: ✭ 7,100 (+12356.14%)
Mutual labels:  pkgbuild
lucjan-kernels
Dell Inspiron 15-3542 (3542-2538) with Fourth Gen Intel Core i3/i5/i7 optimized.
Stars: ✭ 16 (-71.93%)
Mutual labels:  pkgbuild
llvm-svn
Arch Linux PKGBUILD for LLVM, Clang et al. (latest SVN code)
Stars: ✭ 18 (-68.42%)
Mutual labels:  pkgbuild
GNU-bash-mac-installer
Downloads and builds a Mac package installer for GNU bash 5
Stars: ✭ 17 (-70.18%)
Mutual labels:  pkgbuild
DockBuilder
A LaunchAgent and .app to build a user's Dock upon login and/or on demand.
Stars: ✭ 39 (-31.58%)
Mutual labels:  pkgbuild
lfs-me
Linux From Scratch made ( more ) easy. A simple, fakeroot based, package manager for LFS heavily inspired by Archlinux' package management.
Stars: ✭ 67 (+17.54%)
Mutual labels:  pkgbuild
PKGBUILD
PKGBUILDs; almost all on the AUR
Stars: ✭ 16 (-71.93%)
Mutual labels:  pkgbuild
antbs
Automated package build and repository management web application.
Stars: ✭ 23 (-59.65%)
Mutual labels:  pkgbuild
raspi-dashboard
Arch Linux based fullscreen web display
Stars: ✭ 27 (-52.63%)
Mutual labels:  pkgbuild
arch-hs
Distribute hackage packages to archlinux
Stars: ✭ 18 (-68.42%)
Mutual labels:  pkgbuild
gitkraken
Arch User Repository Gitkraken
Stars: ✭ 113 (+98.25%)
Mutual labels:  pkgbuild
toolbox
Unified kit with all the scripts required for maintaining the repository 🧰
Stars: ✭ 60 (+5.26%)
Mutual labels:  pkgbuild
aurblobs
Automatically create binary repositories from AUR packages
Stars: ✭ 14 (-75.44%)
Mutual labels:  pkgbuild

This installer has been superceded by the r-macOS-rtools installer, which automatically installs and configures the R toolchain for compiled code on macOS, e.g. XCode Command Line Tools, clang4, and gfortran.

Installer Package for clang4 R Binaries License

The repository contains the scripts used to create a macOS installer package (.pkg) for the clang4 binaries. For those interested, the installer can be obtained on either the project's Release page or through http://go.illinois.edu/r-macos-clang-pkg.

The pre-built binaries this installer setups during the installation can be found at: http://r.research.att.com/libs/.

The scripts have the potential to be generalized further so that .pkg installers are available to be created for all binaries listed on http://r.research.att.com/libs/.

Financial support was provided to sign the installer by Professor Timothy Bates of the University of Edinburgh.

How do I use the installer?

Download it from http://go.illinois.edu/r-macos-clang-pkg, open the installer by right clicking to bring up menu and selecting "Open". From here, navigate through it like a normal macOS installer.

If you have yet to install Xcode Command Line Interface Tools ("Xcode CLI"), you will then need to open Terminal (Applications/Utilities/Terminal) and type:

xcode-select --install

That's it. Once installed, you can start using compiled code in R like normal with the added benefit of OpenMP.

If you want to see behind the curtain, continue reading...

What does the installer do?

The clang4-r installer performs two actions that require the users password to accomplish. These actions are:

  1. unpack a set of pre-made binary files into the /usr/local/clang4 directory
  2. establish the proper paths for CC, CXX, CXX**, and LDFLAGS in the ~/.R/Makevars file

In essence, it provides a graphical user interface installation guide, more secure path manipulation, and a smarter handling of a pre-existing ~/.R/Makevars when compared to the following pure bash approach:

# Download binary
curl -O http://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz
# Extract binary onto root directory
tar fvxz clang-4.0.0-darwin15.6-Release.tar.gz -C /

# Overwrites ~/.R/Makevars file if present otherwise creates it
cat <<- EOF > ~/.R/Makevars
# The following statements are required to use the clang4 binary
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/clang4/bin/clang++
CXX1X=/usr/local/clang4/bin/clang++
CXX98=/usr/local/clang4/bin/clang++
CXX11=/usr/local/clang4/bin/clang++
CXX14=/usr/local/clang4/bin/clang++
CXX17=/usr/local/clang4/bin/clang++
LDFLAGS=-L/usr/local/clang4/lib
# End clang4 inclusion statements
EOF

# Install Xcode CLI tools
xcode-select --install

Verify the Installer

Thanks to the financial support provided by Professor Timothy Bates of the University of Edinburgh to join the Apple Developer program. The installer is now signed using developer credentials.

As a result, the installer should have a "lock" icon in the upper right corner:

Signed Installer Lock Icon

Clicking the lock icon will reveal the signed developer certificate:

Signed Developer Certificate

With this being said, the code used to generate the installer has been made publically available under an open source license (GPL >= 2).

Overview of Files

Below is an abridged version of the actions of each file provided.

  • download_files.sh
    • Downloads the clang-4.0.0-darwin15.6-Release.tar.gz from http://r.research.att.com/libs/ and extracts it into a temporary ROOT/ directory established in the working directory
  • scripts/postinstall
    • Create or modify the ~/.R/Makevars file with the necessary implicit variables to compile with clang4.
    • This is run at the end of the installer routine.
  • make_installer.sh
    • Create the installer package R binary installer .pkg
      • Builds the package from the extracted tar using pkgbuild
      • Analyzing the package using productbuild to create a distribution.xml
      • Inserts customizations into the distribution.xml (title, background, ...)
      • Calls productbuild to rebuild the package.
  • distribution.xml
    • Customization options (e.g. title, background) of installer built by analyzing a temporary .pkg
  • build_files/Rlogo.png
    • R logo
  • build_files/LICENSE.rtf
    • License of the LLVM installer
  • build_files/WELCOME_DISPLAY.rtf
    • Text displayed on welcome screen

License

GPL (>= 2)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].