New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #18913 (closed defect: fixed)

Opened 4 years ago

Last modified 9 months ago

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: css@…
Port: gnuplot

Description (last modified by macsforever2000@…) (diff)

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

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

Change History

comment:1 Changed 4 years ago by macsforever2000@…

  • Description modified (diff)

comment:2 Changed 4 years ago by jmr@…

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

comment:3 Changed 4 years ago by css@…

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 4 years ago by css@…

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 4 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

comment:6 Changed 3 years ago by jmr@…

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

Changed 13 months ago by mojca.miklavec.lists@…

Patch to add +emacs and specify an explicit lispdir

comment:7 Changed 13 months ago by mojca.miklavec.lists@…

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 13 months ago by mojca.miklavec.lists@…

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 13 months ago by mojca.miklavec.lists@…

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 13 months ago by mojca.miklavec.lists@…

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 13 months ago by mojca.miklavec.lists@…

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 9 months ago by macsforever2000@…

  • Status changed from new to closed
  • Resolution set to fixed

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

Note: See TracTickets for help on using tickets.