Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding to the package managers? #153

Open
Foadsf opened this issue Jul 16, 2018 · 13 comments
Open

adding to the package managers? #153

Foadsf opened this issue Jul 16, 2018 · 13 comments

Comments

@Foadsf
Copy link

Foadsf commented Jul 16, 2018

I just checked the Repology page of this project. Unfortunately there are none of the package managers for windows and mac have this library. It would be a great help if it could be added to some, for example Chocolatey and/or Scoop for Windows, and HomeBrew and/or MacPorts for macOS.

@jrprice
Copy link
Owner

jrprice commented Jul 23, 2018

Agreed, but this is something that will require external contributors who have experience with these package managers to do (as I personally have neither the experience nor the time right now).

I think @athas was looking at writing a homebrew formula at some point but not sure if that went anywhere.

@athas
Copy link

athas commented Jul 23, 2018

I did try writing a Homebrew formula, but encountered weird LLVM-related errors that I did not understand. Maybe I should try again.

@athas
Copy link

athas commented Jul 27, 2018

I can't even figure out how to compile oclgrind on macOS in the first place, apparently. First, I have installed LLVM via Homebrew. It appears to be version 6.0.1. The oclgrind build instructions state that I should run cmake with LLVM_ROOT set to the "path to the LLVM installation". Where is that? cmake complains that it cannot find a package configuration file unless I set LLVM_ROOT to a directory containing LLVM's CMakeLists.txt, but when I set it to e.g. /usr/local/Cellar/llvm/5.0.1/share/cmake/modules I get this grammatically incomprehensible error from cmake:

-- Found LLVM
-- Using LLVMConfig.cmake in: /usr/local/Cellar/llvm/5.0.1/share/cmake/modules/
CMake Error at CMakeLists.txt:56 (if):
  if given arguments:

    "VERSION_LESS" "3.9"

  Unknown arguments specified


-- Configuring incomplete, errors occurred!
See also "/Users/athas/repos/oclgrind/CMakeFiles/CMakeOutput.log".


installation intructions at

@jrprice
Copy link
Owner

jrprice commented Jul 27, 2018

Are you using CMake version older than 3.0 by any chance? Looks like VERSION_LESS may have not been introduced until 3.0.2, which would explain the weird error message. I guess I need to bump the minimum CMake version if that's the case.

@athas
Copy link

athas commented Jul 27, 2018

If I use the following simple formula for Homebrew, then apparently the environment magic gets set up correctly and Homebrew can start compilation:

class Oclgrind < Formula
  desc "OpenCL device simulator and debugger"
  homepage "https://github.com/jrprice/Oclgrind"
  url "https://github.com/jrprice/Oclgrind/archive/v18.3.tar.gz"
  sha256 "90518d47573e64c6c28e173dc6f10c4e0ca53a99543ef2f1afaac1cbf725fe90"

  depends_on "cmake" => :build
  depends_on "llvm" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    system "#{bin}/oclgrind", "ls", "-l"
  end
end

But the build fails for terrifying reasons (external link due to size): https://paste.fedoraproject.org/paste/LIHFJ-ycqtWgV0V9OnbNNg

@athas
Copy link

athas commented Jul 27, 2018

My cmake is 3.12.

@jrprice
Copy link
Owner

jrprice commented Jul 27, 2018

Weird, same formula seems to work fine for me.

Those linker errors look bizarre, haven't seen anything like that before...

@athas
Copy link

athas commented Jul 27, 2018

It's possible my Homebrew setup is broken. I seem to recall having a messed up LLVM before (from having multiple versions installed simultaneously - and while my C++-fu has weakened, that could look like stale object files).

@athas
Copy link

athas commented Jul 27, 2018

Alright, after reinstalling everything, the formula works. I'll submit it to Homebrew later tonight.

@athas
Copy link

athas commented Sep 20, 2018

It's in Homebrew now.

@athas
Copy link

athas commented Jun 14, 2019

I'm now also trying to add it to NixOS. However, the latest release of Oclgrind does not work with LLVM 7. Could we have a new release soon, please? (NixOS is fortunately flexible enough that it's trivial to have different LLVMs installed concurrently, but it's a waste of disk space.)

@jrprice
Copy link
Owner

jrprice commented Jun 21, 2019

However, the latest release of Oclgrind does not work with LLVM 7. Could we have a new release soon, please?

Sure. I'll aim to release shortly after the LLVM branches for the 9.0 release (in ~1 month) so that we can support that as well.

@athas
Copy link

athas commented Aug 5, 2019

I got Oclgrind added to NixOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants