Skip to content
This repository

Error under emacs23: Cannot open load file: cl-lib #600

Closed
mikecrowe opened this Issue March 22, 2013 · 14 comments

7 participants

mikecrowe Yann Hodique Jonas Bernoulli Paul Smith Yagnesh Raghava Yakkala. Leonardo Etcheverry Servilio Afre Puentes
mikecrowe

I'm using emacs23 (from Debian Squeeze.) I've just updated to magit master (via el-get) (bb59a49) and magit fails to compile:

In toplevel form:
magit.tmp.el:149:1:Error: Cannot open load file: cl-lib
mv magit.tmp.elc magit.elc #NO_DIST
mv: cannot stat `magit.tmp.elc': No such file or directory
make: *** [magit.elc] Error 1

(I believe that this was fixed as issue 44 but perhaps it was broken again as part of the tarsius/cl-lib branch merge.)

Yann Hodique
Owner
sigma commented March 22, 2013

It appears to be a bug of the magit recipe in el-get: magit now depends on the cl-lib package.
Actually, generally speaking it would probably be better if el-get was taking package.el dependencies into account instead of redeclaring them.

Yann Hodique sigma closed this March 22, 2013
mikecrowe

Thanks. I've submitted this as el-get issue #1120.

Takafumi Arakaki tkf referenced this issue in dimitri/el-get April 10, 2013
Closed

magit should depend on cl-lib for emacs23 #1120

Paul Smith

I'm still seeing this error with latest magit master with Emacs 24.1.1 which is only 10 months old or so. Is there a workaround and if so can it be added to the README.md so the rest of us can be enlightened :-)?

Jonas Bernoulli
Owner

If el-get for some reason doesn't install cl-lib before installing magit then the workaround would be to install cl-lib separately before installing magit. Also please mention in dimitri/el-get#1120 that you are still having problems. I don't use el-get so I don't know what exactly is going wrong, the recipe looks reasonable and mentions cl-lib.

Yagnesh Raghava Yakkala.
yyr commented April 29, 2013

I had the same problem. you need to reinstall magit. M-x el-get-reinstall magit. See. dimitri/el-get#1158 (comment)

Paul Smith

Sorry, but this is all assuming too much knowledge. I've been using GNU Emacs since the 1980's, and have written plenty of Emacs Lisp in the past. But I've never heard of el-get or cl-lib or these other items. In my stock Emacs 24.1.1 when I use M-x el-get TAB (or even M-x el- TAB) I get no completion so there is no such package available to me. Reading the NEWS file I discovered the new Emacs package-list / package-install, and there was a cl-lib package available, so I installed that but magit still won't build. There is no package named "el-get" available this way.

I understand the desire to use the newest features when developing, especially if there are advancements that make things easier for the programmer, but this comes at a cost for the user. If it's really not feasible to use the older, widespread capabilities until the new ones are readily available, please at least be sure to document clearly what someone with a standard Emacs installation needs to do to build the package.

Thanks!

Yagnesh Raghava Yakkala.
yyr commented April 29, 2013

@madscientist I think we are talking about el-get since OP has mentioned that he uses el-get as a package manager. el-get is not a inbuilt. Since you don't use el-get, your problem is whole separate issue.

Now it would be good to how you are trying to install magit on emacs 24.1.1. I think the best way to install magit is M-x package-install magit.

PS: I don't use package.el (ie., ELPA)

Paul Smith

Well, I wanted the to use the magit Github repo master HEAD. All I did was a "git clone" of the GitHub repo, cd'd into the directory, and typed "make". I got the same error as above. Should I open a new ticket?

BTW, there's no "magit" package: M-x package-install RET magit RET says "[No match]". This is true with both 24.1.1 and 24.3.50 (Ubuntu PPA). I guess package-install is the same as ELPA?

Leonardo Etcheverry

I tried to install magit on 24.1.1 a couple of days ago and ran into this issue.
I don't use package.el, I regularly build magit HEAD myself (and manually handle all its dependencies.)

I might be wrong, but I think there is an issue with the current Makefile as is, at least for older versions of Emacs where cl-lib is not available. Now that magit requires cl-lib to compile and emacs is being invoked with -q --no-site-init during build, make will always fail since there is no way for emacs to load cl-lib (whether one installed the cl-lib package or not.)

One way around this issue is placing a copy of cl-lib.el in magit's root so that cl-lib is present in the load-path during build time. Whether this build-time cl-lib dependency should be mentioned in the README or not, I'm not sure. It's gotten to the point where installing magit without a package manager is quite cumbersome anyway so I suspect most users will probably just install it through package.el (or el-get) and this problem becomes a non-issue.

Yagnesh Raghava Yakkala.
yyr commented April 29, 2013

@madscientist IMHO, yes, its better to open a new issue.

BTW, there's no "magit" package: M-x package-install RET magit RET says "[No match]".

you might want to put some thing like this in your init file to see 3rd party packages.

  (setq package-archives
          '(("gnu" . "http://elpa.gnu.org/packages/")
            ("marmalade" . "http://marmalade-repo.org/packages/")
            ("melpa" . "http://melpa.milkbox.net/packages/")))
Yann Hodique
Owner
sigma commented April 30, 2013

@legumbre this concerns me too, and we should probably do a better work at explaining how to build magit.
That said, there's a reason why the content of 'master' has not been released yet, it's because it still has such issues :)

I'm considering adding a "make deps" target that would download 3rd party dependencies. But since I don't want magit to start installing that stuff, it's only part of the answer. Maybe the right answer is to just give up on all this "make install" stuff. After all, I suspect people mostly just set their load-path locally to point to magit. And structures like Debian can very well independently package cl-lib and whatever other dependencies we might introduce.

In any case, the package distribution system is definitely becoming the "right" way to install magit, even if people are more than welcome to install it the way they want (and deal with the pesky details :))

Yann Hodique
Owner
sigma commented April 30, 2013

@legumbre by the way, instead of copying cl-lib.el to the current directory, a probably cleaner approach is to use the EFLAGS variable to point to it. As in:

make EMACS=path/to/emacs EFLAGS='-l path/to/cl-lib.el' clean all test
Servilio Afre Puentes

@sigma alternatively make install could build a local package and use package.el to install it, what would pull in the needed dependencies.

Leonardo Etcheverry

@sigma

That said, there's a reason why the content of 'master' has not been released yet, it's because it still has such issues :)

Fair enough!

Maybe the right answer is to just give up on all this "make install" stuff. After all, I suspect people mostly just set their load-path locally to point to magit.

I arrived at the same conclusion though I missed to take into account OS-level packaging.

In any case, the package distribution system is definitely becoming the "right" way to install magit, even if people are more than welcome to install it the way they want (and deal with the pesky details :))

Couldn't agree more. Packaging is the way forward.

@sigma ha! I didn't know about EFLAGS. That is indeed cleaner and the right thing to do for us luddites. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.