Giter Site home page Giter Site logo

recipes's Introduction

Recipes

This is a system for building static, dependent libraries for R packages. It is mainly intended to automate the maintenance of CRAN dependencies for the macOS build system, but the system is intended to be usable on other platforms as well. Resulting binaries are available at https://mac.R-project.org/bin/.

The idea is for package authors to submit pull requests for dependencies their packages require such that they can be automatically installed on the build VMs.

The dependency descriptions are simple DCF files. The format should be self-explanatory, it follows the same conventions as DESCRIPTION files in R packages. The required fields are Package, Version and Source.URL. Most common optional fields include Depends and Configure.

There is an R script that will process the recipes and create a make file which can be used to build libraries and their dependencies. In case you do not have R yet, there is also a Perl script as well, so you need either of Perl or R.

More recently, we have added a user-friendly command line tool simply called build.sh (requires bash) which replicates the build as performed on the CRAN machines. For example, to build all libraries needed to build R use:

./build.sh r-base-dev

You can replace r-base-dev with any recipe or use all to build all recipes. See ./build.sh -h for a little help page. Each library is built, packaged and installed. The default locations used by the above script are /opt/R/$arch and /usr/local. The former will be used if present where $arch is typically x86_64 or arm64, otherwise /usr/local is the fall-back.

For a more fine-grained control you can run scripts/mkmk.R or scripts/mkmk.pl yourself and see the list of environment variables at the bottom of this page for possible configurations.

Reference

  • Package: name of the package (required)

  • Version: version of the package (required*). This version string can be substituted in other directives using ${ver}.

  • Source.URL: URL of the source tar ball (required*)

  • Depends: comma separated list of dependent recipes, i.e. recipes that must be successfully installed before this one. Optional version specification of the form rcp (>= min.ver) is allowed for individual dependencies.

Most of the following entries are optional:

  • Configure[.<os>[.<ver>]][.<arch>]: flags to add to the configure script. <os> is the lowecase name of the OS as returned by uname, <ver> is the major version of the OS (uname -r up to the first dot) and <arch> is the architecture of the platform. Multiple types can be specified and they are concatenated using precedence os, ver, arch.

  • Configure.subdir: subdirectory containing the sources

  • Special: special recipe flags, currently only in-sources is supported which forces the build to be performed inside the sources.

  • Distribution.files: list of files (or directories) to include in the final distribution tar ball. Defaults to ${prefix}. This directive is intended only for restricting the content, installation is only supported for content under ${prefix} so no files outside that tree can be part of the final distribution.

  • Configure.script: name of the configure script to use, defaults to configure. If this option is set explicitly, then the default flags --with-pic --disable-shared --enable-static and --prefix=/${prefix} are no longer used under the assumption that the script is no longer autoconf-based and thus the equivalent flags should be supplied in Configure: or friends.

  • Configure.driver: optional, if set, specifies the executable that will be called in order to process the configure script. If not specified it is assumed that the configure script is executable on its own.

  • Configure.chmod: optional, if set, chmod is called on the configure script with the specified value prior to execution. Most commonly this is set to +x if the soruces fail to make the script executable.

  • Install: command to perform installation, defaults to make install and currently will be supplied with DESTDIR=... which is expected to be honored.

  • Build-system: optional, if specified a driver named configure.<build-system> is expected to exist in the scripts directory of this project which is copied to the sources of the library as configure and should perform whatever operations are necessary to make the project autoconf-compatible. Currently we only provide drivers cmake which supports CMake and meson-ninja which supports meson for configuration and ninja for builds. The latter must be installed, typically using pip install meson ninja (add --user if you cannot install in the system location). Obviously, such systems are far more fragile so use only as a last resort.

(*) - virtual packages are packages that are only used to trigger installation of other packages, they only create a target in the Makefile, but don't create any output themselves. Those don't have Version: nor Source.URL:.

Building

Currently the build steps are

  • download source tar ball
  • unpack the tar ball
  • move the contents to a directory with fixed naming scheme
  • if a <recipe>.patch file exists, it will be applied with -p1
  • create a build object directory
  • configure in the object directory using all the accumulated flags from the recipe
  • run make -j12
  • run make install with DESTDIR set
  • change the ownership of content inside DESTDIR to 0:0 (unless tar supports --uid/--gid flags)
  • package ${prefix} inside the destination into a tar ball
  • unpack the tar ball in the system location

Each dependency has to succeed in all the steps above before the next recipe is used. Makefile is used to determine the dependencies between the recipes.

Note: pkgconfig system stubs are expected to exist for system libraries such that they can be used as dependencies by pkgconfig. Some versions of macOS include them, but others may require manual installation. Most recent macOS versions don't allow stubs in system location since it is read-only, so adding an alternative path to PKG_CONFIG_PATH may be required. The build.sh script automatically adds the system stubs shipped with the recipes to PKG_CONFIG_PATH.

Environment Variables

The mkmk.R script will respect the following environment variables:

  • TAR path to the tar program. Note that the build system assumes a tar version that is smart enough to handle all common compression formats (gzip, bzip2, xz) automatically.

  • PREFIX defaults to usr/local and is the prefix for all builds. Note that no special effort is made for packages to respect that prefix at compile/link time, it is only passed to --prefix and used to package the final tar ball. The recipes can use ${prefix} (exact match) to substitute for the relative prefix path (i.e., without the leading /). This is not done at the shell level, but rather a substitution when generating the Makefile. The PREFIX variable is available both at shell level and to the make commands by default.

  • NOSUDO if set to 1 sudo will not be used in the unpacking step. This is mainly useful for user-space installations when setting PREFIX to a location owned by the user.

  • BINARY (experimental) if set to 1 then the script creates a Makefile which downloads binaries from BINARY_URL instead of building them. On macOS if BINARY_URL is not set, the binaries are downloaded from https://mac.r-project.org This is now deprecated in favor of the tools at https://mac.r-project.org/bin/ which are better at dependency resolution as recipes may not always match the repository.

recipes's People

Contributors

coatless avatar jeffreyhanson avatar jeroen avatar s-u avatar shrektan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recipes's Issues

Poppler missing font data

I see you added poppler recently, but in order to use this library, packages also need to ship a copy of the poppler font data. See: https://poppler.freedesktop.org/

So if you want to force packages to use the local recipes build of poppler, you also have to supply a copy of this data and then insert that into the R binary package, similar to e.g. gdal and proj data.

Freetype recipe conflicts with freetype from the xQuartz on the same server

The systemfonts package has a linking error about a missing symbol from harfbuzz, however this package doesn't actually link to harfbuzz: https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/systemfonts-00install.html

The systemfonts package does everything correct: it calls pkg-config --libs --static freetype to get the linker flags on your server to link to freetype.

The problem is that you have two freetypes on your server, each with their own .pc file: one is provided by xquartz in /opt/X11/ and that one gets picked up by pkg-config. This one does not depend on harfbuzz. Then you have another freetype recipe which you (probably unintentionally) have built against harfbuzz. You can confirm this from its .pc file.

Because you hardcode -L/usr/local/lib when building the R package, it ends up linking to the recipe freetype, even though pkg-config has given us the flags needed to link to the xQuartz freetype.

Possible solutions 1

Prepend /usr/local/lib/pkgconfig to your PKG_CONFIG_PATH . This way pkg-config will find the .pc files from your recipes first, before falling back to the xquartz ones.

Possible solutions 2

Rebuild your freetype recipe --without-harfbuzz to match the xquartz linker flags.

PR proposal: continuous integration tests

Hi,

Thank you very much for developing this project. I was wondering if I could please submit a PR to add continuous integration tests to this repository? Since I do not have access to a macOS computer, adding continuous integration tests would be really helpful for me to ensure that I do not waste your time by accidently submitting a broken PR when attempting to add a new dependency.

I noticed that the https://github.com/R-macos/recipes/tree/feature/actions branch has made some progress towards implementing these tests. May I ask what tasks remain to be completed before this branch can be merged? I would be happy to start addressing these remaining tasks if that's ok with you?

I am sorry if this information is already documented somewhere on the repository, or if I am wasting your time because it has previously been determined that such tests cannot be implemented.

Error with freetype

Hello!

I am the following commands:
git clone https://github.com/R-macos/recipes.git
cd recipes
./build.sh r-base-dev

After running for several minutes, this was the output ( and error):
mkdir -p src/freetype-2.13.0 && (cd src/freetype-2.13.0 && '/usr/bin/tar' fxj ../freetype-2.13.0.tar.xz && mv / . )
tar: Error opening archive: Unrecognized archive format
make: *** [src/freetype-2.13.0] Error 1

I am using Ventura 13.3.1 (Apple M1 Max).

Any help would be greatly appreciated!

Thank you! Josephine

error when installing fribidi, seems to be issue with glib

hi,

i'm getting the following error when using bash build.sh fribidi under macos 11 (with github actions).

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified ‘bytes’ at file scope
  char bytes[kAuthorizationExternalFormLength];
       ^~~~~
  CC       gspawn.lo
...
make: *** [pkgconfig-0.29.2-dst] Error 2
Error: Process completed with exit code 2.

more details here

is there a way i could fix this?

this is the job i'm running:

jobs:
  build:
    runs-on: macos-11

    steps:
    - name: Checkout Code
      uses: actions/checkout@v3

    - name: Set up R
      uses: r-lib/actions/setup-r@v2
      with:
        r-version: '4.1.3'

    - name: Check R version
      run: R.version
      shell: Rscript {0}

    - name: Install R deps
      run: |
        git clone https://github.com/R-macos/recipes
        cd recipes
        sudo bash build.sh fribidi

my intention is to have a repo that i can use to build macOS binary packages more-or-less equivalent to those created by CRAN. this was prompted by the shuttering of MRAN snapshots, and i still need to be able to get access to historical R macOS binaries (that neither CRAN, nor rstudio package manager retain). (if someone knows of another project doing this, i'd be keen to hear about it!)

with thanks

fontconfig recipe fails to build

When using the install script as indicated in the sibject header, I get the following errors at the end:

make[3]: *** No rule to make target `fcatomic.sgml', needed by `all'. Stop. make[2]: *** [all-recursive] Error 1 make[1]: *** [all] Error 2 make: *** [fontconfig-2.13.93-dst] Error 2

I'm using macOS 10.15.7 (19H524) on a MacBook Pro (16-inch, 2019). Please advise. Thnx.

r-base-dev build error

Cloned repo and ran ./build.sh r-base-dev

OS: macOS Sonoma 14.4.1
M1 MAX

See output below:

Building for Darwin (arm64):
install prefix: /usr/local
touch: /usr/local/bin/.1: Permission denied
sudo required for installation
rm -rf pkgconfig-0.29.2-obj pkgconfig-0.29.2-dst && mkdir pkgconfig-0.29.2-obj && cd pkgconfig-0.29.2-obj && PREFIX=opt/R/arm64  ../src/pkgconfig-0.29.2/configure --prefix=/opt/R/arm64 --with-pic --disable-shared --enable-static --with-internal-glib --enable-indirect-deps=yes && PREFIX=opt/R/arm64 make MAKELEVEL=0 -j12 && PREFIX=opt/R/arm64 make install DESTDIR=/Users/marck/r-for-macos/recipes/build/pkgconfig-0.29.2-dst
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../src/pkgconfig-0.29.2/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... arm-apple-darwin23.4.0
checking host system type... arm-apple-darwin23.4.0
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert arm-apple-darwin23.4.0 file names to arm-apple-darwin23.4.0 format... func_convert_file_noop
checking how to convert arm-apple-darwin23.4.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... ld: warning: -single_module is obsolete
no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin23.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for ln... ln
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking for unistd.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking for bash... /bin/bash
checking for default search path for .pc files... ${libdir}/pkgconfig:${datadir}/pkgconfig
checking for system include path to avoid -I flags... /usr/include
checking for system library path to avoid -L flags... /usr/lib:/lib
configure: creating ./config.lt
config.lt: creating libtool
checking whether to list both direct and indirect dependencies... yes
checking for Win32... no
checking if prefix should be redefined at runtime... no
checking if internal glib should be used... yes
checking if host- prefixed tool should be installed... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pkg.m4
config.status: creating check/Makefile
config.status: creating check/config.sh
config.status: creating config.h.win32
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in glib (/Users/marck/r-for-macos/recipes/build/pkgconfig-0.29.2-obj/glib)
configure: running /bin/sh ../../src/pkgconfig-0.29.2/glib/configure --disable-option-checking '--prefix=/opt/R/arm64'  '--with-pic' '--disable-shared' '--enable-static' '--with-internal-glib' '--enable-indirect-deps=yes' 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/Users/marck/r-for-macos/recipes/stubs/pkgconfig-darwin:/usr/lib/pkgconfig' --cache-file=/dev/null --srcdir=../../src/pkgconfig-0.29.2/glib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../../src/pkgconfig-0.29.2/glib/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... arm-apple-darwin23.4.0
checking host system type... arm-apple-darwin23.4.0
checking for the BeOS... no
checking for Win32... no
checking for the Android... no
checking for Mac OS X Carbon support... yes
checking for Mac OS X Cocoa support... yes
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gawk... (cached) awk
checking for perl5... no
checking for perl... perl
checking for indent... indent
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.5... python
checking for python... /Users/marck/miniforge3/bin/python
checking for python version... 3.1
checking for python platform... darwin
checking for python script directory... ${prefix}/lib/python3.12/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.12/site-packages
checking for iconv_open... no
checking for libiconv_open in -liconv... no
checking for iconv_open in -liconv... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert arm-apple-darwin23.4.0 file names to arm-apple-darwin23.4.0 format... func_convert_file_noop
checking how to convert arm-apple-darwin23.4.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... ld: warning: -single_module is obsolete
no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin23.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the c++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fno-common -DPIC
checking if c++ PIC flag -fno-common -DPIC works... yes
checking if c++ static flag -static works... no
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin23.4.0 dyld
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking for extra flags to get ANSI library prototypes... none needed
checking for extra flags for POSIX compliance... none needed
checking for vprintf... yes
checking for _doprnt... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for mmap... yes
checking for posix_memalign... yes
checking for memalign... no
checking for valloc... yes
checking for fsync... yes
checking for pipe2... no
checking for issetugid... yes
checking for atexit... yes
checking for on_exit... no
checking for timegm... yes
checking for gmtime_r... yes
checking for __libc_enable_secure... no
checking size of char... 1
checking size of short... 2
checking size of long... 8
checking size of int... 4
checking size of void *... 8
checking size of long long... 8
checking size of __int64... 0
checking for sig_atomic_t... yes
checking for format to printf and scanf a guint64... none
checking for an ANSI C-conforming const... yes
checking for growing stack pointer... yes
checking for __inline... yes
checking for __inline__... yes
checking for inline... yes
checking if inline functions in headers work... yes
checking for working do while(0) macros... no
checking for ISO C99 varargs macros in C... yes
checking for ISO C99 varargs macros in C++... yes
checking for GNUC varargs macros... yes
checking for GNUC visibility attribute... no
checking whether using Sun Studio C compiler... no
checking whether byte ordering is bigendian... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking sys/vfs.h usability... no
checking sys/vfs.h presence... no
checking for sys/vfs.h... no
checking sys/vmount.h usability... no
checking sys/vmount.h presence... no
checking for sys/vmount.h... no
checking sys/statfs.h usability... no
checking sys/statfs.h presence... no
checking for sys/statfs.h... no
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/filio.h usability... yes
checking sys/filio.h presence... yes
checking for sys/filio.h... yes
checking mntent.h usability... no
checking mntent.h presence... no
checking for mntent.h... no
checking sys/mnttab.h usability... no
checking sys/mnttab.h presence... no
checking for sys/mnttab.h... no
checking sys/vfstab.h usability... no
checking sys/vfstab.h presence... no
checking for sys/vfstab.h... no
checking sys/mntctl.h usability... no
checking sys/mntctl.h presence... no
checking for sys/mntctl.h... no
checking fstab.h usability... yes
checking fstab.h presence... yes
checking for fstab.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking linux/magic.h usability... no
checking linux/magic.h presence... no
checking for linux/magic.h... no
checking sys/prctl.h usability... no
checking sys/prctl.h presence... no
checking for sys/prctl.h... no
checking for sys/mount.h... yes
checking for sys/sysctl.h... yes
checking for sysctlbyname... yes
checking xlocale.h usability... yes
checking xlocale.h presence... yes
checking for xlocale.h... yes
checking for struct stat.st_mtimensec... no
checking for struct stat.st_mtim.tv_nsec... no
checking for struct stat.st_atimensec... no
checking for struct stat.st_atim.tv_nsec... no
checking for struct stat.st_ctimensec... no
checking for struct stat.st_ctim.tv_nsec... no
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct statfs.f_fstypename... yes
checking for struct statfs.f_bavail... yes
checking for struct statvfs.f_basetype... no
checking for struct statvfs.f_fstypename... no
checking for struct tm.tm_gmtoff... yes
checking for struct tm.__tm_gmtoff... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for struct dirent.d_type... yes
checking for nl_langinfo and CODESET... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for setlocale... yes
checking whether we are using the GNU C Library 2.1 or newer... no
checking size of size_t... 8
checking for the appropriate definition for size_t... unsigned long
checking size of ssize_t... 8
checking for the appropriate definition for ssize_t... long
checking for lstat... yes
checking for strerror... yes
checking for strsignal... yes
checking for memmove... yes
checking for vsnprintf... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for poll... yes
checking for getcwd... yes
checking for vasprintf... yes
checking for setenv... yes
checking for unsetenv... yes
checking for getc_unlocked... yes
checking for readlink... yes
checking for symlink... yes
checking for fdwalk... no
checking for memmem... yes
checking for chown... yes
checking for lchmod... yes
checking for lchown... yes
checking for fchmod... yes
checking for fchown... yes
checking for link... yes
checking for utimes... yes
checking for getgrgid... yes
checking for getpwuid... yes
checking for getresuid... no
checking for getmntent_r... no
checking for setmntent... no
checking for endmntent... no
checking for hasmntopt... no
checking for getfsstat... yes
checking for getvfsstat... no
checking for fallocate... no
checking for splice... no
checking for prlimit... no
checking for statvfs... yes
checking for statfs... yes
checking whether to use statfs or statvfs... statfs
checking crt_externs.h usability... yes
checking crt_externs.h presence... yes
checking for crt_externs.h... yes
checking for _NSGetEnviron... yes
checking for newlocale... yes
checking for uselocale... yes
checking for strtod_l... yes
checking for strtoll_l... yes
checking for strtoull_l... yes
checking for C99 vsnprintf... no
checking whether printf supports positional parameters... no
checking value of AF_INET... 2
checking value of AF_INET6... 30
checking value of AF_UNIX... 1
checking value of MSG_PEEK... 2
checking value of MSG_OOB... 1
checking value of MSG_DONTROUTE... 4
checking for getprotobyname_r... no
checking for endservent... yes
checking for if_nametoindex... yes
checking for if_indextoname... yes
checking if arpa/nameser_compat.h is needed... yes
checking for res_query... in -lresolv
checking for socket... yes
checking for res_init... yes
checking for linux/netlink.h... no
checking for struct ip_mreqn... yes
checking number of arguments to statfs()... 2
checking for signed... yes
checking for long long... yes
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for size_t... (cached) yes
checking for ptrdiff_t... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for snprintf... yes
checking for wcslen... yes
checking for C99 snprintf... no
checking for fd_set... yes, found in sys/types.h
checking for nl_langinfo (CODESET)... yes
checking for nl_langinfo (PM_STR)... yes
checking for nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)... no
checking for a compliant posix_memalign() implementation... yes
checking for OpenBSD strlcpy/strlcat... yes
checking for an implementation of va_copy()... yes
checking for an implementation of __va_copy()... yes
checking whether va_lists can be copied by value... yes
checking for dlopen... yes
checking for dlsym... yes
checking for RTLD_GLOBAL brokenness... no
checking for preceeding underscore in symbols... no
checking for dlerror... yes
checking for the suffix of module shared libraries... .so
checking for gspawn implementation... gspawn.lo
checking for GIOChannel implementation... giounix.lo
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
checking sys/event.h usability... yes
checking sys/event.h presence... yes
checking for sys/event.h... yes
checking for kqueue... yes
checking for kevent... yes
checking for platform-dependent source...
checking whether to compile timeloop... yes
checking if building for some Win32 platform... no
checking for thread implementation... posix
checking thread related cflags... -D_REENTRANT
checking for pthread_create/pthread_join... yes
checking thread related libraries...
checking for localtime_r... yes
checking for gmtime_r... (cached) yes
checking for posix getpwuid_r... yes
checking for posix getgrgid_r... yes
checking for pthread_attr_setstacksize... yes
checking for pthread_condattr_setclock... no
checking for pthread_cond_timedwait_monotonic... no
checking for pthread_cond_timedwait_monotonic_np... no
checking for clock_gettime... yes
checking for lock-free atomic intrinsics... yes
checking for futex(2) system call... no
checking for eventfd(2) system call... no
checking value of POLLIN... 1
checking value of POLLOUT... 4
checking value of POLLPRI... 2
checking value of POLLERR... 8
checking value of POLLHUP... 16
checking value of POLLNVAL... 32
checking for broken poll... yes
checking for EILSEQ... yes
checking for guint32... yes
checking alignment of guint32... 4
checking for guint64... yes
checking alignment of guint64... 8
checking for unsigned long... yes
checking alignment of unsigned long... 8
checking for -Bsymbolic-functions linker flag... no
checking for -fvisibility=hidden compiler flag... no
checking if gcc supports flag -Wall in envvar CFLAGS... yes
checking if gcc supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Werror=declaration-after-statement in envvar CFLAGS... yes
checking if gcc supports flag -Werror=missing-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Werror=implicit-function-declaration in envvar CFLAGS... yes
checking if gcc supports flag -Werror=pointer-arith in envvar CFLAGS... yes
checking if gcc supports flag -Werror=init-self in envvar CFLAGS... yes
checking if gcc supports flag -Werror=format-security in envvar CFLAGS... yes
checking if gcc supports flag -Werror=format=2 in envvar CFLAGS... yes
checking if gcc supports flag -Werror=missing-include-dirs in envvar CFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating glib/Makefile
config.status: creating glib/libcharset/Makefile
config.status: creating glib/gnulib/Makefile
config.status: creating m4macros/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing glib/glibconfig.h commands
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in glib
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in .
make: Nothing to be done for `all-am'.
Making all in m4macros
/Library/Developer/CommandLineTools/usr/bin/make  all-am
make: Nothing to be done for `all-am'.
Making all in glib
  GEN      glibconfig-stamp
config.status: executing glib/glibconfig.h commands
config.status: glib/glibconfig.h is unchanged
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in libcharset
/Library/Developer/CommandLineTools/usr/bin/make  all-am
  CC       libcharset_la-localcharset.lo
  GEN      ref-add.sed
  GEN      charset.alias
  GEN      ref-del.sed
  CCLD     libcharset.la
Making all in gnulib
/Library/Developer/CommandLineTools/usr/bin/make  all-am
  CC       libgnulib_la-asnprintf.lo
  CC       libgnulib_la-printf-args.lo
  CC       libgnulib_la-vasnprintf.lo
  CC       libgnulib_la-printf.lo
  CC       libgnulib_la-printf-parse.lo
  CCLD     libgnulib.la
Making all in .
  CC       libglib_2_0_la-gallocator.lo
  CC       libglib_2_0_la-gcache.lo
  CC       libglib_2_0_la-grel.lo
  CC       libglib_2_0_la-garray.lo
  CC       libglib_2_0_la-gbitlock.lo
  CC       libglib_2_0_la-gbase64.lo
  CC       libglib_2_0_la-gcompletion.lo
  CC       libglib_2_0_la-gthread-deprecated.lo
  CC       libglib_2_0_la-gbacktrace.lo
  CC       libglib_2_0_la-gbookmarkfile.lo
  CC       libglib_2_0_la-gasyncqueue.lo
  CC       libglib_2_0_la-gatomic.lo
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.c:392:10: error: incompatible integer to pointer conversion passing 'gssize' (aka 'long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
  return g_atomic_pointer_add ((volatile gpointer *) atomic, val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.h:170:46: note: expanded from macro 'g_atomic_pointer_add'
    (gssize) __sync_fetch_and_add ((atomic), (val));                         \
                                             ^~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.c:416:10: error: incompatible integer to pointer conversion passing 'gsize' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
  return g_atomic_pointer_and ((volatile gpointer *) atomic, val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.h:177:45: note: expanded from macro 'g_atomic_pointer_and'
    (gsize) __sync_fetch_and_and ((atomic), (val));                          \
                                            ^~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.c:440:10: error: incompatible integer to pointer conversion passing 'gsize' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
  return g_atomic_pointer_or ((volatile gpointer *) atomic, val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.h:184:44: note: expanded from macro 'g_atomic_pointer_or'
    (gsize) __sync_fetch_and_or ((atomic), (val));                           \
                                           ^~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.c:464:10: error: incompatible integer to pointer conversion passing 'gsize' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
  return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/pkgconfig-0.29.2/glib/glib/gatomic.h:191:45: note: expanded from macro 'g_atomic_pointer_xor'
    (gsize) __sync_fetch_and_xor ((atomic), (val));                          \
                                            ^~~~~
4 errors generated.
make: *** [libglib_2_0_la-gatomic.lo] Error 1
make: *** Waiting for unfinished jobs....
make: *** [all-recursive] Error 1
make: *** [all] Error 2
make: *** [all-recursive] Error 1
make: *** [all] Error 2
make: *** [all-recursive] Error 1
make: *** [all] Error 2
make: *** [pkgconfig-0.29.2-dst] Error 2

Boost with linking

I have two different packages [1] that would benefit greatly from having Boost libraries present.

This should be doable as CRAN / macOS use such a well-presecribed setup so

  • how do we create the recipe?
  • how do we tell packages to use this?

I do not have access to macOS or any familiarity with it so I can't drive this. Who can?

[1] One upstream discussion of brew vs macports is here

gmp crashes on old hardware

> ### ** Examples
> 
>  S <- gmp::Stirling2(50,10)

 *** caught illegal operation ***
address 0x10ceadf6d, cause 'illegal opcode'

Traceback:
 1: as.bigz(0)
 2: S2(n1, k - 1)
 3: S2(n1, k - 1)
 4: S2(n1, k - 1)
 5: S2(n1, k - 1)
 6: S2(n1, k - 1)
 7: S2(n1, k - 1)
 8: S2(n1, k - 1)
 9: S2(n1, k - 1)
10: S2(n1, k - 1)
11: S2(n1, k - 1)
12: S2(n, k)
13: gmp::Stirling2(50, 10)
An irrecoverable exception occurred. R is aborting now ...

You need to pass a --build parameter to build for portable hardware instead of enabling optimizations for the current hardware, similar to homebrew here: https://github.com/Homebrew/homebrew-core/blob/565effc4ea7c0a2ead0d51c29fb5a86d45e5e8c6/Formula/gmp.rb#L48-L49

MS-SQL incompatibility with system ODBC

Hi @s-u
This is a follow up to both #41 and #46

When you closed the pull request you asked for the issue to be reproduced with the CRAN [R] build. Please see below:

library(odbc)
conn <- DBI::dbConnect(odbc::odbc(), dsn="mssql_oem_db", uid="<snip>", pwd="<snip>", Encrypt="No")
DBI::dbExecute(conn, "DROP TABLE ##og_temp")
[1] 0
DBI::dbExecute(conn, "CREATE TABLE ##og_temp ( id INT, name NVARCHAR(200) )")
[1] 0
> DBI::dbExecute(conn, "INSERT INTO ##og_temp (id, name) VALUES (1, 'abcdefghi')")
[1] 1
> DBI::dbGetQuery(conn, "SELECT * FROM ##og_temp")
  id name
1  1 aceg
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.0

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] odbc_1.3.5

loaded via a namespace (and not attached):
 [1] bit_4.0.5       compiler_4.3.2  cli_3.6.1       hms_1.1.3
 [5] DBI_1.1.3       Rcpp_1.0.11     bit64_4.0.5     vctrs_0.6.4
 [9] blob_1.2.4      lifecycle_1.0.4 pkgconfig_2.0.3 rlang_1.1.2

Expectation is that the result from the retrieved query is abcdefghi.

I am trying not to get into debugging issues specific to package:odbc - happy to pursue those elsewhere. If you can confirm that the SQL odbc headers provided by unixODBC are not being clobbered over by iODBC on the build server, I will stop bugging you.

Thanks

SQL headers clobbering

Hi Simon:

I was looking into some deprecation warnings that are thrown by the ODBC API: I could be wrong about this but I think the generic ODBC API headers, for example, ../include/sql.h (and friends) are overwritten when both the sys-iodbc and unixodbc recipes are installed.

I noticed this because I think the deprecation warnings are in one set of headers (iodbc) but not in the other. Any ideas on how to resolve this?

You are not asking, but I would be happy if the unixodbc headers clobbered over the sys-iodbc rather than what looks like is the other way around. :)

Thanks again - and apologies if my intuition is way off as to why those deprecation warnings are thrown.

openssl

Hi,

Executing sudo ./build.sh r-base-dev is returning an error compiling openssl:

../src/openssl-1.1.1l/crypto/rand/rand_unix.c:385:9: error: implicit declaration of function 'CCRandomGenerateBytes' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
        ^
1 error generated.
make[2]: *** [crypto/rand/rand_unix.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all] Error 2
make: *** [openssl-1.1.1l-dst] Error 2

I'm on macOS 12.0.1, amd64 architecture, current Xcode (v 13.0) command line tools compilers. All the other recipes up until openssl seem to be compiling and installing fine. Any ideas?

thanks

Can't restore time

I'm attempting to setup an extraction directly inside of R with sudo to avoid having to launch a separate R session with sudo.

Specifically, I'm using:

cmd = "sudo -kS curl -sSL https://mac.R-project.org/bin/darwin17/x86_64/xz-5.2.5-darwin.17-x86_64.tar.xz | tar fxj - -C /"
system(cmd, input = readline("Password:"))

I'm receiving:

usr/local/: Can't restore time
usr/local/pkg/: Can't create 'usr/local/pkg'
usr/local/pkg/xz-5.2.5-darwin.17-x86_64.list: Failed to create dir 'usr/local/pkg'
tar: Error exit delayed from previous errors.

This is using an intel (x86_64) mac. The issue appears to be similar to #11

[GDAL] libpq.5.dylib no longer exists in MacOS 11.0

Trying to load the CRAN binary packages for sf or rgdal or RPostgreSQL on MacOS 11.0 fails due to libpq.5.dylib:

 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so, 6): Library not loaded: /usr/lib/libpq.5.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/sf/libs/sf.so
  Reason: image not found

Even though a static libpq is available in libs-4, the CRAN binaries are still dynamically linked to the OS version on 10.13.

Perhaps the problem is that libs in libpq-9.6.9-darwin.17-x86_64.tar.gz are in an unusual subdirectory /usr/local/pgsql/lib where he linker doesn't find them, and falls back on /usr/lib/libpq.5.dylib.

I think rebuilding the R packages w/ -L/usr/local/pgsql/lib will solve the problem, or alternatively, repack libpq-9.6.9-darwin.17-x86_64.tar.gz so that headers and libs are in the usual /usr/local/{include,lib} folders.

See also: r-spatial/sf#1502

Recreating the build system in a VM

@s-u

I'm trying to add a recipe for autoconf. The main question I have relates to the underlying system configuration.

Replicating the Build System

To use the recipe's make file, we must first:

  1. Install XCode Command Line Tools (Xcode CLI)
  2. Some level of permission override on /usr/local?

I bring this up because I'm running into permission issues:

sudo chown -Rh 0:0 'autoconf-2.69-dst'
tar fcz 'autoconf-2.69-darwin.18-x86_64.tar.gz' -C 'autoconf-2.69-dst' usr
sudo '/usr/bin/tar' fxz 'autoconf-2.69-darwin.18-x86_64.tar.gz' -C / && touch 'autoconf-2.69'
usr/: Can't set user=0/group=0 for usrCan't update time for usr
usr/local/: Can't set user=0/group=0 for usr/local
tar: Error exit delayed from previous errors.
make: *** [autoconf-2.69] Error 1

This indicates that the problem relates Makefile directive of:

autoconf-2.69: autoconf-2.69-darwin.18-x86_64.tar.gz
	sudo $(TAR) fxz '$^' -C / && touch '$@'

Recipe

I've implemented the recipe as: autoconf in recipes/

Package: autoconf
Version: 2.69
Source.URL: http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz

I'm building it on macOS 10.14 (Mojave) with:

Rscript scripts/mkmk.R && cd build && make autoconf

This is generating the following make entry in build's Makefile:

autoconf-2.69-dst: src/autoconf-2.69 
	rm -rf autoconf-2.69-obj && mkdir autoconf-2.69-obj && cd autoconf-2.69-obj && ../src/autoconf-2.69/configure --with-pic --disable-shared --enable-static && make -j12 && make install DESTDIR=/Users/parallel/Downloads/recipes-master/build/autoconf-2.69-dst

src/autoconf-2.69: src/autoconf-2.69.tar.gz
	mkdir -p src/autoconf-2.69 && (cd src/autoconf-2.69 && $(TAR) fxj ../autoconf-2.69.tar.gz && mv */* .)
src/autoconf-2.69.tar.gz:
	curl -L -o $@ 'http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz'
autoconf-2.69-darwin.18-x86_64.tar.gz: autoconf-2.69-dst
	sudo chown -Rh 0:0 '$^'
	tar fcz '$@' -C '$^' usr
autoconf-2.69: autoconf-2.69-darwin.18-x86_64.tar.gz
	sudo $(TAR) fxz '$^' -C / && touch '$@'
autoconf: autoconf-2.69

How to set up the dependence on external headers?

Hi,

I'm trying to make a recipe to build the QuantLib library so that RQuantLib can link against it... However, QuantLib requires the boost headers.

From my limited understandings, at present, there's no native way to download the external dependence files. Correct? So there're three workarounds I can imagine:

  1. Compile the boost library and make QuantLib library depending on it. Since the boost source file doesn't contain a 'configure' file, it means I need to create a configure file for boost. So I can't simply use the boost official release. Instead, I need to download the release, plugin the configure file into the source and use the modified bundle?

  2. Similiar to the first point: bundle the boost header files into the QuantLib source tarball and use the modified tarball.

  3. As suggest by @eddelbuettel , the VM machine can install the R package BH and we may be able to use the boost header files of BH.

The whole point is I try to avoid modifying the source tarball. It feels like I'm polluting the source files... But it seems that I have to in this case? If so, I incline to the 2nd method, which is simpler...

Any suggestions?

Thanks.

GSOC + Boost Headers?

@s-u would it be possible to potentially have a student work on creating recipes for different kinds of libraries for Google Summer of Code (GSOC)?

Also, may we assume that boost headers are installed on the CRAN box? Or would this require a recipe to be created and applied?

build.sh requires /Library/Frameworks/R.framework/Resources/bin/Rscript

I used to use build.sh r-base-dev for later build R from source.
Recently, I get this error

Using R generator (/Library/Frameworks/R.framework/Resources/bin/Rscript)
./build.sh: line 126: 75475 Killed: 9               $RUN
ERROR: Makefile generation failed

It is normal that it cannot find Rscript since I first need to install r-base-dev before building R itself.

Also, how can I specify when running build.sh to use target macOS 11 instead of macOS 12? In effect, it seems that there is no gfortran available for arm64 macOS 12. @fxcoudert did release one here but I do not manage to use it for building R.

Cannot compile lz4

Hi all,

I encountered this issue when tying to install lz4:

Install args: install DESTDIR=$(DESTDIR) prefix=/opt/R/arm64 BUILD_SHARED=no BUILD_STATIC=yes
Copying sources ...
mv: cannot stat '/Users/abcdefg/recipes/build/lz4-1.9.4-obj/Makefile': No such file or directory
Makefile generated.
make -f Makefile.real prefix=/opt/R/arm64 BUILD_SHARED=no BUILD_STATIC=yes lib-release
make: Makefile.real: No such file or directory
make: *** No rule to make target `Makefile.real'. Stop.
make: *** [all] Error 2
make: *** [lz4-1.9.4-dst] Error 2

Any solutions? Many thanks!

Do I have to disable SIP in order to test?

Sorry to bother. My question may be silly. If so, please forgive my ignorance. In simple:

Can we change sudo $(TAR) fxz '$^' -C / && touch '$@' to something like below, so that we don't need to disable SIP for testing?

rm -fr ./tmp && mkdir ./tmp && sudo $(TAR) fxz '$^' -C ./tmp && sudo cp -r ./tmp/usr/local/ /usr/local/ && touch '$@'

Details

According to the comment from #2

That said, the error you see is because you have macOS with SIP (system integrity protection) enabled, so it won't allow you to change permissions on some directories. You can check, but I think it is benign because tar will untar and set permissions on files it can touch.

Yes, I know sudo $(TAR) fxz '$^' -C / && touch '$@' requires the permission.

However, from About System Integrity Protection on your Mac,

Paths and apps that third-party apps and installers can continue to write to include:

  • /Applications
  • /Library
  • /usr/local

Apparently, /usr/local is allowed to write. Will any library be installed to a directory other than /usr/local? In my limited experience, most of the library (if not all) are installed into /usr/local... If my statement is correct, the change I proposed should work, correct?

Thanks.

Add Suggests: for conditional dependencies

Some dependencies are optional, so they should be declared in Suggests:. This is not important for the builds, but it is important for the new dependency resolution system since we need to know if an optional library has been used during the build. At the time of manifest generation we need to check whether suggested packages are also present and add them to BuiltWith:.

This will solve issues like FreeType's optional dependency on Harfbuzz (see #23)

installing recipes

Hi..

I follow the instructions to install recipes but I got an error

local/: Can't restore time

that I do not undestand. Here is the log. Should I proceed in a different way? My systems is Catalina 10.15.2
Best regards
JJ

apontej@Johns-iMac-Pro Downloads % git clone https://github.com/s-u/recipes.git
Cloning into 'recipes'...
remote: Enumerating objects: 159, done.
remote: Total 159 (delta 0), reused 0 (delta 0), pack-reused 159
Receiving objects: 100% (159/159), 22.01 KiB | 3.67 MiB/s, done.
Resolving deltas: 100% (47/47), done.

apontej@Johns-iMac-Pro Downloads % cd recipes 
apontej@Johns-iMac-Pro recipes % Rscript scripts/mkmk.R && cd build && make all
curl -L -o src/QuantLib-1.15.tar.gz 'https://dl.bintray.com/quantlib/releases/QuantLib-1.15.tar.gz'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 8921k  100 8921k    0     0  2705k      0  0:00:03  0:00:03 --:--:-- 3942k
mkdir -p src/QuantLib-1.15 && (cd src/QuantLib-1.15 && '/usr/bin/tar' fxj ../QuantLib-1.15.tar.gz && mv */* . )
curl -L -o src/boost_1_69_0.tar.gz 'https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  106M  100  106M    0     0  4344k      0  0:00:25  0:00:25 --:--:-- 3614k
mkdir -p src/boost-headers-1.69-0 && (cd src/boost-headers-1.69-0 && '/usr/bin/tar' fxj ../boost_1_69_0.tar.gz && mv */* . && patch -p1 < '/Users/apontej/Downloads/recipes/recipes/boost-headers.patch')
patching file configure
rm -rf boost-headers-1.69-0-obj && mkdir boost-headers-1.69-0-obj && cd boost-headers-1.69-0-obj && sh ../src/boost-headers-1.69-0/configure --with-pic --disable-shared --enable-static && make -j12 && make install DESTDIR=/Users/apontej/Downloads/recipes/build/boost-headers-1.69-0-dst
make[1]: Nothing to be done for `all'.
echo Installing from ../src/boost-headers-1.69-0 to /Users/apontej/Downloads/recipes/build/boost-headers-1.69-0-dst/usr/local/include/
Installing from ../src/boost-headers-1.69-0 to /Users/apontej/Downloads/recipes/build/boost-headers-1.69-0-dst/usr/local/include/
mkdir -p /Users/apontej/Downloads/recipes/build/boost-headers-1.69-0-dst/usr/local/include
cp -r ../src/boost-headers-1.69-0/boost /Users/apontej/Downloads/recipes/build/boost-headers-1.69-0-dst/usr/local/include/
sudo chown -Rh 0:0 'boost-headers-1.69-0-dst'
Password:
tar fcz 'boost-headers-1.69-0-darwin.19-x86_64.tar.gz' -C 'boost-headers-1.69-0-dst' usr/local
sudo '/usr/bin/tar' fxz 'boost-headers-1.69-0-darwin.19-x86_64.tar.gz' -C /usr/ --strip 1 && touch 'boost-headers-1.69-0'
local/: Can't restore time
tar: Error exit delayed from previous errors.
make: *** [boost-headers-1.69-0] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.