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

The Mac OS X installer puts the libraries in a 'strange' location. #3355

Open
jfdm opened this issue Aug 10, 2016 · 7 comments
Open

The Mac OS X installer puts the libraries in a 'strange' location. #3355

jfdm opened this issue Aug 10, 2016 · 7 comments

Comments

@jfdm
Copy link
Contributor

jfdm commented Aug 10, 2016

I installed Idris v0.12.2 using the official pkg installer on Mac OS X. Although idris is installed in /usr/local/bin. The result of running idris --libdir is:

/usr/local/share/x86_64-osx-ghc-7.10.3/idris-0.12.2/

Ideally the location should one of:

/usr/local/share/idris/

or

/usr/local/share/idris-0.12.2/

or

/usr/local/share/idris/0.12.2/

If Issue #3334 is addressed then this issue too would be addressed albeit from a user's perspective.

@LeifW
Copy link
Contributor

LeifW commented Aug 10, 2016

I think XDG dirs also provides a global option?

On Aug 10, 2016 8:54 AM, "Jan de Muijnck-Hughes" [email protected]
wrote:

I installed Idris v0.12.2 using the official pkg installer on Mac OS X.
Although idris is installed in /usr/local/bin. The result of running idris
--libdir is:

/usr/local/share/x86_64-osx-ghc-7.10.3/idris-0.12.2/

Ideally the location should one of:

/usr/local/share/idris/

or

/usr/local/share/idris-0.12.2/

or

/usr/local/share/idris/0.12.2/

If Issue #3334 #3334 is
addressed then this issue too would be addressed albeit from a user's
perspective.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3355, or mute the thread
https:/notifications/unsubscribe-auth/AABwJ_iWrr_kmv6XslkBCPMawa9NdwXUks5qefQ0gaJpZM4JhS8A
.

@jfdm
Copy link
Contributor Author

jfdm commented Aug 10, 2016

I do not know if XDG variables are respected on Mac OS X in the first place. Documentation on directory is not conclusive.

@jfdm
Copy link
Contributor Author

jfdm commented Aug 10, 2016

Ah looks like this is straightforward, we need to configure datasubdir for cabal as well as the prefix. So instead of:

cabal configure --prefix=/usr/local

we have instead

cabal configure --prefix=/usr/local --datasubdir='$pkgid'

I haven't tested it with pkgbuild yet., so will wait until I have done so before making a PR.

@LeifW
Copy link
Contributor

LeifW commented Aug 10, 2016

Nice find! I'm on a Mac w/ pkgbuild today, so I could test that out if you want.

@jfdm
Copy link
Contributor Author

jfdm commented Aug 10, 2016

If you want, that would be helpful. I just mothballed my mac and don't have the means to build Idris Idris from source on it anymore.

But will need to double check the default installation dirs for cabal for any other surprises.

@LeifW
Copy link
Contributor

LeifW commented Aug 10, 2016

On ghc 7.10.3, OSX 10.11.6, this all seems to work fine. Added a --datasubdir=idris-13.0 to the cabal configure line in mkpkg.sh, ran that script, and installed the produced idris.pkg.
I now have a /usr/local/bin/idris which reports a libdir of /usr/local/share/idris-13.0/. In there is the usual contents of libs/:
base/ contrib/ effects/ idrisdoc/ jsrts/ prelude/ pruviloj/ rts/

@LeifW
Copy link
Contributor

LeifW commented Aug 17, 2016

The Arch Linux Idris package leverages this same Cabal flag, too: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/idris#n29

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

No branches or pull requests

3 participants