Opened 15 years ago

Closed 12 years ago

#18913 closed defect (fixed)

gnuplot installation requires a specific version of Emacs.app

Reported by: marc.shapiro@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: cssdev
Port: gnuplot

Description (last modified by mf2k (Frank Schima))

installing gnuplot fails with my Emacs.app installation. It is strange that it requires Emacs and even stranger that it requires a specific Emacs installation

Making all in lisp
emacs -batch -q -no-site-file -l ./dot.el -f batch-byte-compile gnuplot.el
Warning: arch-dependent data dir (/Volumes/Emacs/Emacs.app/Contents/MacOS/libexec/emacs/22.1.50/powerpc-apple-darwin8.10.0/) does not exist.
Warning: arch-independent data dir (/Applications/Emacs.app/Contents/Resources/share/emacs/22.1.50/etc/) does not exist.
Wrong type argument: stringp, nil

Attachments (2)

patch-gnuplot-emacs.diff (1.3 KB) - added by mojca (Mojca Miklavec) 12 years ago.
Patch to add +emacs and specify an explicit lispdir
patch-gnuplot-emacs2.diff (2.6 KB) - added by mojca (Mojca Miklavec) 12 years ago.
The second patch which removes destroot.destdir (an optional second part cleans up old files that might be still around), see also #32872

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Cc: css@… added
Owner: changed from macports-tickets@… to pguyot@…
Port: gnuplot added

comment:3 Changed 15 years ago by cssdev

That looks like it might be hard-coded to use Aquamacs. What's your emacs environment? I'm curious where those directories come from ... is it your emacs environment or your build environment for gnuplot?

comment:4 Changed 15 years ago by cssdev

What's your output from "which emacs"? It's not clear exactly which emacs binary is being used during the port's build process.

comment:5 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:6 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from pguyot@… to macports-tickets@…

Changed 12 years ago by mojca (Mojca Miklavec)

Attachment: patch-gnuplot-emacs.diff added

Patch to add +emacs and specify an explicit lispdir

comment:7 Changed 12 years ago by mojca (Mojca Miklavec)

I added a patch which should solve #27996 and #33554, but I'm not sure if it also solves the particular issue in this ticket.

Maybe one also needs

configure.env EMACS=${prefix}/bin/emacs

if another emacs takes precedence in PATH. It seems to me that lispdir is determined with something like

$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out

but I'm not sure how to test all the different combinations and border cases.

comment:8 Changed 12 years ago by mojca (Mojca Miklavec)

And, as noted in my email to the development mailing list, some ports do the following:

variant emacs_app description {Use this package with Emacs.app} {
    depends_lib-delete  path:bin/emacs:emacs
    depends_lib-append  path:${applications_dir}/Emacs.app/Contents/MacOS/Emacs:emacs-app

    set dir_info    ${applications_dir}/Emacs.app/Contents/Resources/info
    configure.env   EMACS=${applications_dir}/Emacs.app/Contents/MacOS/Emacs
    configure.args  --with-lispdir=${applications_dir}/Emacs.app/Contents/Resources/site-lisp/${name} \
                    --infodir=${dir_info}
}

so we would need that extra code to be able to support people with Emacs.app instead of plain emacs. Is that needed?

comment:9 Changed 12 years ago by mojca (Mojca Miklavec)

Replying to myself: there is currenty one problem:

> sudo port activate gnuplot @4.6.0_0+luaterm+pangocairo
--->  Computing dependencies for gnuplot
--->  Deactivating gnuplot @4.6.0_1+emacs+luaterm+pangocairo
--->  Cleaning gnuplot
--->  Activating gnuplot @4.6.0_0+luaterm+pangocairo
Error: Target org.macports.activate returned: Image error: /opt/local/share/emacs/site-lisp/gnuplot-gui.el already exists and does not belong to a registered port.  Unable to activate port gnuplot. Use 'port -f activate gnuplot' to force the activation.
Warning: Failed to execute portfile from registry for gnuplot @4.6.0_0+luaterm+pangocairo
--->  Activating gnuplot @4.6.0_0+luaterm+pangocairo
Error: port activate failed: Image error: /opt/local/share/emacs/site-lisp/gnuplot-gui.el already exists and does not belong to a registered port.  Unable to activate port gnuplot. Use 'port -f activate gnuplot' to force the activation.

The following line has to be deleted before applying this patch:

destroot.destdir            prefix=${destroot}${prefix}

See also #32872.

Changed 12 years ago by mojca (Mojca Miklavec)

Attachment: patch-gnuplot-emacs2.diff added

The second patch which removes destroot.destdir (an optional second part cleans up old files that might be still around), see also #32872

comment:10 Changed 12 years ago by mojca (Mojca Miklavec)

The patch patch-gnuplot-emacs2.diff should be able to fix the issue with files not belonging to any package. The second part (deleting files) is optional and I leave it up to other developers whether to include it or just tell users to remove files manually when present (I don't expect many users to be hit).

The patch for #32872 is a bit related, but I need some feedback/brainstorming about that one first before writing a patch.

comment:11 Changed 12 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Patch applied manually in r96463. No need for a revision increase.

Note: See TracTickets for help on using tickets.