ericpaulbishop / gargoyle

Gargoyle Router Management Utility
http://www.gargoyle-router.com
468 stars 221 forks source link

package/samba36 seems to break parallel build #941

Closed jan-kiszka closed 2 years ago

jan-kiszka commented 2 years ago

I've just hacked it out, and suddenly the build succeeds when using more than one core. I get a build error in its librpc otherwise. Seems some DEPENDS is missing. Known problem?

lantis1008 commented 2 years ago

I haven't encountered anything as such. Are you building from master?

jan-kiszka commented 2 years ago

Yep, master, but likely not since recently. I'm tracking it with self-built images for quite a while, and I had to switch to single-core from the beginning - just never found the time to look for the reasons. Will dig a bit deeper into this.

Is there a way to build only this package in a cleaned up environment? If my theory is right, this must trigger it as well, irrespective of any parallelism.

jan-kiszka commented 2 years ago

Could it be that you were building in broken "auto" mode, thus actually not parallel? See https://github.com/jan-kiszka/gargoyle/commit/ca8a5ae92a30e08780461c5dfcc02eee7bf9e2a5.

lantis1008 commented 2 years ago

Well, yes, but also no. I just tried manually setting it to 10 build threads and i still compiled the whole thing fine. So feel free to send a PR to fix that build issue, but I'm not seeing the same samba fail.

jan-kiszka commented 2 years ago

10 threads (I assume you have 8 logical cores then) happens to pass here as well. The fun starts with more, 14 here (12 logical cores):

Compiling ../librpc/ndr/ndr_misc.c
../librpc/ndr/ndr_dcerpc.c:31:107: warning: 'struct dcerpc_sec_vt_count' declared inside parameter list will not be visible outside of this definition or declaration
 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_sec_vt_count(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_sec_vt_count *r)
                                                                                                           ^~~~~~~~~~~~~~~~~~~
../librpc/ndr/ndr_dcerpc.c:38:101: warning: 'struct dcerpc_sec_vt_count' declared inside parameter list will not be visible outside of this definition or declaration
 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_sec_vt_count(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_sec_vt_count *r)
                                                                                                     ^~~~~~~~~~~~~~~~~~~
../librpc/ndr/ndr_dcerpc.c: In function 'ndr_pull_dcerpc_sec_vt_count':
../librpc/ndr/ndr_dcerpc.c:48:3: error: dereferencing pointer to incomplete type 'struct dcerpc_sec_vt_count'
  r->count = 0;
   ^~
Compiling ../librpc/ndr/ndr_netlogon.c
../librpc/ndr/ndr_dcerpc.c:60:17: error: 'DCERPC_SEC_VT_COMMAND_END' undeclared (first use in this function); did you mean 'DCERPC_SEC_VT_MAGIC'?
   if (command & DCERPC_SEC_VT_COMMAND_END) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
                 DCERPC_SEC_VT_MAGIC
../librpc/ndr/ndr_dcerpc.c:60:17: note: each undeclared identifier is reported only once for each function it appears in
../librpc/ndr/ndr_dcerpc.c: At top level:
../librpc/ndr/ndr_dcerpc.c:71:9: warning: 'struct dcerpc_sec_verification_trailer' declared inside parameter list will not be visible outside of this definition or declaration
  struct dcerpc_sec_verification_trailer **_r)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./../lib/util/charset/charset.h:28:0,
                 from ./../lib/util/util.h:24,
                 from include/includes.h:506,
                 from ../librpc/ndr/ndr_dcerpc.c:23:
../librpc/ndr/ndr_dcerpc.c: In function 'ndr_pop_dcerpc_sec_verification_trailer':
../librpc/ndr/ndr_dcerpc.c:83:27: error: invalid application of 'sizeof' to incomplete type 'struct dcerpc_sec_verification_trailer'
  r = talloc_zero(mem_ctx, struct dcerpc_sec_verification_trailer);
                           ^
./../lib/talloc/talloc.h:591:65: note: in definition of macro 'talloc_zero'
 #define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
                                                                 ^~~~
../librpc/ndr/ndr_dcerpc.c:100:12: error: 'DCERPC_SEC_VT_MAX_SIZE' undeclared (first use in this function); did you mean 'DCERPC_SEC_VT_MAGIC'?
  if (ofs > DCERPC_SEC_VT_MAX_SIZE) {
            ^~~~~~~~~~~~~~~~~~~~~~
            DCERPC_SEC_VT_MAGIC
../librpc/ndr/ndr_dcerpc.c:142:12: warning: implicit declaration of function 'ndr_pull_dcerpc_sec_verification_trailer'; did you mean 'ndr_pop_dcerpc_sec_verification_trailer'? [-Wimplicit-function-declaration]
  ndr_err = ndr_pull_dcerpc_sec_verification_trailer(sub_ndr,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ndr_pop_dcerpc_sec_verification_trailer
In file included from include/includes.h:23:0,
                 from ../librpc/ndr/ndr_dcerpc.c:23:
../lib/zlib/../replace/replace.h:725:77: error: dereferencing pointer to incomplete type 'struct dcerpc_sec_verification_trailer'
 #define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
                                                                             ^~~~
../librpc/ndr/ndr_dcerpc.c:184:2: note: in expansion of macro 'ZERO_STRUCTP'
  ZERO_STRUCTP(r);
  ^~~~~~~~~~~~

And that seems to be a dependency issue within samba because it can also be resolved via PKG_BUILD_PARALLEL:=0. Given #888, I'm inclined to no longer worry about fixing this old package (hope no one is using it in an sensitive context...).