emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45934: closed (native-comp - Dylib ID of ELN files not optimal)


From: GNU bug Tracking System
Subject: bug#45934: closed (native-comp - Dylib ID of ELN files not optimal)
Date: Sun, 22 Aug 2021 21:19:01 +0000

Your message dated Sun, 22 Aug 2021 22:18:01 +0100
with message-id <YSK/CfP3f2MBXk7a@idiocy.org>
and subject line Re: bug#45934: native-comp - Dylib ID of ELN files not optimal
has caused the debbugs.gnu.org bug report #45934,
regarding native-comp - Dylib ID of ELN files not optimal
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45934: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45934
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: native-comp - Dylib ID of ELN files not optimal Date: Sun, 17 Jan 2021 11:13:25 +0100
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 




--- End Message ---
--- Begin Message --- Subject: Re: bug#45934: native-comp - Dylib ID of ELN files not optimal Date: Sun, 22 Aug 2021 22:18:01 +0100
On Sun, Aug 22, 2021 at 09:40:20PM +0200, Davide Restivo wrote:
> Hi Lars,
> 
> The patch seems to work fine. Here [1] the succesful outcome of my GitHub CI.
> 
> @Alan: thanks a lot for your help.

Thanks, I've pushed it to master as 6c007668b38f06824004da466e97a96533f6344b.

-- 
Alan Third


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]