Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 956806 - dev-libs/nss-3.112: Compilation fails when upgrading from 3.111
Summary: dev-libs/nss-3.112: Compilation fails when upgrading from 3.111
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-29 14:59 UTC by opensauce04
Modified: 2025-05-29 19:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of `emerge --info nss` (emerge-info-nss.txt,8.14 KB, text/plain)
2025-05-29 14:59 UTC, opensauce04
Details
Build log for `emerge -1 nss` (build.log,2.59 KB, text/x-log)
2025-05-29 15:07 UTC, opensauce04
Details
Build log for `emerge -1 nss` with no ccache (build-no-ccache.log,2.59 KB, text/x-log)
2025-05-29 15:22 UTC, opensauce04
Details
coreconf/tree.mk from nss 3.112 (tree.mk,1.27 KB, text/x-makefile)
2025-05-29 16:45 UTC, opensauce04
Details
Output of `env` (env.txt,3.10 KB, text/plain)
2025-05-29 16:49 UTC, opensauce04
Details
/var/tmp/portage/dev-libs/nss-3.112/temp/environment (environment,85.66 KB, text/plain)
2025-05-29 17:50 UTC, opensauce04
Details

Note You need to log in before you can comment on or make changes to this bug.
Description opensauce04 2025-05-29 14:59:41 UTC
Created attachment 929980 [details]
Output of `emerge --info nss`

Attempting to emerge nss 3.112 results in the following error:

```
make: Entering directory '/var/tmp/portage/dev-libs/nss-3.112/work/nss-3.112/nss-.arm64/coreconf'
../coreconf/tree.mk:53: *** missing 'endif'.  Stop.
```

If it matters, I am using an M1 Macbook Air with the Asahi kernel.
Comment 1 Kostadin Shishmanov 2025-05-29 15:03:03 UTC
Attach the full build log. If it's too big - compress it with xz.
Comment 2 opensauce04 2025-05-29 15:07:31 UTC
What I put the message is basically it. I'll attach the whole thing though if that's helpful.
Comment 3 opensauce04 2025-05-29 15:07:50 UTC
Created attachment 929981 [details]
Build log for `emerge -1 nss`
Comment 4 Joonas Niilola gentoo-dev 2025-05-29 15:10:21 UTC
Always try without ccache if it fails with ccache.
Comment 5 opensauce04 2025-05-29 15:11:38 UTC
It also fails without ccache.
Comment 6 Joonas Niilola gentoo-dev 2025-05-29 15:19:31 UTC
For completions sake, could the build.log without ccache be posted here? That error does look ccache-related. Upgrading works on my amd64 so might be arm64-related too somehow.
Comment 7 opensauce04 2025-05-29 15:22:09 UTC
Created attachment 929982 [details]
Build log for `emerge -1 nss` with no ccache
Comment 8 opensauce04 2025-05-29 16:32:54 UTC
I just discovered by accident that this issue also occurs on my AMD64 desktop computer, which is being run completely independently of my M1. It fails with the same error:

```
make -j14 -C coreconf 'CC=x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse'
make: Entering directory '/var/tmp/portage/dev-libs/nss-3.112/work/nss-3.112/nss-abi_x86_32.x86/coreconf'
../coreconf/tree.mk:53: *** missing 'endif'.  Stop.
```
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 16:37:03 UTC
Could you upload tree.mk as an attachment and paste a few lines around line 53 here? Thanks.
Comment 10 opensauce04 2025-05-29 16:44:06 UTC
The file is only 52 lines long. I will post the whole file as it is on my AMD64 computer.
Comment 11 opensauce04 2025-05-29 16:45:13 UTC
Created attachment 929990 [details]
coreconf/tree.mk from nss 3.112
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 16:47:10 UTC
Please share the output of `env`.
Comment 13 opensauce04 2025-05-29 16:49:07 UTC
Created attachment 929991 [details]
Output of `env`
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 16:55:43 UTC
Huh, that looks fine, you don't have any weird env vars set matching $(XYZ) in the Makefile, and when I use the Makefile and try inject things, it works fine.

Could you include the environment file at:
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-libs/nss-3.112/temp/environment'.
Comment 15 opensauce04 2025-05-29 17:50:36 UTC
Created attachment 929992 [details]
/var/tmp/portage/dev-libs/nss-3.112/temp/environment
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 17:54:39 UTC
If https://github.com/nss-dev/nss/compare/NSS_3_111_RTM...NSS_3_112_RTM is the right link, very little changed here...
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 17:57:42 UTC
Does nss-3.111 really build fine for you if you try again now?
Comment 18 opensauce04 2025-05-29 18:09:46 UTC
Ah, nss 3.111 is also failing even though it's already installed on my system. Something else must've changed. Any idea what that could be?
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 18:12:23 UTC
(In reply to opensauce04 from comment #18)
> Ah, nss 3.111 is also failing even though it's already installed on my
> system. Something else must've changed. Any idea what that could be?

Anything interesting happened recently on your system? Changed anything (e.g. CFLAGS)? Had a weird poweroff or something?

Could you try rebuild dev-build/make?
Comment 20 opensauce04 2025-05-29 18:13:30 UTC
Oh wait! I know what caused it.

A while ago I emerged the 9999 package for GNU Make to try out a new feature, and I never removed the package.accept_keywords entry. Up until now this has never affected anything, but after downgrading to the latest release of Make, NSS is now building successfully.

As such, this appears to be a symptom of some breaking change in Make which hasn't made its way into a release yet.
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 18:16:15 UTC
FWIW, it's equally possible it's a Make bug as well. You could try reduce that Makefile you pasted here and reproduce it with `make -f foo` and see if you can get it to fail if you add some basic rule like `all:\n\techo hi`, and then report it upstream if so.
Comment 22 opensauce04 2025-05-29 18:49:02 UTC
I've managed to create an incredibly minimal reproduction of the issue. I will look into reporting this upstream to the Make developers shortly. Seeing as this isn't related to NSS itself, this issue should probably be closed.

I'm not sure what category of "resolved" this situation falls under, so I'll leave that to you.
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-29 18:53:31 UTC
(In reply to opensauce04 from comment #22)
> I've managed to create an incredibly minimal reproduction of the issue.

Not sharing it here?

> I
> will look into reporting this upstream to the Make developers shortly.
> Seeing as this isn't related to NSS itself, this issue should probably be
> closed.

Thanks. Please share a link when done.

> 
> I'm not sure what category of "resolved" this situation falls under, so I'll
> leave that to you.

Let's call it WORKSFORME.
Comment 24 Holger Hoffstätte 2025-05-29 18:55:16 UTC
I bisected and the bad commit is:
https://cgit.git.savannah.gnu.org/cgit/make.git/commit/?id=07fcee35f058a876447c8a021f9eb1943f902534

Of course whether this is really a bad change or intended and the real fault is with the nss makefiles might be a different issue, but at least you can point to a commit when reporting upstream. :)

It's here: https://savannah.gnu.org/projects/make
Comment 25 opensauce04 2025-05-29 19:19:24 UTC
> Not sharing it here?

This is the repro I came up with:

Makefile
```
ifeq (a, b)
        #noop
else
        ifeq (a, b)
                #noop
        else
                #noop
        endif
endif

all:
        - echo This works
```
Comment 26 opensauce04 2025-05-29 19:22:58 UTC
(In reply to opensauce04 from comment #25)
> > Not sharing it here?
> 
> This is the repro I came up with:
> 
> Makefile
> ```
> ifeq (a, b)
>         #noop
> else
>         ifeq (a, b)
>                 #noop
>         else
>                 #noop
>         endif
> endif
> 
> all:
>         - echo This works
> ```

Actually this can be simplified even further:

Makefile
```
ifeq (a, b)
        #noop
else
        ifeq (a, b)
                #noop
        endif
endif

all:
        - echo This works
```

The nested if seemingly needs to be inside the `else` for the error to occur.
Comment 27 opensauce04 2025-05-29 19:34:48 UTC
I have created a bug report for this in the Make issue tracker: https://savannah.gnu.org/bugs/index.php?67168