Handling of links with portable dumper

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling of links with portable dumper

Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

A month ago I built master but my use of a symlink in ~/bin
made it not load.

Has that problem been fixed?

--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Eli Zaretskii
> From: Richard Stallman <[hidden email]>
> Date: Thu, 04 Apr 2019 18:39:26 -0400
>
> A month ago I built master but my use of a symlink in ~/bin
> made it not load.
>
> Has that problem been fixed?

No, not yet.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Would you please fix that problem soon?

--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Eli Zaretskii
> From: Richard Stallman <[hidden email]>
> Cc: [hidden email]
> Date: Fri, 05 Apr 2019 18:32:11 -0400
>
> Would you please fix that problem soon?

I cannot test it well enough, and I don't think I understand well
enough the problem and its intended solutions, so I didn't try.
Perhaps Paul or Daniel (CC'ed) or someone else could do that.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Stefan Monnier
In reply to this post by Richard Stallman
> Would you please fix that problem soon?

FWIW I circumvented it by replacing the symlink with a script.


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Richard Stallman
In reply to this post by Eli Zaretskii
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I cannot test it well enough, and I don't think I understand well
  > enough the problem and its intended solutions, so I didn't try.

Put ~/bin in your path.  Make a symlink from ~/bin/emcs to the executable
of Emacs that you built from master.

Then run emcs and you'll see that it does not find the dump file.  By
stepping through the code that searches for the dump file, you can see
where it goes wrong.

--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Eli Zaretskii
> From: Richard Stallman <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email]
> Date: Sat, 06 Apr 2019 19:24:15 -0400
>
>   > I cannot test it well enough, and I don't think I understand well
>   > enough the problem and its intended solutions, so I didn't try.
>
> Put ~/bin in your path.  Make a symlink from ~/bin/emcs to the executable
> of Emacs that you built from master.

That's not the part I didn't understand well enough.  There are other
complications that were discussed at the time, I don't even remember
the details anymore.

Sorry, someone else will have to work on this.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Daniel Colascione-5
>> From: Richard Stallman <[hidden email]>
>> Cc: [hidden email], [hidden email], [hidden email]
>> Date: Sat, 06 Apr 2019 19:24:15 -0400
>>
>>   > I cannot test it well enough, and I don't think I understand well
>>   > enough the problem and its intended solutions, so I didn't try.
>>
>> Put ~/bin in your path.  Make a symlink from ~/bin/emcs to the
>> executable
>> of Emacs that you built from master.
>
> That's not the part I didn't understand well enough.  There are other
> complications that were discussed at the time, I don't even remember
> the details anymore.
>
> Sorry, someone else will have to work on this.

I broke it, so I'll buy it. I'll fix this. Paul, is there something in
gnulib I can just link to?


Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Paul Eggert
Daniel Colascione wrote:
> Paul, is there something in
> gnulib I can just link to?

Sorry, I've lost context. What function do you want? canonicalize_file_name?
set_program_name_and_installdir? I'm not a big fan of the latter, as it's a
portability heavyweight (it makes lots of assumptions and might not be
applicable to Emacs).

I still think it'd be better to put the dump into the executable itself, which
can be done portably simply by linking a big C character array into the
executable. in the long run this will be better for users (and for us) than
fiddling with portability minefields like set_program_name_and_installdir.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Eli Zaretskii
In reply to this post by Daniel Colascione-5
> Date: Sun, 7 Apr 2019 10:04:05 -0700
> From: "Daniel Colascione" <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email], [hidden email]
>
> I broke it, so I'll buy it. I'll fix this.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Richard Stallman
In reply to this post by Stefan Monnier
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Would you please fix that problem soon?

  > FWIW I circumvented it by replacing the symlink with a script.

Many bugs can be worked around, but this regression ought
to be fixed.


--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Clément Pit-Claudel
In reply to this post by Paul Eggert
On 2019-04-07 13:44, Paul Eggert wrote:
> I still think it'd be better to put the dump into the executable
> itself, which can be done portably simply by linking a big C
> character array into the executable. in the long run this will be
> better for users (and for us) than fiddling with portability
> minefields like set_program_name_and_installdir.

Does that mean also rewriting the full binary when we rewrite the dump?

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Michael Welsh Duggan-5
Clément Pit-Claudel <[hidden email]> writes:

> On 2019-04-07 13:44, Paul Eggert wrote:
>> I still think it'd be better to put the dump into the executable
>> itself, which can be done portably simply by linking a big C
>> character array into the executable. in the long run this will be
>> better for users (and for us) than fiddling with portability
>> minefields like set_program_name_and_installdir.
>
> Does that mean also rewriting the full binary when we rewrite the dump?

I would assume that when the executable was built it would be dumped
with the dump file created at that time, but that that emacs could load
a different dump file than the one built into it.  I don't see a good
portable way to re-make the executable after the fact absent going back
to the source build, though.

--
Michael Welsh Duggan
([hidden email])

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Paul Eggert
Michael Welsh Duggan wrote:
>> Does that mean also rewriting the full binary when we rewrite the dump?
> I would assume that when the executable was built it would be dumped
> with the dump file created at that time, but that that emacs could load
> a different dump file than the one built into it

Yes, the idea is to augment the current approach, not replace it. You'd still be
able to use the current approach if you wanted to. The default installation
would be to have a single file rather than two, that's all.

Reply | Threaded
Open this post in threaded view
|

Re: Handling of links with portable dumper

Richard Stallman
In reply to this post by Daniel Colascione-5
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > >> Put ~/bin in your path.  Make a symlink from ~/bin/emcs to the
  > >> executable
  > >> of Emacs that you built from master.

  > I broke it, so I'll buy it. I'll fix this. Paul, is there something in
  > gnulib I can just link to?

I don't know about gnulib, but if you look at the code that sets
up Vinstallation_directory, also in emacs.c, you can see how it
calls readlink.  It should work to copy and adapt that code.

--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)