Skip to content

openssl 1.1.1 install failed occasionally when parallel build #7466

@sandy-lcq

Description

@sandy-lcq
  1. Version openssl 1.1.1
  2. run "make -j 48 install" on ubuntu 16.04
  3. error:
 link openssl/1.1.1-r0/image/usr/lib/libcrypto.so -> openssl/1.1.1-r0/image/usr/lib/libcrypto.so.1.1
+mv: cannot stat 'openssl/1.1.1-r0/image/usr/lib/libcrypto.so.1.1.new': No such file or directory
+make: *** [Makefile:441: install_runtime] Error 1

openssl/1.1.1-r0/image/usr/share/doc/openssl/html/man3/RAND_cleanup.html
mv: cannot stat 'openssl/1.1.1-r0/image/usr/lib/libcrypto.so.1.1.new': No such file or directory
+Makefile:318: recipe for target 'install_dev' failed
+make: *** [install_dev] Error 1
  1. This maybe related to parallel build. From the Makefile, both target "install_runtime" and "install_dev"
    try to install libcrypto.so. and have a part code very similar list below.
    I think the problem should caused by install_dev and install_runtime operate the libcrypro.so under libdir at the sametime, can have the condition, when try to mv -f liblibcrypto.so.1.1.new to libcrypto.so.1.1, but liblibcrypto.so.1.1.new don't exist.
install_dev:
        @set -e; for l in $(INSTALL_LIBS); do \
                fn=`basename $$l`; \
                $(ECHO) "install $$l -> $(DESTDIR)$(libdir)/$$fn"; \
                cp $$l $(DESTDIR)$(libdir)/$$fn.new; \
                $(RANLIB) $(DESTDIR)$(libdir)/$$fn.new; \
                chmod 644 $(DESTDIR)$(libdir)/$$fn.new; \
                mv -f $(DESTDIR)$(libdir)/$$fn.new \
                      $(DESTDIR)$(libdir)/$$fn; \
        done

install_runtime:
        @set -e; for s in dummy $(INSTALL_SHLIBS); do \
                if [ "$$s" = "dummy" ]; then continue; fi; \
                fn=`basename $$s`; \
                : ; \
                $(ECHO) "install $$s -> $(DESTDIR)$(libdir)/$$fn"; \
                cp $$s $(DESTDIR)$(libdir)/$$fn.new; \
                chmod 755 $(DESTDIR)$(libdir)/$$fn.new; \
                mv -f $(DESTDIR)$(libdir)/$$fn.new \
                      $(DESTDIR)$(libdir)/$$fn; \
                : ; \
        done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions