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

Update nixpkgs snapshot #333

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Update nixpkgs snapshot #333

merged 3 commits into from
Jan 13, 2025

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jan 1, 2025

No description provided.

@akirak akirak closed this Jan 1, 2025
@akirak akirak reopened this Jan 1, 2025
@akirak
Copy link
Collaborator

akirak commented Jan 1, 2025

This nixpkgs update brings at least two issues.

One issue is for building Emacs 24.2 or before on Linux. implicit-function-declaration warning raises the following error. I am able to fix this by suppressing the error on the relevant Emacs versions:

emacs> gmalloc.c: In function 'valloc':
emacs> gmalloc.c:1848:16: error: implicit declaration of function '__getpagesize'; did you mean 'getpagesize'? [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
emacs> 1848 | pagesize = __getpagesize ();
emacs> | ^~~~~~~~~~~~~
emacs> | getpagesize
emacs> make[1]: *** [Makefile:322: gmalloc.o] Error 1
emacs> make[1]: *** Waiting for unfinished jobs....
emacs> make[1]: Leaving directory '/build/source/src'
emacs> make: *** [Makefile:382: src] Error 2

Another issue is for Mac. INFINITY in the enum definition is mistakenly expanded as a macro because of clang-wrapper, but I don't know how to fix this:

emacs> make[1]: *** [Makefile:379: process.o] Error 1
emacs> make[1]: *** Waiting for unfinished jobs....
emacs> make[1]: Leaving directory '/private/tmp/nix-build-emacs-25-1.drv-0/source/src'
emacs> make: *** [Makefile:398: src] Error 2
error: builder for '/nix/store/05ziwn4ic181322w2ibk4n35wr110vn7-emacs-25-1.drv' failed with exit code 2;
last 25 log lines:
> 74 | #define UINTMAX_C(v) (v ## UL)
> | ^~~~~~~
> :93:1: note: expanded from here
> 93 | 18446744073709551615UL
> | ^~~~~~~~~~~~~~~~~~~~~~
> CC lread.o
> 1 warning generated.
> CC dynlib.o
> CC emacs-module.o
> CC syntax.o
> CC unexmacosx.o
> CC bytecode.o
> CC process.o
> CC gnutls.o
> process.c:4521:33: error: expected identifier
> 4521 | enum { MINIMUM = -1, TIMEOUT, INFINITY } wait;
> | ^
> /nix/store/p7ck87mq20ngn4rv8w52imx4c80qj801-clang-wrapper-19.1.5/resource-root/include/float.h:173:20: note: expanded from macro 'INFINITY'
> 173 | # define INFINITY (__builtin_inff())
> | ^
> 1 error generated.
> make[1]: *** [Makefile:379: process.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/private/tmp/nix-build-emacs-25-1.drv-0/source/src'
> make: *** [Makefile:398: src] Error 2
For full logs, run 'nix log /nix/store/05ziwn4ic181322w2ibk4n35wr110vn7-emacs-25-1.drv'.
error: 1 dependencies of derivation '/nix/store/x0ka4pz7q7pw94fp72jsy4rix9j4xy6q-emacs-with-packages-25-1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zhyc18w8qdaya2ks8jpbv9fm69f1h62m-test.drv' failed to build
Error: Process completed with exit code 1.

The latest clang-wrapper includes float.h that defines INFINITY macro, which
causes a build failure on Mac. This patch was applied at some point between 26.3
and 27.1, so we will backport the change to older versions.
@akirak akirak force-pushed the nixpkgs-snapshot-update-1735722299 branch from 2177831 to 8f58112 Compare January 2, 2025 03:37
@akirak
Copy link
Collaborator

akirak commented Jan 2, 2025

@purcell This update wasn't initially successful. Could you confirm the additional changes in this PR?

  • Suppressing implicit-function-declaration error for older Emacs code
  • Adding a patch from emacs-mirror/emacs@222b597 for older Emacsens on Mac (clang)

@akirak akirak requested a review from purcell January 4, 2025 06:36
@purcell purcell closed this Jan 13, 2025
@purcell purcell reopened this Jan 13, 2025
@purcell
Copy link
Owner

purcell commented Jan 13, 2025

Re-opening to rebase, then will merge.

@akirak akirak merged commit 0746760 into master Jan 13, 2025
102 checks passed
@akirak akirak deleted the nixpkgs-snapshot-update-1735722299 branch January 13, 2025 12:42
@purcell
Copy link
Owner

purcell commented Jan 13, 2025

Thanks @akirak, happy 2025!

@akirak
Copy link
Collaborator

akirak commented Jan 13, 2025

@purcell Thank you!

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