Bug 226052

Summary: net/libstorj: parallel build failure
Product: Ports & Packages Reporter: Don Lewis <truckman>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: danfe, jhixson, swills
Priority: --- Flags: jhixson: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Don Lewis freebsd_committer freebsd_triage 2018-02-19 23:51:45 UTC
I attempted to do a parallel build of libstorj and observed this failure:

gmake[2]: Entering directory '/wrkdirs/usr/ports/net/libstorj/work/libstorj-1.0.2/test'
cc -DPACKAGE_NAME=\"libstorj\" -DPACKAGE_TARNAME=\"libstorj\" -DPACKAGE_VERSION=\"1.0.2\" -DPACKAGE_STRING=\"libstorj\ 1.0.2\" -DPACKAGE_BUGREPOR
T=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" -DVERSION=\"1.0.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".li
bs/\" -DHAVE_CURL_CURL_H=1 -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 -DHAVE_MICROHTTPD_H=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_M
EMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I.   -isystem /usr/local/include  -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasi
ng -O3 -MT mockfarmer.o -MD -MP -MF .deps/mockfarmer.Tpo -c -o mockfarmer.o mockfarmer.c
cc -DPACKAGE_NAME=\"libstorj\" -DPACKAGE_TARNAME=\"libstorj\" -DPACKAGE_VERSION=\"1.0.2\" -DPACKAGE_STRING=\"libstorj\ 1.0.2\" -DPACKAGE_BUGREPOR
T=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" -DVERSION=\"1.0.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".li
bs/\" -DHAVE_CURL_CURL_H=1 -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 -DHAVE_MICROHTTPD_H=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_M
EMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I.   -isystem /usr/local/include  -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasi
ng -O3 -MT tests.o -MD -MP -MF .deps/tests.Tpo -c -o tests.o tests.c
cc -DPACKAGE_NAME=\"libstorj\" -DPACKAGE_TARNAME=\"libstorj\" -DPACKAGE_VERSION=\"1.0.2\" -DPACKAGE_STRING=\"libstorj\ 1.0.2\" -DPACKAGE_BUGREPOR
T=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libstorj\" -DVERSION=\"1.0.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".li
bs/\" -DHAVE_CURL_CURL_H=1 -DHAVE_NETTLE_AES_H=1 -DHAVE_JSON_C_JSON_H=1 -DHAVE_UV_H=1 -DHAVE_MICROHTTPD_H=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_M
EMALIGN=1 -DHAVE_POSIX_FALLOCATE=1 -I.   -isystem /usr/local/include  -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasi
ng -O3 -MT tests_rs.o -MD -MP -MF .deps/tests_rs.Tpo -c -o tests_rs.o tests_rs.c
Generated mockbridge.json.h
In file included from mockfarmer.c:5:
./storjtests.h:10:10: fatal error: 'mockbridgeinfo.json.h' file not found
#include "mockbridgeinfo.json.h"
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [Makefile:591: mockfarmer.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from tests.c:1:
./storjtests.h:10:10: fatal error: 'mockbridgeinfo.json.h' file not found
#include "mockbridgeinfo.json.h"
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [Makefile:591: tests.o] Error 1
Generated mockbridgeinfo.json.h
mv -f .deps/tests_rs.Tpo .deps/tests_rs.Po
gmake[2]: Leaving directory '/wrkdirs/usr/ports/net/libstorj/work/libstorj-1.0.2/test'
gmake[1]: *** [Makefile:455: all-recursive] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/libstorj/work/libstorj-1.0.2'
===> Compilation failed unexpectedly.


It is attempting to compile some .c files before generating the .h file that they include.  Either the source Makefile needs to be patched to include the dependency so that make orders things properly, or the port Makefile should contain MAKE_JOBS_UNSAFE=yes to force a single-threaded build.
Comment 1 John Hixson freebsd_committer freebsd_triage 2018-03-23 17:39:01 UTC
(In reply to Don Lewis from comment #0)

What version/architecture of FreeBSD?
Comment 2 Don Lewis freebsd_committer freebsd_triage 2018-03-23 21:33:21 UTC
12.0-CURRENT amd64
Comment 3 John Hixson freebsd_committer freebsd_triage 2018-04-10 13:26:24 UTC
I will try and reproduce
Comment 4 John Hixson freebsd_committer freebsd_triage 2018-05-24 19:31:45 UTC
Is this still a problem? I'm not able to reproduce this issue on HEAD.

I am running:

12.0-CURRENT FreeBSD 12.0-CURRENT #0 91cc6c909(HEAD)-dirty: Tue May  8 16:56:17 UTC 2018
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2020-06-30 08:48:40 UTC
Is this port still relevant actually?  Isn't it from Storj v2 times which are long gone and over now?
Comment 6 John Hixson freebsd_committer freebsd_triage 2020-06-30 18:37:42 UTC
Good question. A quick glance is in agreement with you. I'll look at this further this weekend.
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-02-12 19:36:09 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Feb 12 19:35:23 UTC 2021
New revision: 565055
URL: https://svnweb.freebsd.org/changeset/ports/565055

Log:
  - Mark MAKE_JOBS_UNSAFE, fails sporadically in parallel build

  PR:		226052
  Reported by:	truckman

Changes:
  head/net/libstorj/Makefile
Comment 8 Dmitry Marakasov freebsd_committer freebsd_triage 2021-02-12 19:37:28 UTC
I've confirmed the problem (it took some iterations to reproduce) marked as MAKE_JOBS_UNSAFE.

Regarding the deprecation, ping maintainer.
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2021-03-09 22:24:41 UTC
Feedback timeout, leaving this be.