To build an example program using GHC, type: On Mac OS X Yosemite and above, vecLib is now called Accelerate. To load hmatrix using GHCI, you need to add the directory containing the gsl shared library to your LD_LIBRARY_PATH:Įxport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib You might also have to edit cc-options and ld-options to look in your ports directory: Next, edit hmatrix.cabal to refer to the appropriate versions of BLAS and LAPACK: You can also download it from the darcs repository as follows: The most recent version of hmatrix is available on HackageDB. Did find: /opt/local/lib/libgsl.dylib: mach-o, but wrong architecture) so/.DLL for: gsl (dlopen(/opt/local/lib/libgsl.dylib, 9): Otherwise you'll get the following error when you try to use hmatrix: Sudo port upgrade -enforce-variants gsl +universal If you're using the 32-bit Haskell Platform and your MacPorts installation defaults to 64-bit binaries you want MacPorts to build universal binaries of gsl using: They appear to work fine with hmatrix, though I didn't test very much. LAPACK, however, is already installed on MacOS X 10.4/10.5, namely in the vecLib (10.4) or Accelerate (10.5) frameworks. You can get GSL and BLAS from DarwinPorts: The hmatrix package requires working versions of GSL, BLAS and LAPACK. This may take several hours to bootstrap on a slow machine. No sure why? Assuming that you have uninstalled any other versions of ghc, type: We can use the port search command to find something specific.First, you will want to install GHC using MacPorts, not the standalone installers. To see a gigantic list of all available packages, open Terminal, type port list and press Enter.ģ. To install some Linux apps on macOS with MacPorts, we will first need to search for the relevant programs.ġ. If that command returns “MacPorts 2.4.1” and provides a slightly different-looking command prompt, then you’re ready to rock! Install Linux Apps with MacPorts Open a new Terminal window and run the command port. Install the package from your Downloads folder.ģ. At the time of publication, there is no version of MacPorts for Apple’s newest OS, High Sierra.Ģ. Make sure you scroll down to choose the version that matches your version of macOS. Download the latest release of MacPorts from GitHub. If you already have the Xcode and the developer tools installed, you can jump right to this step.ġ. Wait for the files to download and install. Open Terminal and use the command below to trigger the installation of macOS’ developer tools:ģ. While you can run most of the MacPort commands without Xcode, you won’t be able to run many of the packages until you install it. You can download Xcode from the Mac App Store or Apple’s developer website. MacPorts requires the latest version of Xcode for your OS version. You can also use MacPorts to install open-source software like GIMP. Mac users won’t find common command-line tools like nmap or wget, and there’s no native package manager on the Mac to provide them. If you read our post on Homebrew, you know that macOS is missing some “standard” Linux terminal commands out of the box. This saves you the trouble of downloading repositories from GitHub and building software from source packages while still getting access to a wide range of Linux’s best command-line tools and GUI applications. When you find what you need, MacPorts downloads and installs the appropriate software and dependencies in the right place. Like any package manager, MacPorts searches a library of downloadable software. Most of these applications are open-source, command-line utilities, but there are a fair share of “real” open-source, GUI-based applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |