Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394365 - app-emacs/jde doesn't need cedet if you are running a modern emacs
Summary: app-emacs/jde doesn't need cedet if you are running a modern emacs
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-11 20:15 UTC by Alex Bennee
Modified: 2011-12-13 17:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Don't depend on CEDET if we have a more modern emacs (0001-app-emacs-jde-cedet-dependancy-only-needed-for-older.patch,747 bytes, patch)
2011-12-11 20:16 UTC, Alex Bennee
Details | Diff
Updated patch, using emacs to find location of cedet files for build (0001-app-emacs-jdee-Fix-bug-394365-use-correct-cedet.patch,1.35 KB, patch)
2011-12-12 21:07 UTC, Alex Bennee
Details | Diff
Update to the updated patch (0001-app-emacs-jdee-Fix-bug-394365-use-correct-cedet.patch,1.35 KB, patch)
2011-12-12 22:06 UTC, Alex Bennee
Details | Diff
jde-2.4.1_pre20110622.ebuild (jde-2.4.1_pre20110622.ebuild,1.83 KB, text/plain)
2011-12-13 09:00 UTC, Ulrich Müller
Details
build.log (build.log,56.04 KB, text/plain)
2011-12-13 09:02 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Bennee 2011-12-11 20:15:50 UTC
cedet fails to build when you try and emerge jde which isn't surprising as it got merged into emacs at 23.2.

Reproducible: Always

Steps to Reproduce:
1. emerge a modern emacs (>= 23.2)
2. emerge app-emacs/jde
3. what cedet fail to compile
Comment 1 Alex Bennee 2011-12-11 20:16:53 UTC
Created attachment 295487 [details, diff]
Don't depend on CEDET if we have a more modern emacs

CEDET was merged into emacs at 23.2.
Comment 2 Alex Bennee 2011-12-11 23:08:17 UTC
Annoyingly that patch on it's own doesn't work as I need to somehow change the eant bindist call if a newer emacs exists to pass the correct CEDET path.
Comment 3 Ulrich Müller gentoo-dev 2011-12-12 04:03:35 UTC
There's also virtual/emacs-cedet which could be used in DEPEND.
Comment 4 Alex Bennee 2011-12-12 07:32:43 UTC
(In reply to comment #3)
> There's also virtual/emacs-cedet which could be used in DEPEND.

That would make more sense. However the cedet.dir variable passed to the jdee build will be different depending on which version of cedet you use. What's the best way to handle this in the ebuild?
Comment 5 Ulrich Müller gentoo-dev 2011-12-12 08:47:36 UTC
IIRC, cedet.dir is only used at build time? (Otherwise there would be a problem after each Emacs update.)

Then its location could be determined as follows:

    local cedet
    cedet=$(${EMACS} ${EMACSFLAGS} --eval '(princ (locate-library "cedet"))')
    cedet=${cedet%/*}			# get directory part
    [[ -n ${cedet} && -d ${cedet} ]] || die "CEDET not found"
Comment 6 Alex Bennee 2011-12-12 21:07:01 UTC
Created attachment 295601 [details, diff]
Updated patch, using emacs to find location of cedet files for build

Changes:

Use virtual/cedet
Use emacs to get location of cedet for build
Comment 7 Alex Bennee 2011-12-12 22:06:19 UTC
Created attachment 295611 [details, diff]
Update to the updated patch

It's virtual/emacs-cedet, not virtual/cedet
Comment 8 Ulrich Müller gentoo-dev 2011-12-13 00:44:43 UTC
I fear it's not so easy, at least I'm getting several errors during compilation:

     [exec] Compiling /var/tmp/portage/app-emacs/jde-2.4.0.1-r1/work/jde/build/lisp/jde-bookmark.el...
     [exec] 
     [exec] In toplevel form:
     [exec] jde-bookmark.el:33:1:Error: Cannot open load file: semantic-sb

The reason for these failures is that the names of CEDET's files were changed when it was included with Emacs. For example, cedet/semantic-sb.el has become cedet/semantic/sb.el. (AFAIR, the reason for this renaming was compatibility with 8+3 filenames on MS-DOS ...)

Looking into the SVN repository at <http://jdee.svn.sourceforge.net/viewvc/jdee/trunk/>, it seems that at least some of these problems have been addressed upstream. So maybe it's better to make a snapshot from there, instead of bothering with 2.4.0.1.
Comment 9 Alex Bennee 2011-12-13 08:36:04 UTC
(In reply to comment #8)
> I fear it's not so easy, at least I'm getting several errors during
> compilation:
> 
>      [exec] Compiling
> /var/tmp/portage/app-emacs/jde-2.4.0.1-r1/work/jde/build/lisp/jde-bookmark.el...
>      [exec] 
>      [exec] In toplevel form:
>      [exec] jde-bookmark.el:33:1:Error: Cannot open load file: semantic-sb

Bugger, I saw some stuff scroll past but they just looked like warnings to me. I shall have a closer look.

> The reason for these failures is that the names of CEDET's files were changed
> when it was included with Emacs. For example, cedet/semantic-sb.el has become
> cedet/semantic/sb.el. (AFAIR, the reason for this renaming was compatibility
> with 8+3 filenames on MS-DOS ...)
> 
> Looking into the SVN repository at
> <http://jdee.svn.sourceforge.net/viewvc/jdee/trunk/>, it seems that at least
> some of these problems have been addressed upstream. So maybe it's better to
> make a snapshot from there, instead of bothering with 2.4.0.1.

A app-emacs/jde-9999 for building straight out of the SVN?
Comment 10 Ulrich Müller gentoo-dev 2011-12-13 09:00:52 UTC
Created attachment 295637 [details]
jde-2.4.1_pre20110622.ebuild

(In reply to comment #9)
> A app-emacs/jde-9999 for building straight out of the SVN?

A snapshot is much preferred over a live ebuild. In fact, I've put a jde-2.4.1_pre20110622.tar.gz on Gentoo mirrors already, taken from <http://jdee.svn.sourceforge.net/viewvc/jdee/trunk/jdee/?view=tar&pathrev=254>.

My attempt of an ebuild is attached. I'm still getting one compilation error though (occuring several times):
Error: Symbol's function definition is void: jde-find-jde-doc-directory

Another question is why eant signals a successful build, in spite of these errors?
Comment 11 Ulrich Müller gentoo-dev 2011-12-13 09:02:19 UTC
Created attachment 295639 [details]
build.log

Here's the build.log for the ebuild from attachment 295637 [details].
Comment 12 Ulrich Müller gentoo-dev 2011-12-13 17:33:10 UTC
jde-2.4.1_pre20110622 committed to CVS. I had to add two more patches, one for the issue with jde-find-jde-doc-directory mentioned above, and another one to make it work with emacs-vcs-24.0.92.

Please test.