Fail to `(require "COCOA")` with Mac ports Clozure Common Lisp - cocoa

I have installed the package ccl with Mac ports. Now I want to use the Cocoa bridge.
Welcome to Clozure Common Lisp Version 1.8 (DarwinX8664)!
? (require "COCOA")
> Error: Permission denied : #P"/opt/local/share/ccl/1.8/temp bundle64.app/Contents/252752233492590994.tem"
> While executing: %CREATE-FILE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
If I start ccl64 with sudo it works all right. But I would like to be able to do this as a normal user. How should I do it?

svn co http://svn.clozure.com/publicsvn/openmcl/release/1.8/darwinx86/ccl
while in ~ is probably the most straightfoward way to achieve what you want.
If you'd like to work with MacPorts to manage ccl (instead of the svn method above), then run
sudo chown -R $USER /opt/local/share/ccl
Note that the latter case does make me a bit uncomfortable, because if you try to sudo port uninstall ccl, MacPorts does not completely remove the share/ccl directory, presumably because the (require :cocoa) call adds compiled binaries to that directory that Macports is not tracking.
To get the MacAppStore version to work, you'd probably need to find the ccl binary buried inside the ccl.app directory, and launch that for slime. Might not be a bad way to go either.
Note that any way you do this, once you (require :cocoa), you'll have a separate cocoa listener pop up while slime is running. I just move it off to the side once it opens. If you find a way to suppress this listener window after (require :cocoa), I'd be interested to know that.
But I'd recommend the first (svn) method. That's the one I use with slimv, and it's the one that Clozure recommends on their downloads page.

If you are on a Mac, the easiest way to run Clozure CL is to load it from Apple's Mac App Store.
https://itunes.apple.com/de/app/clozure-cl/id489900618?mt=12
That way it gets installed in the Applications folder and running the Cocoa-App is no problem, since it is provided. But then you would run the Cocoa-based IDE version of CCL.
If you install CCL from MacPorts, I guess that the App is not existing. You would need to have the rights for the directory to create the necessary files.
Otherwise I would just install a fresh CCL from Clozure's repository:
http://ccl.clozure.com/download.html

Related

How to install a program for mac, from github (no brew)

I would like to play with Dima Kogan vnlog program for testing ; my computer is mac os.
There is a repository on Github hosting the code, with 3 branches, one of them named : build-osx.
https://github.com/dkogan/vnlog/branches
I dont see any file or documentation related to installation.
What would be the process to get it working on my computer (in such a way I would be able to uninstall it if needed) ? what are the tools needed ? That's something I have never never done yet.
(I don't have any git/subversion installed, if that matters).
Edit1, after first anwser.
Repository downloaded ; looks like "vnl-filter", "vnl-sort", "vnl-join" tools work ; yet "vnl-align" doesn't : Can't locate Text/Table.pm in #INC (you may need to install the Text::Table module) (#INC contains: /Library/Perl/5.30/darwin-thread-multi-2level […]) at /Users/gilles/Downloads/vnlog-master/vnl-align line 5. BEGIN failed--compilation aborted at /Users/gilles/Downloads/vnlog-master/vnl-align line 5.
I believe some perl module is missing (or not found ?) for this tool. Any easy way to install it ?
I suspect the current installation process ("Install on non-Debian boxes") differs from the three-years old build-osx branch:
Most of this is written in an interpreted language, so there’s nothing to build or install, and you can run the tools directly from the source tree:
$ git clone https://github.com/dkogan/vnlog.git
$ cd vnlog
$ ./vnl-filter .....
The python and perl libraries can be run from the tree by setting the PYTHONPATH and PERL5LIB environment variables respectively.
For the C library, you should make, and then point your CFLAGS and LDLIBS and LD_LIBRARY_PATH to the local tree.
So if your Mac has the prerequisites set up, it should work after a clone.

package-refresh-contents hangs at Contacting host: elpa.gnu.org:80

I'm running Emacs 24.4 for Windows (installed through Chocolatey) and trying to install CIDER.
When I run M-x package-install [RET] cider [RET], I get [No match]. When I run M-x package-refresh-contents [RET], it hangs on Contacting host: elpa.gnu.org:80.
~/.emacs.d is populated with the GitHub repo recommended by braveclojure.com (here). I've reinstalled Emacs and I'm still getting the same problem.
I had this same problem on emacs ELPA wiki they say to set un ELPA you have to modify the emacs init file located at ~/.emacs or _emacs or ~/.emacs.d/init.el for me it was ~/.emacs-live.el since I have this version.
I just updated that file with the following:
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
Seems that I needed the configuration from where ELPA is going to look for packages.
After that i just ran M-x package-refresh-contents [RET] and M-x package-install [RET] cider [RET] that installed cider.
This guide fixed it for me: http://www.lonecpluspluscoder.com/2015/08/adding-tls-support-to-emacs-24-5-on-windows/
Basically go to: http://sourceforge.net/projects/ezwinports/files/, grab the gnutls library and just uncompress the archive at the root of your Emacs directory.
Afterwards, doing list-packages became near-instant for me. Using Emacs 24.5.1.
I had the same problem with Emacs 24 in Ubuntu 16.04 and nothing seemed to solve the problem. Finally, installing Emacs 25 solved the problem.
New Emacs packages are available here
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
apt-get install emacs27
The problem is that the ELPA package signing key has expired. A new Emacs version will include a new key. Note that currently (2020 Oct) there is Emacs 27 available for Ubuntu 16.04.
Also make sure that you use https urls (and not plain http).
Another possibility may be to install new keys to an older Emacs version.
Windows binaries may also be available somewhere.
Other than setting up your package archives, like a previous answer mentions (FWIW I'm using HTTPS directly)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")))
one might encounter another problem but with the same symptom of getting stuck at "Contacting host" due to running gpg in batch mode to verify the packages, but needing some input. You can disable that via
(setq package-check-signature nil)
Stack Overflow sometimes deletes chats. Fortunately it seems like I've still got access to a read-only version of the transcript.
From my perspective we didn't get a satisfactory answer. Here are the highlights:
We determined that the variable package-archives contained only GNU ELPA.
After discovering this, the OP wrote
I edited the package.el file. It works!
I suggested that editing a core Emacs Lisp file is not a good solution, but didn't hear anything back from the OP.
Since the referenced init.el file tries to add MELPA, I think there's something else going on. Perhaps the .emacs.d/ directory is in the wrong location, for example.
Editing package.el is certainly not a good solution. Doing more work to determine why the config isn't being properly loaded would be a good approach.
I have faced this issue on Emacs 24.5.1.
I searched here in SO and outside SO, nothing worked for me. I had to circumvent the problem by installing a newer version of Emacs: emacs25.

LibreOffice/OpenOffice "kinda portable / static" installation on FreeBSD (webhost)?

I would like to use a headless OpenOffice instance (to interface it with PHP) on my webhost's server. Of course I can't install stuff there with the usual package mechanism, since I am just an ordinary user. However, I would be allowed to run (more or less) whatever I want, and I have ssh access.
Is there a way to install LibreOffice/OpenOffice in some directory under my home directory, and also get all dependencies there? It would be advantageous if I didn't have to run the actual build on the webhost, since it would clog the server... But maybe I could manage to build it on some other FreeBSD host... I would want the build to be as static as possible, i.e. with as few outside dependencies as possible.
Can this be done?
For the record, the webhost is running FreeBSD 8.2-RELEASE-p3 on amd64.
Hmm, you may try to install ports-mgmt/pbi-manager port (it's basically a bunch of shellscripts) and use pbi_add command to install libreoffice PBI.
PBI packages contain all necessary dependencies and, AFAIK, can be installed without root permissions.

Installing Ruby 1.9 on OS X Leopard using /usr/local - RVM issues

I have to run a Rails (3.0.6) app locally that requires Ruby 1.9.2 (plus Mongo). I'd like to install Ruby 1.9.2 alongside my existing 1.8.7 and be able to swap between them as necessary. I prefer installing to usr/local over Macports etc. Any recommendations? I've tried installing RVM but this has proved such a pain on OS X I'd rather avoid that too.
Is there another way of running multiple Ruby versions (maybe with a prefix like this)? I only need to switch to 1.9 for this project. Or has anyone a good solution to the known OS X/RVM install issues? Specifically, on Tiger/10.4 bash doesn't support errtrace.
Update: solved with a new RVM install script: see RVM on OS X 10.4 - possible?.
RVM really is the easiest solution, and I would highly recommend you try and work that issue out first.
The only bit of advice is to make sure you configure your PATH variable to include /usr/local/bin before everything else. In your .profile or .login (depending on your shell), you should have it towards the bottom, in case there is any other lines configuring PATH as well, and then for the Bourne shell family:
export PATH="/usr/local/bin:$PATH
or for the C shell family:
set path = (/usr/local/bin $PATH)
Running ./configure alone should make it install into /usr/local, but you can explicitly state so with
./configure --prefix=/usr/local
Install Ruby from source and it will default to /usr/local/bin. Adjust your path, the #! line, or your /usr/local/bin/ruby source.rb as necessary to switch between Apple's installation of Ruby, and the one you add.
You can force a new base directory using ./configure --prefix=/... where '...' is whatever path you want. Again, once the files are installed, you can adjust the executing Ruby with one of the above methods.
Do not attempt to remove Apple's installed Ruby. It's there for their use, not for our convenience, and Apple uses it to provide some functionality. Messing with it or removing it could break things, and you probably wouldn't notice for a while.
RE: RVM, It really is the preferred way to install a user Ruby. I have it on two Macs, and a handful of different Linux boxes and the only time I had trouble was with a secured machine behind firewalls, but I can't blame RVM for those problems when it couldn't see the internet at all. And, yes, I got it working nicely, I just had to insert the manually downloaded Ruby archives into the ~/.rvm/archives directory.
If you are having problems and want to use it, it might help to temporarily strip your startup scripts, or create a temporary user, and see what happens. Additionally, the author has been very responsive and helpful the few times I've asked him questions. Contact him at:
If you still cannot find what an answer to your question, find me 'wayneeseguin' in #rvm on irc.freenode.net:
http://webchat.freenode.net/?channels=rvm
If you download the source and compile it, it should install into /usr/local by default, or you can
./configure --prefix=/usr/local
just to be sure.
Actually, compiling and installing ruby from source is an easy way to be sure you have the latest version, especially if you use git and github:
https://github.com/ruby/ruby

How do I use ruby-debug inside Emacs?

I know Emacs has some sort of integration with gdb (though I never used it) to jump through files as you debug a program. I'd like to do the same with Ruby programs.
As erenon said, use ruby debug, which provides a library for emacs that lets you use it just as gdb.
Install rdebug by issuing this command on your terminal(the sudo is optional, depending on your system):
<sudo> gem install ruby-debug
You then need to download the ruby-debug-extra file from rubyforge, and install it in the standard way.
sh ./configure
make
make test # optional, but a good idea
sudo make install
This gives you the elisp files for the interaction with rdebug, plus documentation for ruby-debug that can be viewed from within emacs.
AJ
There is another emacs to ruby-debug interface. See https://github.com/rocky/emacs-dbgr/wiki .
More generally, it works with other ruby debuggers and other debuggers in general.
You may want use rdebug.
I am getting "Cannot open load file: gdb-ui" in GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS apple-appkit-1038.11) of 2009-10-31
I was stuck with same problem with gdb-ui, but I found the solution: I downloaded gdb-ui.el from here and put it into ruby-debug-extra/emacs dir... then I've adjusted Makefiles to point to this file before any other rdebug*.el files. After this step you'll get make working. Since I'm using emacs-snapshot and gdb mode is available already in my emacs environment, this issue is only about to build rdebug mode. After this I've installed it with "sudo make install" and it works perfectly :) Don't forget to add (require 'rdebug) to your ~/.emacs or whatever else you use to bootstrap your config.
The chosen strategy can be made to work, although texi2html and texinfo were not enough on my system, but I stopped pursuing this strategy without installing the extra packages.
Here's what I did: download ruby-debug-extra-0.10.4.tar.gz from http://rubyforge.org/frs/?group_id=1900&release_id=28306, untar it, but DON'T do the whole configure/make/blah/blah thing. Instead, I simply copied the 'emacs' directory to ~/.emacs.d/rdebug, and then added to my ~/.emacs.d/init.el file (you can also use your ~/.emacs file):
(add-to-list 'load-path "~/.emacs.d/rdebug")
(autoload 'rdebug "rdebug" "ruby-debug interface" t)
This won't byte-compile it, I didn't care. I prefer this solution because I got really annoyed that the packages forces you to install the docs.

Resources