Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update emacs to 29.1 #6

Closed
wants to merge 2 commits into from
Closed

WIP: Update emacs to 29.1 #6

wants to merge 2 commits into from

Conversation

alexpdp7
Copy link

@alexpdp7 alexpdp7 commented Nov 4, 2023

This does not work, but it updates a bit some of the patches required to build Emacs. I have no idea what the errors are about- maybe stuff that is not yet in Cosmopolitan? (That would explain why they are not shipping the latest Emacs, I guess.)

Just putting this somewhere public in case someone works on it.

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 4, 2023

Oh jart/cosmopolitan@5e8c928 ...

@ahgamut
Copy link
Owner

ahgamut commented Nov 4, 2023

I am yet to understand how Cosmopolitan implements those functions, I'd prefer to wait before adding them to the build.

For now, we can merge your PR if you can avoid the build errors: update the minimal.diff to change out HAVE_DLOPEN to HAVE_DLOPEN0 in Emacs' config.h.in, just like how we currently have HAVE_FIONREAD0. (similarly for dlsym)

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 4, 2023

OK, just force-pushed a change. There's no HAVE_DLOPEN- but I think HAVE_MODULES is the thing. I'll go to sleep now, so I don't know if the following build will do the trick:

https://github.com/alexpdp7/superconfigure/actions/runs/6757619286/job/18368348415

Thanks for the hint! I really don't know what I'm doing.

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 4, 2023

Ah, something else broke. Don't worry too much, I can live without this. I'll poke a bit tomorrow, but you don't have to spend time on this.

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

Oh, I added the modules thing recently because I thought it would speed things up. Hmm, let me take a look.

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

The last builds without modules succeeded!

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

Nice! I have an issue getting it to build locally, I'll merge the PR once that issue is resolved. (Edit: aarch64 build has some errors.)

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

Excellent. Let me know if I can be of any help, although I'm really a noob (I'm relying on GitHub Actions to build, because this is scary to me :).

Two updates:

  • I tested the last build, seems to work fine, but I get:
Warning: arch-dependent data dir '/zip/x86_64/emacs/29.1/x86_64-pc-linux-gnu/': ENOENT/2/No such file or directory

when starting Emacs.

edit: alexpdp7@b7529ee adds emacsclient https://github.com/alexpdp7/superconfigure/actions/runs/6760777668/job/18374920572.

I think I now can use this, thank you so much!

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

Warning: arch-dependent data dir '/zip/x86_64/emacs/29.1/x86_64-pc-linux-gnu/': ENOENT/2/No such file or directory

This warning means Emacs will start up slower, because it uses emacs.pdmp to speed up start times. I'm seeing a similar issue on the aarch64 build, and I'm not sure where the difference is.

If it works, we can add emacsclient as part of the superconfigure releases also.

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

I've been using emacs and emacsclient this morning, updating my Emacs config with some niceties in 29.1, and it seems to work fine.

So I think we want two changes:

  • Update Emacs to 29.1.
  • Add emacsclient.

Do you prefer one PR (with two commits) or two separate PRs?

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

One PR should be enough. Can you confirm that the warning does not appear?

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

No, I'm seeing the warning. In any case, I'll update this PR.

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

Hey, I'm sorry but I can't get emacs-29.1 to build and work properly on aarch64. I've mentioned you in a recent commit that adds emacsclient to the emacs build.

Thank you for the PR! I'm going to close it for now while I try to figure where the build issue is.
I'd be happy to add emacs-29.2 or a later version if you submit a PR (or if I fix the build issue on my end, I'll reopen this and merge it.)

@ahgamut ahgamut closed this Nov 5, 2023
@alexpdp7 alexpdp7 deleted the main branch November 5, 2023 22:17
@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

No worries, I have my binary now. I have rebased the 29.1 update on top of your main branch. I think it builds:

https://github.com/alexpdp7/superconfigure/actions/runs/6763795027/job/18381335056

, I see some issues, but apparently unrelated to Emacs; one is the "git core" stuff you pushed, and the other is for berry? Not sure if llvm will finish building successfully, but my GH Actions build seems to say Emacs is OK?

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

can you post the output of unzip -vl emacs | grep -v share here? The issue I was running into was that aarch64 part doesn't have the .pdmp file with the right fingerprint.

I think I fixed the git-core thing, will look into the berry error.

@alexpdp7
Copy link
Author

alexpdp7 commented Nov 5, 2023

$ wget https://github.com/alexpdp7/superconfigure/releases/download/emacs_29.1/editor.zip
$ unzip editor.zip 
$ unzip -vl bin/emacs | grep -v share
Archive:  bin/emacs
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
  458752  Defl:N   166592  64% 07-29-2023 00:00 2e659503  .symtab.amd64
  458752  Defl:N   151111  67% 07-29-2023 00:00 fcab6443  .symtab.arm64
       0  Stored        0   0% 03-17-2022 07:00 00000000  .cosmo
11527560  Defl:N  2786836  76% 11-05-2023 22:37 d99a7e4c  x86_64/emacs/29.1/x86_64-linux-gnu/emacs-4ae1ae7bbf15bc2d65f8de18afacf78af040ff575480c3d6428cd101437de87c.pdmp
11507768  Defl:N  2782704  76% 11-05-2023 22:37 745a50e3  aarch64/emacs/29.1/aarch64-linux-gnu/emacs-65f3e7a727584e3d7caa5f65e51ddd68355741c93936ce79923b0c81f36a380c.pdmp
--------          -------  ---                            -------
104756108         30508483  71%                            4864 files

@ahgamut
Copy link
Owner

ahgamut commented Nov 5, 2023

Huh interesting, I was always getting a emacs-.pdmp for the aarch64 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants