perl: Run make depend to fix build race condition

Run make depend before building perl. This fixes parallel build failures
on machines with a high number of cores.

Example error 1:

    /bin/ln -s /build/staging_dir/hostpkg/usr/bin/generate_uudmap generate_uidmap
    make[5]: ./generate_uudmap: Command not found
    make[5]: *** [Makefile:321: bitcount.h] Error 127

Example error 2:

    /bin/ln -s /build/staging_dir/hostpkg/usr/bin/generate_uudmap generate_udmap
    ./generate_uudmap uudmap.h bitcount.h mg_data.h
    /bin/ln: failed to create symbolic link 'generate_uudmap': File exists
    make[5]: *** [Makefile:325: generate_uudmap] Error 1

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996953
Link: 366bc98c91
Closes: https://github.com/openwrt/packages/issues/8238
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
This commit is contained in:
Andreas Gnau 2024-03-05 19:30:09 +01:00
parent 032d566ccf
commit 61d6be29dc
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -117,6 +117,8 @@ define Build/Configure
endef
define Build/Compile
# make depend is required to avoid race conditions: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996953
+$(MAKE) -C $(PKG_BUILD_DIR) depend
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef