Opened 20 months ago
Last modified 4 months ago
#68414 assigned defect
emacs-app @29.1_2: error: incomplete definition of type 'struct dynarray_header'
Reported by: | ekinakoglu (Ekin Akoglu) | Owned by: | drkp (Dan Ports) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | catap (Kirill A. Korinsky), cooljeanius (Eric Gallager), amake (Aaron Madlon-Kay) | |
Port: | emacs-app emacs-mac-app |
Description
When building emacs-app on macOS Sonoma, the build fails with:
:info:build malloc/dynarray_resize_clear.c:27:38: warning: declaration of 'struct dynarray_header' will not be visible outside of this function [-Wvisibility] :info:build __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_resize_clear.c:30:25: error: incomplete definition of type 'struct dynarray_header' :info:build size_t old_size = list->used; :info:build ~~~~^ :info:build malloc/dynarray_resize_clear.c:27:38: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_finalize.c:28:34: warning: declaration of 'struct dynarray_header' will not be visible outside of this function [-Wvisibility] :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:30:34: warning: declaration of 'struct dynarray_finalize_result' will not be visible outside of this function [-Wvisibility] :info:build struct dynarray_finalize_result *result) :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: warning: declaration of 'struct dynarray_header' will not be visible outside of this function [-Wvisibility] :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build malloc/dynarray_resize.c:30:32: warning: declaration of 'struct dynarray_header' will not be visible outside of this function [-Wvisibility] ^ :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_emplace_enlarge.cmalloc/dynarray_resize.c::3434::1119:: error: error: incomplete definition of type 'struct dynarray_header'incomplete definition of type 'struct dynarray_header' :info:build if (list->allocated == 0) :info:build ~~~~^ :info:build if (size <= list->allocated)malloc/dynarray_emplace_enlarge.c :info:build : ~~~~^30 :info:build :41: note: forward declaration of 'struct dynarray_header'malloc/dynarray_resize.c:30:32: :info:build note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_resize.c:36:11: error: incomplete definition of type 'struct dynarray_header' :info:build list->used = size; :info:build ~~~~^ :info:build malloc/dynarray_resize.c:30:32: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^malloc/dynarray_emplace_enlarge.c :info:build :49:27: error: incomplete definition of type 'struct dynarray_header' :info:build new_allocated = list->allocated + list->allocated / 2 + 1; :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:49:45: error: incomplete definition of type 'struct dynarray_header' :info:build new_allocated = list->allocated + list->allocated / 2 + 1; :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:50:32: error: incomplete definition of type 'struct dynarray_header' :info:build if (new_allocated <= list->allocated) :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_resize.c:52:11: error: incomplete definition of type 'struct dynarray_header' :info:build if (list->array == scratch) :info:build ~~~~^ :info:build malloc/dynarray_resize.c:30:32: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_resize.c:56:36: error: incomplete definition of type 'struct dynarray_header' :info:build if (new_array != NULL && list->array != NULL) :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:malloc/dynarray_resize.c62::3011::32 :error: incomplete definition of type 'struct dynarray_header'note: :info:build forward declaration of 'struct dynarray_header' :info:build if (list->array == scratch) :info:build ~~~~^ :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build malloc/dynarray_emplace_enlarge.c ^: :info:build 30:41: note: forward declaration of 'struct dynarray_header' :info:build malloc/dynarray_resize.c:57:32__libc_dynarray_emplace_enlarge (struct dynarray_header *list,: :info:build ^error: :info:build incomplete definition of type 'struct dynarray_header' :info:build memcpy (new_array, list->array, list->used * element_size); :info:build ~~~~^ :info:build malloc/dynarray_resize.c:30:32: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:66malloc/dynarray_resize.c:57:45:: 36error: :incomplete definition of type 'struct dynarray_header' :info:build error: incomplete definition of type 'struct dynarray_header' :info:build memcpy (new_array, list->array, list->used * element_size); if (new_array != NULL && list->array != NULL) :info:build ~~~~^ ~~~~^ :info:build malloc/dynarray_resize.c:malloc/dynarray_emplace_enlarge.c30::3032::41 :note: forward declaration of 'struct dynarray_header'note: :info:build forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize (struct dynarray_header *list, size_t size,__libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ ^ :info:build malloc/dynarray_resize.c:malloc/dynarray_emplace_enlarge.c60::6730::32 :error: incomplete definition of type 'struct dynarray_header'error: :info:build incomplete definition of type 'struct dynarray_header' :info:build new_array = realloc (list->array, new_size_bytes); :info:build ~~~~^ :info:build memcpy (new_array, list->array, list->used * element_size); :info:build malloc/dynarray_resize.c ~~~~^: :info:build 30:malloc/dynarray_emplace_enlarge.c:30:41:32 :note: forward declaration of 'struct dynarray_header'note: :info:build forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^__libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:67:45: error: incomplete definition of type 'struct dynarray_header' :info:build memcpy (new_array, list->array, list->used * element_size); :info:build ~~~~^ :info:build malloc/dynarray_resize.cmalloc/dynarray_emplace_enlarge.c::6330::741:: error: note: incomplete definition of type 'struct dynarray_header'forward declaration of 'struct dynarray_header' :info:build list->array = new_array; :info:build ~~~~^ :info:build malloc/dynarray_resize.c__libc_dynarray_emplace_enlarge (struct dynarray_header *list,: :info:build 30 ^: :info:build 32: note: forward declaration of 'struct dynarray_header' :info:build malloc/dynarray_emplace_enlarge.c:70:30__libc_dynarray_resize (struct dynarray_header *list, size_t size,: :info:build ^error: :info:build incomplete definition of type 'struct dynarray_header' :info:build malloc/dynarray_resize.c:64:7: new_array = realloc (list->array, new_size); :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.cerror: :incomplete definition of type 'struct dynarray_header'30 :info:build :41: note: forward declaration of 'struct dynarray_header' :info:build list->allocated = size; :info:build ~~~~^ :info:build malloc/dynarray_resize.c:30__libc_dynarray_emplace_enlarge (struct dynarray_header *list,: :info:build 32 ^: :info:build note: forward declaration of 'struct dynarray_header' :info:build malloc/dynarray_emplace_enlarge.c:73:7:__libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build error: ^incomplete definition of type 'struct dynarray_header' :info:build malloc/dynarray_resize.c: list->array = new_array;65 :info:build : ~~~~^7 :info:build : malloc/dynarray_emplace_enlarge.cerror: :incomplete definition of type 'struct dynarray_header'30 :info:build :41: note: list->used = size;forward declaration of 'struct dynarray_header' :info:build ~~~~^ :info:build malloc/dynarray_resize.c:30:32: note: __libc_dynarray_emplace_enlarge (struct dynarray_header *list,forward declaration of 'struct dynarray_header' :info:build ^ :info:build malloc/dynarray_emplace_enlarge.c:74:7:__libc_dynarray_resize (struct dynarray_header *list, size_t size, :info:build error: ^incomplete definition of type 'struct dynarray_header' :info:build list->allocated = new_allocated; :info:build ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build ^ :info:build 1 warning and 10 errors generated. :info:build 1 warning and 11 errors generated. :info:build malloc/dynarray_finalize.c:32:7: error: call to undeclared function '__dynarray_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] :info:build if (__dynarray_error (list)) :info:build ^ :info:build malloc/dynarray_finalize.c:36:21: error: incomplete definition of type 'struct dynarray_header' :info:build size_t used = list->used; :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:43:15: error: incomplete definition of type 'struct dynarray_header' :info:build if (list->array != scratch) :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:44:19: error: incomplete definition of type 'struct dynarray_header' :info:build free (list->array); :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:45:17: error: variable has incomplete type 'struct dynarray_finalize_result' :info:build *result = (struct dynarray_finalize_result) { NULL, 0 }; :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build malloc/dynarray_finalize.c:30:34: note: forward declaration of 'struct dynarray_finalize_result' :info:build struct dynarray_finalize_result *result) :info:build ^ :info:build malloc/dynarray_finalize.c:54:15: error: incomplete definition of type 'struct dynarray_header' :info:build if (list->array != NULL) :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:55:33: error: incomplete definition of type 'struct dynarray_header' :info:build memcpy (heap_array, list->array, allocation_size); :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:56:15: error: incomplete definition of type 'struct dynarray_header' :info:build if (list->array != scratch) :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:57:19: error: incomplete definition of type 'struct dynarray_header' :info:build free (list->array); :info:build ~~~~^ :info:build malloc/dynarray_finalize.c:28:34: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_finalize (struct dynarray_header *list, :info:build ^ :info:build malloc/dynarray_finalize.c:58:17: error: variable has incomplete type 'struct dynarray_finalize_result' :info:build *result = (struct dynarray_finalize_result) :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build malloc/dynarray_finalize.c:30:34: note: forward declaration of 'struct dynarray_finalize_result' :info:build struct dynarray_finalize_result *result) :info:build ^ :info:build 2 warnings and 10 errors generated. :info:build make[2]: *** [malloc/dynarray_emplace_enlarge.o] Error 1 :info:build make[2]: *** Waiting for unfinished jobs.... :info:build make[2]: *** [malloc/dynarray_resize.o] Error 1 :info:build make[2]: *** [malloc/dynarray_finalize.o] Error 1 :info:build malloc/dynarray_resize_clear.c:31:8: error: call to undeclared function '__libc_dynarray_resize'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] :info:build if (!__libc_dynarray_resize (list, size, scratch, element_size)) :info:build ^ :info:build malloc/dynarray_resize_clear.c:31:8: note: did you mean '__libc_dynarray_resize_clear'? :info:build malloc/dynarray_resize_clear.c:27:1: note: '__libc_dynarray_resize_clear' declared here :info:build __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, :info:build ^ :info:build malloc/dynarray_resize_clear.c:34:21: error: incomplete definition of type 'struct dynarray_header' :info:build char *array = list->array; :info:build ~~~~^ :info:build malloc/dynarray_resize_clear.c:27:38: note: forward declaration of 'struct dynarray_header' :info:build __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, :info:build ^ :info:build 1 warning and 3 errors generated. :info:build make[2]: *** [malloc/dynarray_resize_clear.o] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.1/lib' :info:build make[1]: *** [lib] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.1' :info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/emacs-app/work/emacs-29.1' :info:build *** :info:build *** "make all" failed with exit status 2.
Change History (6)
comment:1 Changed 20 months ago by ekinakoglu (Ekin Akoglu)
Summary: | emacs-app @ 29.1_2 fails - error: incomplete definition of type 'struct dynarray_header' and → emacs-app @ 29.1_2 fails - error: incomplete definition of type 'struct dynarray_header' |
---|
comment:2 Changed 20 months ago by ekinakoglu (Ekin Akoglu)
Port: | emacs-mac-app added |
---|
comment:3 Changed 14 months ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
comment:4 Changed 14 months ago by cooljeanius (Eric Gallager)
comment:5 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Summary: | emacs-app @ 29.1_2 fails - error: incomplete definition of type 'struct dynarray_header' → emacs-app @29.1_2: error: incomplete definition of type 'struct dynarray_header' |
---|
Please attach the main.log file.
#72124 reports the same error happening with the emacs port.
comment:6 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | amake added; drkp removed |
---|---|
Owner: | set to drkp |
Status: | new → assigned |
The error is also reported in #62804. There, I suspect the problem is caused by having the hdf4 port installed, so try e.g.:
sudo port clean emacs-app sudo port -f deactivate hdf4 sudo port install emacs-app sudo port activate hdf4
Note: See
TracTickets for help on using
tickets.
I've seen this error on Big Sur and found that trace mode works around it there, at least partially, as the build will then proceed a little further, and then need to be continued with trace mode turned off again, which allows it to proceed a little further, before it can finally be finished with trace mode turned on again