Cannot finish installing BEAGLE from source

936 views
Skip to first unread message

Jennifer Questel

unread,
Aug 18, 2022, 8:56:31 PM8/18/22
to beast-users
 have been having a very difficult time with trying to get BEAST to see the BEAGLE library so I can analyze my data. I am working on a MacBook Pro (macOS Monterey; chip Apple M1 Max). I have Java JDK (idk-18_macos-aarch64_bin 4.01.59) installed. 

I’ve tried two different method for installing BEAGLE. First with the binary installer from GitHub but that did not work, and second by installing from source. When I get to Step 5 of the source install where you make the build directory and run cmake, the next command “make install” gives me the following error:

make: *** No rule to make target ‘Install’. Stop


My bash commands leading up to this:

Documents % cd beagle-lib
beagle-lib % cd build
build % cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

build % make install
make: *** No rule to make target `install'.  Stop.


Can you please help to determine why I cannot finish the BEAGLE install?

Thank you,
Jennifer

Jonathan Chang

unread,
Aug 18, 2022, 9:55:11 PM8/18/22
to beast-users
Hi Jennifer,

You need to

  cd beagle-lib
  mkdir -p build
  cd build
  cmake ..
  make install

I note that Homebrew has beagle packaged for M1 macs as well, though it hasn't been updated to v4 yet - https://formulae.brew.sh/formula/beagle

Jonathan

Jennifer Questel

unread,
Aug 19, 2022, 12:22:16 AM8/19/22
to beast...@googlegroups.com
Hi Jonathan,

Thanks for your response. I downloaded beagle again using 


And then used your code sting. I am now getting an error message after running “make install”

CMake Error at libhmsbeagle/cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/Users/jmquestel/Documents/beagle-lib/build/libhmsbeagle/libhmsbeagle.dylib"
  to "/usr/local/lib/libhmsbeagle.dylib": Permission denied.
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)

I’ve gone back to BEAST and it still does not recognize the BEAGLE library.





Detailed log from Terminal:

jmquestel@fbk-xmj7t build % cmake ..
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found JNI: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/include  found components: AWT JVM
-- JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/
-- JNI_INCLUDE_DIRS=/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/include;/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/include/darwin;/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/include
-- JNI_LIBRARIES=/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/lib/libjawt.dylib;/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/lib/server/libjvm.dylib
-- macOS universal (x86_64 / arm64) build
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED - Failed
-- Performing Test COMPILER_OPT_ARCH_AVX_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_AVX_SUPPORTED - Failed
-- Not using libtools for plugins
-- Looking for CL_VERSION_3_0
-- Looking for CL_VERSION_3_0 - not found
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenCL.framework (found version "1.2")
-- OpenCL Includes: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenCL.framework
-- OpenCL Libraries: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenCL.framework
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jmquestel/Documents/beagle-lib/build
jmquestel@fbk-xmj7t build % make install
[  4%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/beagle.cpp.o
[  8%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/BeagleBenchmark.cpp.o
[ 12%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/linalg.cpp.o
[ 16%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/Plugin.cpp.o
[ 20%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/UnixSharedLibrary.cpp.o
[ 25%] Linking CXX shared library libhmsbeagle.dylib
[ 25%] Built target hmsbeagle
[ 29%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu.dir/BeagleCPUPlugin.cpp.o
[ 33%] Linking CXX shared library libhmsbeagle-cpu.so
[ 33%] Built target hmsbeagle-cpu
[ 37%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu-sse.dir/BeagleCPUSSEPlugin.cpp.o
[ 41%] Linking CXX shared library libhmsbeagle-cpu-sse.so
[ 41%] Built target hmsbeagle-cpu-sse
[ 45%] Building OpenCL kernels
Making OpenCL SP state count = 16
Making OpenCL SP state count = 32
Making OpenCL SP state count = 48
Making OpenCL SP state count = 64
Making OpenCL SP state count = 80
Making OpenCL SP state count = 128
Making OpenCL SP state count = 192
Making OpenCL SP state count = 256
Making OpenCL DP state count = 16 DP
Making OpenCL DP state count = 32 DP
Making OpenCL DP state count = 48 DP
Making OpenCL DP state count = 64 DP
Making OpenCL DP state count = 80 DP
Making OpenCL DP state count = 128 DP
Making OpenCL DP state count = 192 DP
Making OpenCL DP state count = 256 DP
[ 45%] Built target OpenKernels
[ 50%] Building CXX object libhmsbeagle/GPU/CMake_OpenCL/CMakeFiles/hmsbeagle-opencl.dir/__/GPUImplHelper.cpp.o
[ 54%] Building CXX object libhmsbeagle/GPU/CMake_OpenCL/CMakeFiles/hmsbeagle-opencl.dir/__/GPUInterfaceOpenCL.cpp.o
[ 58%] Building CXX object libhmsbeagle/GPU/CMake_OpenCL/CMakeFiles/hmsbeagle-opencl.dir/__/KernelLauncher.cpp.o
[ 62%] Building CXX object libhmsbeagle/GPU/CMake_OpenCL/CMakeFiles/hmsbeagle-opencl.dir/__/KernelResource.cpp.o
[ 66%] Building CXX object libhmsbeagle/GPU/CMake_OpenCL/CMakeFiles/hmsbeagle-opencl.dir/__/OpenCLPlugin.cpp.o
[ 70%] Linking CXX shared library libhmsbeagle-opencl.so
[ 70%] Built target hmsbeagle-opencl
[ 75%] Building CXX object libhmsbeagle/JNI/CMakeFiles/hmsbeagle-jni.dir/beagle_BeagleJNIWrapper.cpp.o
[ 79%] Linking CXX shared library libhmsbeagle-jni.jnilib
[ 79%] Built target hmsbeagle-jni
[ 83%] Building CXX object examples/CMakeFiles/hmctest.dir/hmctest/hmctest.cpp.o
[ 87%] Linking CXX executable hmctest
[ 87%] Built target hmctest
[ 91%] Building CXX object examples/CMakeFiles/synthetictest.dir/synthetictest/synthetictest.cpp.o
[ 95%] Building CXX object examples/CMakeFiles/synthetictest.dir/synthetictest/linalg.cpp.o
[100%] Linking CXX executable synthetictest
[100%] Built target synthetictest
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/lib/libhmsbeagle.dylib
CMake Error at libhmsbeagle/cmake_install.cmake:41 (file):
  file INSTALL cannot copy file
  "/Users/jmquestel/Documents/beagle-lib/build/libhmsbeagle/libhmsbeagle.dylib"
  to "/usr/local/lib/libhmsbeagle.dylib": Permission denied.
Call Stack (most recent call first):
  cmake_install.cmake:42 (include)


make: *** [install] Error 1

-- 
You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/9ykdlbs-GxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beast-users/0efb086a-d488-416c-ac00-9af1b823c995n%40googlegroups.com.

Farman, Mark L.

unread,
Aug 19, 2022, 12:29:35 AM8/19/22
to beast...@googlegroups.com
sudo make install will fix this...

On Aug 19, 2022, at 12:04 AM, Jennifer Questel <jenn.q...@gmail.com> wrote:

CAUTION: External Sender

You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beast-users/0E9778F9-E666-488E-9AAB-67FEAE5D7DD2%40gmail.com.

Mark L. Farman 
Professor, Department of Plant Pathology
225 Plant Science Building
1405 Veteran's Dr.
University of Kentucky
Lexington, KY 40546 USA 
tel:  (859) 218-0728 
fax:  (859) 323-1961

Jennifer Questel

unread,
Aug 19, 2022, 12:53:51 AM8/19/22
to beast...@googlegroups.com
Thanks! That work and I completed the install. But when I run BEAST its still not recognizing the BEAGLE library and I get this message when I try to run my data:

Using BEAGLE DataLikelihood Delegate
Aug 18, 2022 8:41:27 PM beagle.BeagleFactory loadBeagleInstance
INFO:   BEAGLE function, create, returned error code -6 (No resource matches requirements)
Fatal exception: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
java.lang.RuntimeException: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
at beagle.BeagleFactory.loadBeagleInstance(Unknown Source)
at dr.evomodel.treedatalikelihood.BeagleDataLikelihoodDelegate.<init>(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.createTreeDataLikelihood(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.parseXMLObject(Unknown Source)
at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.parse(Unknown Source)
at dr.app.beast.BeastMain
BEAST has terminated with an error. Please select QUIT from the menu.
.<init>(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)


Jennifer Questel

unread,
Aug 22, 2022, 3:48:39 PM8/22/22
to beast-users
Hi All,

I cannot get BEAST to see the BEAGLE library. I was able to successfully load it from source and have the folder "beagle-lib" located in the same root directory as the BEAST program. Is there a way I can manually tell BEAST where the beagle library is located (I'm on a Mac)? 

error message from BEAST:

INFO:   BEAGLE function, create, returned error code -6 (No resource matches requirements)
Fatal exception: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
java.lang.RuntimeException: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.

Farman, Mark L.

unread,
Aug 22, 2022, 3:53:28 PM8/22/22
to beast...@googlegroups.com
Hi Jennifer,

I am sorry that you still did not get this sorted out. I suggest you install BEAST 2.6.7. It will run without the BEAGLE libraries.

Mark


CAUTION: External Sender

SIPOSETU MIHLE LELETHU MAZITSHANA

unread,
Aug 22, 2022, 6:00:57 PM8/22/22
to beast...@googlegroups.com
Hi Jennifer,

I had the same issue with trying to build a BEAGLE library on MacOS Monterey, you can try the new version of beagle https://github.com/beagle-dev/beagle-lib/releases/tag/v4.0.0. It still won't find the library when you open Beast from the GUI but it should find it when you use the terminal version of Beast, I'm not sure why that is. Goodluck. 

Regards,
Siposetu Mazitshana





--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.

Disclaimer - This e-mail is subject to UWC policies and e-mail disclaimer published on our website at: https://www.uwc.ac.za/disclaimer


Jennifer Questel

unread,
Aug 22, 2022, 8:27:11 PM8/22/22
to beast...@googlegroups.com
Still no luck with using BEAST 2.6.7 from the terminal. It still won’t run even without BEAGLE. When installing BEAGLE, it only lets me install it on my hard drive (Macintosh HD) and I cannot specify another location to install the library other than a removable drive. So I installed it on a flash drive to see what files are being installed and I get two folders: Library and usr. Library contains a subfolder called “Receipts" which contains "com.Humanity.BEAGLE…” files (10 files total). “usr” has two subfolders: “include” and “lib”. 

When I navigate to Macintosh HD, the “Receipts" folder does not contain any of the “com.Humanity.BEAGLE…” files and I do not see a “usr” folder. To me it seems BEAGLE is not installing properly on Monterey… I’ve tried pasting the two library folders to the directory that contains the other BEAST applications and it still doesn’t recognize the library. 

I’ve had BEAST up in running in minutes on my PC but I’m going on a week of trying to get this to work on my Mac which is a much more powerful machine - I have a large dataset to run. 

Any other suggestions? 

You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/9ykdlbs-GxA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beast-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beast-users/CAL2cbBHACtwiG89T0rVV5TcgYiqv%3DKyycQ29Tgznzzd70OpMMQ%40mail.gmail.com.

Farman, Mark L.

unread,
Aug 22, 2022, 8:32:51 PM8/22/22
to beast...@googlegroups.com
Did you update your $PATH environment variable so the latest installation is loaded first? If not, it’s still trying to run the earlier version. Try that and if still no joy, run from the GUI.


On Aug 22, 2022, at 8:23 PM, Jennifer Questel <jenn.q...@gmail.com> wrote:

CAUTION: External Sender

Pfeiffer, Wayne

unread,
Aug 22, 2022, 8:35:23 PM8/22/22
to beast...@googlegroups.com, Pfeiffer, Wayne
Hi Jennifer,

If your analysis will take less than 1,000 core hours, you could do it for free via the CIPRES gateway:


If it will take more time than that, you would need to get a subscription at modest cost.

Good luck!

Wayne

Jennifer Questel

unread,
Aug 22, 2022, 9:31:35 PM8/22/22
to beast...@googlegroups.com
Hi Mark,

I’m not sure how to update the $PATH.

Using: sudo nano /etc/paths I get:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

Do I have to add the location where I moved the Library and usr folders to?

Farman, Mark L.

unread,
Aug 22, 2022, 10:45:03 PM8/22/22
to beast...@googlegroups.com
Hello again Jennifer,

Welcome to the esoteric world of unix.

1. If you don’t already have a .bash_profile file in your home directory (yes, the period before bash is supposed to be there), then use pico/nano/vim to create one and include the line:

export PATH=/explicit/path/to/beast\ 2.6.7/bin:$PATH  (where /explicit/path/to/beast\ 2.6.7/bin is the actual path to the beast executables on your system)

(if you already have a .bash_profile, just add the above to a new line)

2. save the file and close it

3. then activate the new profile using:

source .bash_profile

4. then type:

beast

This should start a run and popup a dialog window asking you to select an .xml file. The version of the program will be listed.

This profile will be loaded every time you start a new shell, so you will not need to go through these steps again.

Good luck,

Mark



CAUTION: External Sender

Farman, Mark L.

unread,
Aug 23, 2022, 2:06:57 PM8/23/22
to beast...@googlegroups.com
p.s. You can also run a one-time export command in the shell (see attached).



CAUTION: External Sender

Jennifer Questel

unread,
Aug 23, 2022, 5:16:52 PM8/23/22
to beast...@googlegroups.com
Thanks Mark, that worked!! I have to make sure I’m loading the .xml file that’s located in the “bin” folder or else the program won’t run - otherwise it gives me the error associated with Beagle. 

So the next question is how do I get Beast to use more threads when calling up the program like this? I was originally doing it by cd’ing into the “bin” directory and using “beast -threads 8 beast.xml” but when I do it this way I still get the Beagle error. The point of finding a solution to these install issues was so I can utilize the multicore processor of the M1 Max over my PC that runs it with 1 core.

Thanks for your help! 
Jenn



On Aug 22, 2022, at 6:50 PM, Farman, Mark L. <mark....@uky.edu> wrote:

p.s. You can also run a one-time export command in the shell (see attached).

<PastedGraphic-1.png>

Marc Suchard

unread,
Aug 24, 2022, 12:14:19 PM8/24/22
to beast-users
To the best of my understanding, these are not issues with BEAGLE.   BEAGLE v4 on Mac is now a universal build that supports x86 and ARM64 execution automatically.  Rather, the issues seem to be related to Apple changing the default search paths on M1 systems when executing BEAST through the GUI application.    I have found a patch that works and expect to provide an updated BEAST release relatively soon.   In the meantime, here's how one can make the patch on their local computer:

1. Open in Finder the directory that contains the BEAST v1.10.4.app
2. Control-click to Show Package Contents
3. Open in a text editor Info.plist
4. Change this line:
       <string>-Xmx2048M</string>
   to now read
        <string>-Xmx2048M -Djava.library.path=/usr/local/lib</string>
5. Save and re-execute BEAST v1.10.4.app

As far as I can tell, these issues do not arise when using the command-line script `beast` since that script already adds the necessary java.library.path VM option.

best, Marc

Jennifer Questel

unread,
Aug 24, 2022, 3:33:33 PM8/24/22
to beast...@googlegroups.com
Thank you Marc!! That worked perfectly!  

Farman, Mark L.

unread,
Aug 24, 2022, 10:48:46 PM8/24/22
to beast...@googlegroups.com
Thanks Marc. I learned something new too. It’s all in the paths…

Mark L. Farman 
Professor, Department of Plant Pathology
Sent from my iPhone

CAUTION: External Sender

Reply all
Reply to author
Forward
0 new messages