Install error for Rmosek

305 views
Skip to first unread message

Paul Goldsmith-Pinkham

unread,
Aug 17, 2022, 10:42:59 AM8/17/22
to mosek
Hi,

I have successfully installed Mosek on my Mac OS X machine (and executed it from the command line), but unfortunately I have fatal errors when I try to install RMosek.

Mosek Version: 9.3.21 (Build date: 2022-8-8 14:56:03)
Platform: Mac OS, 64 bit Intel , Catalina 10.15.7. x86_64-apple-darwin17.0    
R version: 4.1.3

I have installed Xcode and the Command Line Software for Xcode.

Once I have Mosek installed, I followed the instructions here: https://docs.mosek.com/latest/rmosek/install-interface.html 

My mosek package is in /usr/local/ and I have an academic license in the folder.  I run

source("/usr/local/mosek/9.3/tools/platform/osx64x86/rmosek/builder.R") 
attachbuilder(what_mosek_bindir="/usr/local/mosek/9.3/tools/platform/osx64x86/bin", pos=2L, name="Rmosek:builder", warn.conflicts=TRUE)

Then I run

install.rmosek()

I copy the log from running below, but the gist is that the installation fails when testing if the installed package can be loaded from temporary location. I'm a bit at a loss at to what could be causing this and the error is not sufficiently helpful to give me any ideas. Does anyone have a suggestion?

Thank you!
Paul


source("/usr/local/mosek/9.3/tools/platform/osx64x86/rmosek/builder.R")

    You may now call 'attachbuilder()' with optional extra arguments:

        attachbuilder(what_mosek_bindir="/usr/local/mosek/9.3/tools/platform/osx64x86/bin", pos=2L, name="Rmosek:builder", warn.conflicts=TRUE)

    to attach builder functions (e.g., 'install.rmosek') to the search path.

> attachbuilder(what_mosek_bindir="/usr/local/mosek/9.3/tools/platform/osx64x86/bin", pos=2L, name="Rmosek:builder", warn.conflicts=TRUE)
NOTE: Overwriting the database 'Rmosek:builder' on the search path.

    Functions attached to the search path:
      install.rmosek     - install Rmosek package.
      update.rmosek      - update Rmosek package.
      remove.rmosek      - remove Rmosek package.

    The *.rmosek functions wrap the corresponding utils::*.packages functions
    with the following default argument values:
      pkgs           = "Rmosek"
      repos          = "https://download.mosek.com/R/9.3"

    configuration variables:
      MSK_BINDIR     = "/usr/local/mosek/9.3/tools/platform/osx64x86/bin"
                        # if empty, autoconfigured from mosek executable on PATH.

      MSK_HEADERDIR  = "/usr/local/mosek/9.3/tools/platform/osx64x86/h"
                        # if empty, autoconfigured from 'MSK_BINDIR'.

      MSK_LIB        = "mosek64"
                        # if empty, autoconfigured from 'MSK_BINDIR'.

    and installation styles:
      using_pkgbuild = FALSE
                        # whether to execute in the 'pkgbuild' environment
                        # as is recommended on Windows to resolve Rtools.
                       
      using_sysenv   = FALSE
                        # whether to transmit configuration variables via Sys.setenv()
                        # as opposed to configure.vars.

    See, e.g., `show(install.rmosek)` for its implementation.
install.rmosek()
trying URL 'https://download.mosek.com/R/9.3/src/contrib/Rmosek_9.3.2.tar.gz'
Content type 'application/x-tar' length 1555385 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

* installing *source* package ‘Rmosek’ ...
** using staged installation
Configuring for a UNIX-alike platform (sub-architecture: "")
Found package 'Matrix' version 1.4.0
Found configuration variables in environment
Using MOSEK bin directory: /usr/local/mosek/9.3/tools/platform/osx64x86/bin
Using MOSEK header directory: /usr/local/mosek/9.3/tools/platform/osx64x86/h
Using MOSEK library: mosek64
Configuration done.
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c Rmosek.cc -o Rmosek.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c local_stubs.cc -o local_stubs.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_globalvars.cc -o rmsk_globalvars.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_msg_base.cc -o rmsk_msg_base.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_msg_mosek.cc -o rmsk_msg_mosek.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_arguments.cc -o rmsk_obj_arguments.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_constraints.cc -o rmsk_obj_constraints.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_matrices.cc -o rmsk_obj_matrices.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_mosek.cc -o rmsk_obj_mosek.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_qobj.cc -o rmsk_obj_qobj.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_obj_sexp.cc -o rmsk_obj_sexp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_utils_interface.cc -o rmsk_utils_interface.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_utils_mosek.cc -o rmsk_utils_mosek.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/mosek/9.3/tools/platform/osx64x86/h  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Matrix/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c rmsk_utils_sexp.cc -o rmsk_utils_sexp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o Rmosek.so Rmosek.o local_stubs.o rmsk_globalvars.o rmsk_msg_base.o rmsk_msg_mosek.o rmsk_obj_arguments.o rmsk_obj_constraints.o rmsk_obj_matrices.o rmsk_obj_mosek.o rmsk_obj_qobj.o rmsk_obj_sexp.o rmsk_utils_interface.o rmsk_utils_mosek.o rmsk_utils_sexp.o -L/usr/local/mosek/9.3/tools/platform/osx64x86/bin -lmosek64 -Wl,-rpath,/usr/local/mosek/9.3/tools/platform/osx64x86/bin -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
/usr/bin/install_name_tool -change libmosek64.9.3.dylib /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libmosek64.9.3.dylib Rmosek.so
installing to /Library/Frameworks/R.framework/Versions/4.1/Resources/library/00LOCK-Rmosek/00new/Rmosek/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
sh: line 1: 66181 Killed: 9               R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/j9/cmyn2ly12n12gdj60y18x1nr0000gn/T//Rtmp1LZEHL/file1022c6e55f3ec'
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rmosek’
Warning in install.packages :
  installation of package ‘Rmosek’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/j9/cmyn2ly12n12gdj60y18x1nr0000gn/T/Rtmp5OfW3k/downloaded_packages’

Michal Adamaszek

unread,
Aug 18, 2022, 3:27:22 AM8/18/22
to mosek
Hi,

Just to make sure, have you ran the python library setup script when installing Mosek? Step 2 in https://docs.mosek.com/latest/install/installation.html#macos

Best,
Michal

Utkarsh Detha

unread,
Aug 18, 2022, 11:58:49 AM8/18/22
to mosek
Hi,

I ask that you try the following (install without test loading):

install.rmosek(INSTALL_opts="--no-test-load")

and see if the installation completes. If it does, restart the R session and load Rmosek to ensure it works.
If you run into issues in either case, please share the log.

Although I will admit that the error you are seeing is likely unrelated to Rmosek. The most common suggestions I have found regarding this issue are to re-install R(studio). In any case, please reach out again if things don't work. I will also keep looking into reproducing this error.

Regards,
Utkarsh

Paul Goldsmith-Pinkham

unread,
Aug 18, 2022, 1:34:05 PM8/18/22
to mo...@googlegroups.com
Hi,

This seems to have worked! I successfully installed, and then restarted R. I was able to load the Rmosek library as well, afterwards (log below).

I agree with you... I thought this was some sort of permissions issue, but had no good ideas about how to fix it. 

Thanks again!

Paul

> install.rmosek(INSTALL_opts="--no-test-load")
** checking absolute paths in shared objects and dynamic libraries
* DONE (Rmosek)


The downloaded source packages are in
‘/private/var/folders/j9/cmyn2ly12n12gdj60y18x1nr0000gn/T/Rtmp5OfW3k/downloaded_packages’

Restarting R session...

> library(Rmosek)
Loading required package: Matrix

--
You received this message because you are subscribed to a topic in the Google Groups "mosek" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mosek/-pQlajnXOG8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mosek+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mosek/3b5db1e5-510b-46b5-af58-318c9b3a1791n%40googlegroups.com.

Paul Goldsmith-Pinkham

unread,
Aug 18, 2022, 1:34:05 PM8/18/22
to mo...@googlegroups.com
Yes, I had run it successfully! 

python /usr/local/mosek/9.3/tools/platform/osx64x86/bin/install.py


Fixing library paths

  MOSEKLM:

  libcilkrts.5.dylib:

    @rpath/libcilkrts.5.dylib -> /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libcilkrts.5.dylib

/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libcilkrts.5.dylib (for architecture i386)

/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libcilkrts.5.dylib (for architecture x86_64)

  libmosek64.9.3.dylib:

    libmosek64.9.3.dylib -> /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libmosek64.9.3.dylib

  libmosek64.dylib:

    libmosek64.9.3.dylib -> /usr/local/mosek/9.3/tools/platform/osx64x86/bin/libmosek64.9.3.dylib

  libmosekjava9_3.jnilib:

  libmosekxx9_3.dylib:

  lmgrd:

  lmutil:

  mampl:

  mosek:

  moseksi:

  msktestlic:

  ../../../../toolbox/r2015a/mosekopt.mexmaci64:

  ../../../../toolbox/r2015aom/mosekopt.m


--
You received this message because you are subscribed to a topic in the Google Groups "mosek" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mosek/-pQlajnXOG8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mosek+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages