Opened 16 years ago

Closed 7 years ago

#15452 closed enhancement (wontfix)

openssl: enable parallel build

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: neverpanic (Clemens Lang)
Port: openssl

Description

I think you should add "use_parallel_build yes" to the openssl portfile. It seems to work for me, and it should speed up the build for those with more than one CPU core.

Attachments (2)

openssl-parallel.diff (1.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 16 years ago.
patch-Makefile.org-parallel.diff (1.3 KB) - added by jeremyhu (Jeremy Huddleston Sequoia) 9 years ago.
patch-Makefile.org-parallel.diff

Download all attachments as: .zip

Change History (11)

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Actually it looks like 0.9.8h does not build correctly when the parallel build is enabled:

--->  Fetching openssl
--->  Verifying checksum(s) for openssl
--->  Extracting openssl
--->  Applying patches to openssl
--->  Configuring openssl
--->  Building openssl with target all
Error: Target org.macports.build returned: shell command " cd "/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_openssl/work/openssl-0.9.8h" && nice -n 1 make -j2 all " returned error 2
Command output: ranlib: file: ../../libcrypto.a(e_seed.o) has no symbols
ranlib: file: ../../libcrypto.a(e_rc5.o) has no symbols
ranlib: file: ../../libcrypto.a(m_mdc2.o) has no symbols
ranlib: file: ../../libcrypto.a(v3_asid.o) has no symbols
ranlib: file: ../../libcrypto.a(v3_addr.o) has no symbols
/usr/bin/ranlib ../../libcrypto.a || echo Never mind.
/usr/bin/ranlib: file: ../../libcrypto.a(ebcdic.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(rand_win.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(rand_os2.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(rand_nw.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(e_camellia.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(e_seed.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(e_rc5.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(m_mdc2.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(v3_asid.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(v3_addr.o) has no symbols
if [ -n "libcrypto.0.9.8.dylib libssl.0.9.8.dylib" ]; then \
        (cd ..; make libcrypto.0.9.8.dylib); \
fi
make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list
nm: no name list

Error: The following dependencies failed to build: apache2 openssl pcre neon serf
Error: Status 1 encountered during processing.

There is a patch shown here which fixes it for 2 jobs at once:

http://www.mail-archive.com/openssl-dev@openssl.org/msg24065.html

But apparently not for 3 jobs at once:

http://www.mail-archive.com/openssl-dev@openssl.org/msg24106.html

Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: openssl-parallel.diff added

comment:2 Changed 16 years ago by mww@…

Resolution: fixed
Status: newclosed

I've marked the port as 'use_parallel_build no' as the added complexity by the patches is not worth the improvements in build time.

comment:3 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:4 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: closedreopened

Reopening. 6 years worth of inefficient building is annoying given that the patch is quite trivial. If the issue is fixed in current sources, please mark it as supporting parallel builds. If the issue still persists with current sources, please send the trivial patch that Ryan provided to upstream developers.

comment:5 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

A quick look in current sources' Makefile.org shows that the issue persists. Please just fix it and pass the fix upstream.

comment:6 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Note that according to the mailing list post that Ryan pointed you to, the patch fixes part of the problem, but install_docs and install_sw are missing dependencies on the "all" target. You also need to do:

-install_sw:
+install_sw: all
...
-install_docs:
+install_docs: all

Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

patch-Makefile.org-parallel.diff

comment:7 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I suspect this updated patch-Makefile.org-parallel.diff will work to address the remaining issue. I built fine at -j8 with that patch.

Last edited 9 years ago by jeremyhu (Jeremy Huddleston Sequoia) (previous) (diff)

comment:8 Changed 7 years ago by mf2k (Frank Schima)

Cc: neverpanic added
Keywords: haspatch added
Owner: changed from mww@… to larryv
Port: openssl added
Status: reopenedassigned
Version: 1.6.0

Assigning to the current maintainers.

comment:9 Changed 7 years ago by neverpanic (Clemens Lang)

Resolution: wontfix
Status: assignedclosed

OpenSSL still seems to have some issues building in parallel, see #46719, where we decided to close this as wontfix until upstream gets it right.

Note: See TracTickets for help on using tickets.