From: davide.restivo--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 45934@debbugs.gnu.org
Subject: bug#45934: native-comp - Dylib ID of ELN files not optimal
Date: Sun, 17 Jan 2021 11:13:25 +0100 [thread overview]
Message-ID: <EDAEF3DD-6B4E-4ED9-A7B8-8FB4F236DF42@yahoo.it> (raw)
In-Reply-To: EDAEF3DD-6B4E-4ED9-A7B8-8FB4F236DF42.ref@yahoo.it
Hi,
I'm currently maintaining an Homebrew formula [1] for GNU/Emacs on macOS
and I have recently added to it support for the native-comp feature.
While doing this I have realised that current dylib IDs of the ELN files
might be improved to avoid an issue I have encountered.
Currently whenever and ELN file is generated, the dylib ID has the
following structure: /private/tmp/libgccjit-xxxxxx/fake.so. See below
examples:
Example_1:
Filename:
/usr/local/Cellar/emacs-head@28/28.0.50_1/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/4Corner-80465fd1980e15f97a4c37918242ae86-c113fb0ce90e32f79bf944d3da555eea.eln
dylib ID:
/private/tmp/libgccjit-3AyZly/fake.so
Example_2:
Filename:
/usr/local/Cellar/emacs-head@28/28.0.50_1/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/5x5-a61d71cfcb41ac534af48635fb74337a-d665a8dec895c4d242614826b692b6ba.eln
dylib ID:
/private/tmp/libgccjit-aVl48M/fake.so
The dylib IDs of two different ELN are unique (this is required by
macOS).
Homebrew compiles GNU/Emacs in a 'sandbox' directory and then it moves
the artifacts to the final directory location (i.e.
/usr/local/Cellar/emacs-head@28/28.0.50_1). While doing that it changes
the dylib ID of the ELN files. For example:
==> Changing dylib ID of /usr/local/Cellar/emacs-head@28/28.0.50_1/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/4Corner-80465fd1980e15f97a4c37918242ae86-c113fb0ce90e32f79bf944d3da555eea.eln
from /private/tmp/libgccjit-3AyZly/fake.so
to /usr/local/opt/emacs-head@28/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/fake.so
==> Changing dylib ID of /usr/local/Cellar/emacs-head@28/28.0.50_1/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/5x5-a61d71cfcb41ac534af48635fb74337a-d665a8dec895c4d242614826b692b6ba.eln
from /private/tmp/libgccjit-aVl48M/fake.so
to /usr/local/opt/emacs-head@28/Emacs.app/Contents/native-lisp/28.0.50-x86_64-apple-darwin19.6.0-280c4c724fff373c5b7192112ad4147c/fake.so
Since the tmp directory is stripped out and replaced with the
destination directory, as you can see, all of the ELN files ends up with
the same dylib ID, and this is not allowed on macOS. My suggestion here
would be to add the 'install_name' [2] flag to gcc during the ELN files
compilation replacing the 'fake.so' with the original .eln filename.
Thanks and regards,
Davide
[1] https://github.com/daviderestivo/homebrew-emacs-head
[2] gcc -o libdummy.dylib -install_name ${PREFIX}/lib/libdummy.dylib
next parent reply other threads:[~2021-01-17 10:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <EDAEF3DD-6B4E-4ED9-A7B8-8FB4F236DF42.ref@yahoo.it>
2021-01-17 10:13 ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-01-17 12:36 ` bug#45934: native-comp - Dylib ID of ELN files not optimal akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 16:48 ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-17 20:06 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-23 16:13 ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-24 19:37 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 21:59 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-29 7:09 ` Eli Zaretskii
2021-01-29 8:52 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-30 8:18 ` davide.restivo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-11 16:00 ` xgutter--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-30 12:32 ` Lars Ingebrigtsen
2021-08-02 14:19 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04 6:55 ` Lars Ingebrigtsen
2021-08-04 18:11 ` Alan Third
2021-08-05 10:54 ` Lars Ingebrigtsen
2021-08-05 19:00 ` Alan Third
2021-08-06 10:49 ` Lars Ingebrigtsen
2021-08-06 16:37 ` Alan Third
2021-08-07 9:52 ` Lars Ingebrigtsen
2021-08-07 9:57 ` Lars Ingebrigtsen
2021-08-07 10:25 ` Lars Ingebrigtsen
2021-08-07 13:11 ` Alan Third
2021-08-09 12:20 ` Lars Ingebrigtsen
2021-08-22 17:18 ` Davide Restivo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-22 19:40 ` Davide Restivo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-22 21:18 ` Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EDAEF3DD-6B4E-4ED9-A7B8-8FB4F236DF42@yahoo.it \
--to=bug-gnu-emacs@gnu.org \
--cc=45934@debbugs.gnu.org \
--cc=davide.restivo@yahoo.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.