Simon,

Website mac.r-project.org/tools/ lists mandatory libraries.  In the next 
paragraph, it has a link to “binaries of libraries and tools for Mac OS page”.  
Clicking on the link takes user to mac.r-project.org/bin.  Here the only method 
of install described is via install.libs().  By using install.libs(), I found 
out that binaries (for my Intel Mac) are located at 
mac.r-project.org/bin/darwin20/x86_64/.  But if I did not already have R 
installed, I would not be able to go to this location.  

On the page mac.r-project.org/bin, perhaps you can provide links to the 
binaries location.  Currently the only links provided are to liblzma and PCRE2 
homepages.  When downloading from those locations, user may need to run 
./configure, make, and make install.  

I am only starting out with QuantLib, so not sure if intraday feature is widely 
used.  

Thanks again,
Naresh

> On Mar 30, 2025, at 9:24 PM, Simon Urbanek <simon.urba...@r-project.org> 
> wrote:
> 
> Naresh,
> 
> 
>> On 31 Mar 2025, at 12:25, Naresh Gurbuxani <naresh_gurbux...@hotmail.com> 
>> wrote:
>> 
>> Reporting back after a clean reinstall of R using directions and resources 
>> at https://mac.r-project.org, both data.table and RQuantLib are working as 
>> expected.  data.table has openmp enabled.  RQuantLib has intraday enabled.  
>> There was no need to use Makevars file.
>> 
> 
> Great. Is the intraday feature something that is of interest to users?  I 
> wonder why it is not enabled by default. If it is useful and not harmful we 
> could build CRAN binaries with that flag so you wouldn’t need to do any of 
> what you did ...
> 
> 
>> One observation about liblzma and PCRE2 libraries.  These libraries are 
>> required before R installation.  While these can be installed using 
>> install.libs() function,  that is only possible after R installation.  
>> Therefore, these need to be downloaded, unpacked, then installed using 
>> ./configure, make, and make install.  While experienced users are 
>> comfortable with this procedure, new users may be tempted to avoid this by 
>> using a package manager like HomeBrew or MacPorts.  As pointed out on this 
>> website, and confirmed by my experience, libraries installed using package 
>> managers do not always work well with directly installed libraries.  R core 
>> group should consider either (i) including these libraries within R package 
>> installer, or (ii) providing some more instructions on installing these 
>> libraries (similar to OpenMP page).  
>> 
> 
> 
> Sorry, I don’t see why you would need to do any of that - the binaries are 
> all ready-to-use, so you simply unpack them - there is no need to use 
> configure, ./make etc. since you don't have to compile them from sources - 
> that’s the whole point of binaries.
> 
> 
>> A similar problem will arise when a new version of R uses updated versions 
>> of liblzma and PCRE2. 
>> 
> 
> 
> The versions are quite irrelevant since they are used statically so R doesn't 
> care which version you use in packages and vice-versa.
> 
> Cheers,
> Simon
> 
> 
> 
>> Thanks everyone for their help and patience,
>> Naresh  
>> 
>>> On Mar 23, 2025, at 4:25 PM, Simon Urbanek <simon.urba...@r-project.org> 
>>> wrote:
>>> 
>>> Naresh,
>>> 
>>> please ignore all "advice" you go so far - most of it was wrong. From your 
>>> earlier reports it looks like your system is messed up which the the core 
>>> of the problem - please remove 3rd party libraries from your path (like 
>>> homebrew, macports, /opt/local etc.) as that will interfere with the 
>>> builds. You can tell that you have a serious mess by the fact that it's 
>>> showing a *different* QuantLib version in the configure step than the one 
>>> you downloaded so you have unrelated scripts on your PATH so everything 
>>> will break.
>>> 
>>> So to start from scratch:
>>> 
>>> 1) move aside everything from /usr/local, e.g.
>>> sudo mkdir /usr/local/.away
>>> sudo mv /usr/local/* /usr/local/.away/
>>> 
>>> 2) create /opt/R/$(uname -m) and make you the owner
>>> sudo mkdir -p /opt/R/$(uname -m)
>>> sudo chown $USER /opt/R
>>> 
>>> 3) remove all non-system paths from PATH and prepend /opt/R/$(uname -m). 
>>> Since we nuked /usr/local you may want to add R itself:
>>> 
>>> export PATH=/opt/R/$(uname 
>>> -m)/bin:/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/R.framework/Resources/bin
>>> 
>>> Now run install.libs("QuantLib") as before (as you, not root).
>>> 
>>> Install the package you care about (I presume RQuantLib). The best way to 
>>> know what's going on is to install locally as it allows you to inspect 
>>> config.log if something goes wrong, i.e.
>>> 
>>> # in R:
>>> download.packages("RQuantLib",".",type='source')
>>> # in the shell
>>> tar fxz RQuantLib_*
>>> R CMD INSTALL RQuantLib
>>> 
>>> if something goes wrong you'll have RQuantLib/config.log to look at. Note 
>>> that you should not need any extra flags like --with-boost-include since 
>>> they are already in the location they are supposed to be.
>>> 
>>> Once you're happy, you can move back /usr/local/ if you still need it, e.g.
>>> 
>>> sudo mv /usr/local/.away/* /usr/local/
>>> 
>>> Cheers,
>>> Simon
>>> 
>>> 
>>> 
>>>> On Mar 24, 2025, at 5:36 AM, Naresh Gurbuxani 
>>>> <naresh_gurbux...@hotmail.com> wrote:
>>>> 
>>>> To give credit to Simon, at https://mac.r-project.org/bin instructions 
>>>> include a note that “If you do not have write permission, you may need to 
>>>> make it writeable or run sudo R.”
>>>> 
>>>> I ran sudo R and was able to install and download boost.  
>>>> 
>>>> ~ $ ls /opt/R/x86_64/include/
>>>> boost      itclInt.h     tcl.h     tclTomMathDecls.h
>>>> fakemysql.h   itclIntDecls.h     tclDecls.h      tdbc.h
>>>> fakepq.h      itclMigrate2TclCore.h  tclOO.h     tdbcDecls.h
>>>> fakesql.h     itclTclIntStubsFcn.h   tclOODecls.h    tdbcInt.h
>>>> itcl.h      mysqlStubs.h     tclPlatDecls.h  tk.h
>>>> itcl2TclOO.h  odbcStubs.h     tclThread.h     tkDecls.h
>>>> itclDecls.h   pqStubs.h     tclTomMath.h    tkPlatDecls.h
>>>> ~ $ 
>>>> 
>>>> However, I am still not able to install RQuantLib.  It does not find boost.
>>>>> install.packages("RQuantLib", type = "source", lib = .libPaths()[2], 
>>>>> configure.args = c("--with-boost-include=/opt/R/x86_64/include/boost"), 
>>>>> configure.vars = c("CPPFLAGS='-DQL_HIGH_RESOLUTION_DATE'"))
>>>> trying URL 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.24.tar.gz'
>>>> Content type 'application/x-gzip' length 195836 bytes (191 KB)
>>>> ==================================================
>>>> downloaded 191 KB
>>>> 
>>>> * installing *source* package ‘RQuantLib’ ...
>>>> ** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
>>>> ** using staged installation
>>>> 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 the compiler supports GNU C++... yes
>>>> checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... yes
>>>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 
>>>> features... none needed
>>>> checking how to run the C++ preprocessor... clang++ -arch x86_64 
>>>> -std=gnu++17 -E
>>>> checking whether the compiler supports GNU C++... (cached) yes
>>>> checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... (cached) 
>>>> yes
>>>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 
>>>> features... (cached) none needed
>>>> checking for R... yes
>>>> checking for quantlib-config... yes
>>>> checking for suitable QuantLib version... yes (1.36)
>>>> checking for Boost development files... no
>>>> configure: error: Boost development files not found
>>>> ERROR: configuration failed for package ‘RQuantLib’
>>>> * removing 
>>>> ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RQuantLib’
>>>> 
>>>> The downloaded source packages are in
>>>> ‘/private/var/folders/nb/2vppcjgd19l_h9brvzgdjcm40000gn/T/Rtmp7YHJMO/downloaded_packages’
>>>> Warning message:
>>>> In install.packages("RQuantLib", type = "source", lib = .libPaths()[2],  :
>>>> installation of package ‘RQuantLib’ had non-zero exit status
>>>>> 
>>>> 
>>>>> On Mar 23, 2025, at 10:44 AM, Peter Dalgaard <pda...@gmail.com> wrote:
>>>>> 
>>>>> You'd need to change the "-C /" in the tar command. I trust Simon enough 
>>>>> to just run the script as root, though... 
>>>>> 
>>>>> -pd
>>>>> 
>>>>>> On 23 Mar 2025, at 14.37, Naresh Gurbuxani 
>>>>>> <naresh_gurbux...@hotmail.com> wrote:
>>>>>> 
>>>>>> Peter,
>>>>>> 
>>>>>> In install.libs(), there is no argument for setting location where boost 
>>>>>> or other packages are installed.  How can I select a different directory 
>>>>>> to install boost using install.libs()?
>>>>>> 
>>>>>> Thanks,
>>>>>> Naresh
>>>>>> 
>>>>>>> On Mar 23, 2025, at 7:55 AM, Naresh Gurbuxani 
>>>>>>> <naresh_gurbux...@hotmail.com> wrote:
>>>>>>> 
>>>>>>> 
>>>>>>> notes $ which tar
>>>>>>> /opt/local/libexec/gnubin/tar
>>>>>>> notes $ tar --version
>>>>>>> tar (GNU tar) 1.35
>>>>>>> Copyright (C) 2023 Free Software Foundation, Inc.
>>>>>>> License GPLv3+: GNU GPL version 3 or later 
>>>>>>> <https://gnu.org/licenses/gpl.html>.
>>>>>>> This is free software: you are free to change and redistribute it.
>>>>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>>>> 
>>>>>>> Written by John Gilmore and Jay Fenlason.
>>>>>>> notes $ 
>>>>>>> 
>>>>>>> I use MacPorts package manager to install most software.  For R, I 
>>>>>>> switched to manual install because, with MacPorts data.table could not 
>>>>>>> pick up openmp support.  
>>>>>>> 
>>>>>>> Using uppercase J as suggested by Rodney successfully downloaded boost 
>>>>>>> on my computer.  But it cannot install.  Below are first few lines of 
>>>>>>> messages:
>>>>>>> 
>>>>>>>> install.libs("boost")
>>>>>>> Downloading https://mac.R-project.org/bin/REPOS ...
>>>>>>> Using repository  https://mac.R-project.org/bin/darwin20/x86_64 ...
>>>>>>> Downloading index  
>>>>>>> https://mac.R-project.org/bin/darwin20/x86_64/PACKAGES ...
>>>>>>> Downloading + installing  
>>>>>>> https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz
>>>>>>>  ...
>>>>>>> tar: opt/R/x86_64/include: Cannot utime: Permission denied
>>>>>>> tar: opt/R/x86_64/lib: Cannot utime: Permission denied
>>>>>>> tar: opt/R/x86_64/pkg/boost-1.86.0-darwin.20-x86_64.list: Cannot open: 
>>>>>>> Permission denied
>>>>>>> (Many more lines with Permission denied message)
>>>>>>> 
>>>>>>> I have another question.  I need boost to install RQuantLib.  My 
>>>>>>> computer already has MacPorts-installed boost and MacPorts installed 
>>>>>>> QuantLib.  But RQuantLib installation is not picking up boost.  Is 
>>>>>>> there a way to get that working?
>>>>>>> 
>>>>>>>> install.packages("RQuantLib", lib = .libPaths()[2], repos = 
>>>>>>>> "https://cran.r-project.org";, type = "source", configure.args = 
>>>>>>>> c("--with-boost-include=/opt/local/libexec/boost/1.76/include/"), 
>>>>>>>> configure.vars = c("CPPFLAGS='-DQL_HIGH_RESOLUTION_DATE'"))
>>>>>>> trying URL 
>>>>>>> 'https://cran.r-project.org/src/contrib/RQuantLib_0.4.24.tar.gz'
>>>>>>> Content type 'application/x-gzip' length 195836 bytes (191 KB)
>>>>>>> ==================================================
>>>>>>> downloaded 191 KB
>>>>>>> 
>>>>>>> * installing *source* package ‘RQuantLib’ ...
>>>>>>> ** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
>>>>>>> ** using staged installation
>>>>>>> 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 the compiler supports GNU C++... yes
>>>>>>> checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... yes
>>>>>>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 
>>>>>>> features... none needed
>>>>>>> checking how to run the C++ preprocessor... clang++ -arch x86_64 
>>>>>>> -std=gnu++17 -E
>>>>>>> checking whether the compiler supports GNU C++... (cached) yes
>>>>>>> checking whether clang++ -arch x86_64 -std=gnu++17 accepts -g... 
>>>>>>> (cached) yes
>>>>>>> checking for clang++ -arch x86_64 -std=gnu++17 option to enable C++11 
>>>>>>> features... (cached) none needed
>>>>>>> checking for R... yes
>>>>>>> checking for quantlib-config... yes
>>>>>>> checking for suitable QuantLib version... yes (1.36)
>>>>>>> checking for Boost development files... no
>>>>>>> configure: error: Boost development files not found
>>>>>>> ERROR: configuration failed for package ‘RQuantLib’
>>>>>>> * removing 
>>>>>>> ‘/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RQuantLib’
>>>>>>> 
>>>>>>> The downloaded source packages are in
>>>>>>> ‘/private/var/folders/nb/2vppcjgd19l_h9brvzgdjcm40000gn/T/RtmpKL66sI/downloaded_packages’
>>>>>>> Warning message:
>>>>>>> In install.packages("RQuantLib", lib = .libPaths()[2], repos = 
>>>>>>> "https://cran.r-project.org";,  :
>>>>>>> installation of package ‘RQuantLib’ had non-zero exit status
>>>>>>> In terminal
>>>>>>> notes $ ls /opt/local/libexec/boost/1.76/include/
>>>>>>> boost
>>>>>>> 
>>>>>>>> On Mar 23, 2025, at 6:21 AM, peter dalgaard <pda...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>> Oddly, this doesn't happen here, even though I also tar xj instead of 
>>>>>>>> xJ ot the .xz file.
>>>>>>>> 
>>>>>>>> Any chance you two could be picking up a different tar? I am seeing
>>>>>>>> 
>>>>>>>> PeterDaardsiMac:ISwR pd$ which tar
>>>>>>>> /usr/bin/tar
>>>>>>>> PeterDaardsiMac:ISwR pd$ tar --version
>>>>>>>> bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 
>>>>>>>> 
>>>>>>>> and "man tar" claims that j and J options are "c mode only" so 
>>>>>>>> presumably ignored and tar gets the compression type from the input 
>>>>>>>> itself.
>>>>>>>> 
>>>>>>>> -pd
>>>>>>>> 
>>>>>>>>> On 22 Mar 2025, at 15.53, Sparapani, Rodney via R-SIG-Mac 
>>>>>>>>> <r-sig-mac@r-project.org> wrote:
>>>>>>>>> 
>>>>>>>>> Hi Naresh:
>>>>>>>>> 
>>>>>>>>> I’m seeing the same error message.  And it makes sense
>>>>>>>>> because the boost tar-ball is compressed with xz and
>>>>>>>>> not bzip2.  On line 87 of install.R, we have the following…
>>>>>>>>> if (system(paste("curl", "-sSL", shQuote(u), "|", "tar fxj - -C /")) 
>>>>>>>>> < 0)
>>>>>>>>> Little j means bzip2 while big J is xz.  So try substituting…
>>>>>>>>> if (system(paste("curl", "-sSL", shQuote(u), "|", "tar fxJ - -C /")) 
>>>>>>>>> < 0)
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> Rodney Sparapani, Associate Professor of Biostatistics
>>>>>>>>> President, Wisconsin Chapter of the American Statistical Association
>>>>>>>>> Division of Biostatistics, Data Science Institute
>>>>>>>>> Medical College of Wisconsin, Milwaukee Campus
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> From: R-SIG-Mac <r-sig-mac-boun...@r-project.org> on behalf of Naresh 
>>>>>>>>> Gurbuxani <naresh_gurbux...@hotmail.com>
>>>>>>>>> Date: Saturday, March 22, 2025 at 8:02 AM
>>>>>>>>> To: r-sig-mac@r-project.org <r-sig-mac@r-project.org>
>>>>>>>>> Subject: [R-SIG-Mac] install.libs error
>>>>>>>>> Downloading + installing  
>>>>>>>>> https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz$<https://mac.R-project.org/bin/darwin20/x86_64/boost-1.86.0-darwin.20-x86_64.tar.xz%20$>
>>>>>>>>>   ...
>>>>>>>>> bzip2: (stdin) is not a bzip2 file.
>>>>>>>>> tar: Child died with signal 13
>>>>>>>>> tar: Error is not recoverable: exiting now
>>>>>>>>> curl: (23) Failure writing output to destination, passed 8192 
>>>>>>>>> returned 0
>>>>>>>>> 
>>>>>>>>> [[alternative HTML version deleted]]
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> R-SIG-Mac mailing list
>>>>>>>>> R-SIG-Mac@r-project.org
>>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> Peter Dalgaard, Professor,
>>>>>>>> Center for Statistics, Copenhagen Business SchoolSolbjerg Plads 3, 
>>>>>>>> 2000 Frederiksberg, Denmark
>>>>>>>> Phone: (+45)38153501
>>>>>>>> Office: A 4.23
>>>>>>>> Email: pd....@cbs.dk  Priv: pda...@gmail.com
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> R-SIG-Mac mailing list
>>>>>>> R-SIG-Mac@r-project.org
>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>> 
>>>>> 
>>>>> -- 
>>>>> Peter Dalgaard, Professor,
>>>>> Center for Statistics, Copenhagen Business SchoolSolbjerg Plads 3, 2000 
>>>>> Frederiksberg, Denmark
>>>>> Phone: (+45)38153501
>>>>> Office: A 4.23
>>>>> Email: pd....@cbs.dk  Priv: pda...@gmail.com
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac@r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac


_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to