vitasdk / packages

55 stars 52 forks source link

Builds of openssl packages seem to be heisenbroken with more than 1 CPU core #295

Closed sleirsgoevy closed 1 year ago

sleirsgoevy commented 1 year ago

Title. Trying to build the openssl package with more than 1 core reported by nproc results in sporadic build errors.

sharkwouter commented 1 year ago

Thanks for reporting this. I'll see if I can reproduce this.

sharkwouter commented 1 year ago

I tried building it 3 times now and I haven't seen this issue happen yet.

sleirsgoevy commented 1 year ago
==> Entering fakeroot environment...
==> Starting package()...
making all in crypto...
make[1]: Entering directory '/build/openssl/src/vita-openssl/crypto'
making all in crypto/objects...
make[2]: Entering directory '/build/openssl/src/vita-openssl/crypto/objects'
arm-vita-eabi-gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include     -c -o o_names.o o_names.c
arm-vita-eabi-gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include     -c -o obj_lib.o obj_lib.c
created directory `/build/openssl/pkg/openssl/path'
created directory `/build/openssl/pkg/openssl/path/to'
created directory `/build/openssl/pkg/openssl/path/to/prefix'
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi'
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi/ssl'
Cannot create directory /build/openssl/pkg/openssl/path: File exists
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi/ssl/man'
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi/ssl/man/man1'
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi/ssl/man/man3'
created directory `/build/openssl/pkg/openssl/path/to/prefix/arm-vita-eabi/ssl/man/man5'
make: *** [Makefile:538: install_sw] Error 17

Tried to reproduce the issue, got this at second try. Actual prefix path censored, but it seems that two recursive mkdirs are racing each other in the install target.

sleirsgoevy commented 1 year ago

I almost forgot that I am removing this line in favour of the original script. Perhaps the original script has this bug, and the replacement (mkdir -p) doesn't. If that's the cause, it's probably a non-issue for the project, but still I'd like to know the reasons why this was added.