Closed Bug 1637083 Opened 5 years ago Closed 5 years ago

lib/ckfw: No such file or directory. Stop.

Categories

(NSS :: Build, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: intermittent-bug-filer, Assigned: glogow)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Filed by: jjones [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=301791968&repo=nss
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/CFhc6JqnQRaUuOw8paYOfw/runs/0/artifacts/public/logs/live_backing.log


Apparently nss-try doesn't attempt modular builds, and the Makefile changeset stack has broken Linux modular builds.

I've been digging into this a bit with a fresh box and something is still populating DIRS with ckfw out of lib.

Since this build type is important to RedHat, Bob, do you want me to back-out that 17-patch set, or shall we fix it in-default?

I'm going to have to step away for a bit, and I'm learning the new way as we go, but gonna ni? to Jan-Marek just for visibility as well, as I imagine you'll be able to patch this faster than I can make sense of it, as my Makefile fu is a bit stale.

I am going to file a bug to add the NSS_BUILD_MODULAR type to try_syntax.js so we don't hit this snag again.

Flags: needinfo?(rrelyea)
Flags: needinfo?(glogow)

Originally I tried multiple variants using make's conditionals
to limit DIRS and enforce building the parent directory before
the sub-directory. None of them worked for me, most resulting in
an infinite recursion, so I used the current pre-depends
workaround to fulfill the real dependency.

Now I remembered that automake can handle this case for SUBDIRS
specifying "." as a directory. The generated Makefile handles it
via shell scripting; not nice, but it works.

So this gets rid of the workaround, replacing it with a small
shell test.

FYI: I just tested this patch with my local build, which still works without my original hack, and not the breaking build script. No LibreOffice upload or test suite run this time. This should fix the missing directory problem, but looking at these shell script setup I don't know, if nothing else breaks in there and needs adaption. Anything else should hopefully be easier to fix then this shell hack.

BTW: is there a way for me to trigger the CI, or does it run automatically?

Flags: needinfo?(glogow)

If this is landing post 3.52, I think we have time to fix it before it hits RHEL since we will probably rebase to 3.52 and not rebase again until the next firefox ESR.

bob

Flags: needinfo?(rrelyea)

So with that patchJan-Marek,

Thank you for the quick turnaround. With that patch applied, build_util.sh completes fine. nss/automation/taskcluster/scripts/build_softoken.sh fails however on lib with *** No rule to make target 'util', needed by 'freebl'. Stop.:

make[2]: Entering directory '/home/jcjones/hg/nss-softoken/coreconf/nsinstall'
cc -o Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/nsinstall.o -c -std=c99 -g -fPIC -Di386 -m32 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -Werror -DXP_UNIX -DDEBUG -UNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_DISABLE_AVX2 -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/jcjones/hg/dist-nspr/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I/home/jcjones/hg/dist-util/public/nss -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I../../../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf  nsinstall.c
cc -o Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/pathsub.o -c -std=c99 -g -fPIC -Di386 -m32 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -Werror -DXP_UNIX -DDEBUG -UNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_DISABLE_AVX2 -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/jcjones/hg/dist-nspr/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I/home/jcjones/hg/dist-util/public/nss -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I../../../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf  pathsub.c
rm -f Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/nsinstall
cc -o Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/nsinstall -g -fPIC -Di386 -m32 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -Werror -DXP_UNIX -DDEBUG -UNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_DISABLE_AVX2 -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/jcjones/hg/dist-nspr/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I/home/jcjones/hg/dist-util/public/nss -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I./../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I./../dist/public/ -I./../dist/private/ -I../../../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/include -I../../../dist/public/coreconf -I../../../dist/private/coreconf  Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/nsinstall.o Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/pathsub.o -m32 -z noexecstack   -lpthread  -ldl -lc
true -m 775 Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/nsinstall ../../../dist/Linux5.4_x86_cc_glibc_PTH_DBG.OBJ/bin
make[2]: Leaving directory '/home/jcjones/hg/nss-softoken/coreconf/nsinstall'
make export
make[2]: Entering directory '/home/jcjones/hg/nss-softoken'
make[3]: Entering directory '/home/jcjones/hg/nss-softoken/coreconf'
make[4]: Entering directory '/home/jcjones/hg/nss-softoken/coreconf/nsinstall'
make[4]: Nothing to be done for 'export'.
make[4]: Leaving directory '/home/jcjones/hg/nss-softoken/coreconf/nsinstall'
make[3]: Leaving directory '/home/jcjones/hg/nss-softoken/coreconf'
make[3]: Entering directory '/home/jcjones/hg/nss-softoken/lib'
make[3]: *** No rule to make target 'util', needed by 'freebl'.  Stop.
make[3]: Leaving directory '/home/jcjones/hg/nss-softoken/lib'
make[2]: *** [coreconf/rules.mk:44: lib] Error 2
make[2]: Leaving directory '/home/jcjones/hg/nss-softoken'
make[1]: *** [manifest.mn:25: prepare_build] Error 2
make[1]: Leaving directory '/home/jcjones/hg/nss-softoken'
make: *** [Makefile:52: nss_build_all] Error 2

(In reply to Jan-Marek Glogowski from comment #3)

BTW: is there a way for me to trigger the CI, or does it run automatically?

Sadly, the modular builds aren't triggerable right now except by landing code in-tree. Bug 1637102 seeks to fix that, but I haven't started figuring it out yet.

For now I'm using a fresh Ubuntu 20.04 box and triggering via: NSS_BUILD_MODULAR=1 nss/automation/taskcluster/scripts/build.sh

This build is tested by /automation/taskcluster/scripts/split.sh.

To make this build's make conditionals easier to handle, it also
merges the manifest.mn into the Makefile, because parts of the
conditionals depends on $(OS_ARCH) setting.

In the end, the goal is just to set the correct build $(DIRS).

(In reply to J.C. Jones [:jcj] (he/him) [increased latency due to COVID-19] from comment #5)

For now I'm using a fresh Ubuntu 20.04 box and triggering via: NSS_BUILD_MODULAR=1 nss/automation/taskcluster/scripts/build.sh

Ah nice. I thought this needed some Red Hat system setup after the previous comments, so didn't even try to run it.

Now I've run it via MAKEOPTS="-j8" NSS_BUILD_MODULAR=1 USE_64=1 CC="/usr/bin/ccache gcc -DSQLITE_DISABLE_LFS=1" CCC="/usr/bin/ccache g++" nss/automation/taskcluster/scripts/build.sh with both patches in my Ubuntu 18.04 development schroot and that finished without an (obvious) error.

BTW: on first run it deleted some files from my NSS hg repo, because locally nss is just a link to hg_nss4 (my fourth test "branch"), so it just copied the nss link to nss-util and failed spectacularly, luckily without trying to delete anything important...

I hope the CI generally runs a bit more variants of build flags.

Jan-Marek: As far as I can tell, these two patches together work great. I'm going to try on a RHEL box and push to try while I review, though I think we need to wait for Bob's review before merging.

Thanks so much for all these fixes!

Assignee: nobody → glogow
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.53
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: