Opened 2 months ago
Last modified 7 weeks ago
#72124 assigned defect
emacs @30.1: error: incomplete definition of type 'struct dynarray_header'
Reported by: | jwhowse4 | Owned by: | drkp (Dan Ports) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.5 |
Keywords: | sequoia arm64 | Cc: | |
Port: | emacs emacs-app |
Description
I have an M4 ARM based Mac running Sequoia 15.3.1. The build for the port emacs @30.1_1 fails. The first set of apparent errors in the build log are as follows.
:info:build /usr/bin/clang -c -I/opt/macports/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -MMD -MF deps/lstat.d -MP -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes -Wno-unknown-pragmas -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-deprecated-declarations -pipe -Os -Wno-attributes -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -I. -I../src -I. -I../src -DGL_COMPILE_CRYPTO_STREAM -o lstat.o lstat.c :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 30 | __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build | ^ :info:build malloc/dynarray_emplace_enlarge.c:34:11: error: incomplete definition of type 'struct dynarray_header' :info:build 34 | if (list->allocated == 0) :info:build | ~~~~^ :info:build malloc/dynarray_emplace_enlarge.c:30:41: note: forward declaration of 'struct dynarray_header' :info:build 30 | __libc_dynarray_emplace_enlarge (struct dynarray_header *list, :info:build | ^
I have attached the complete build log. Any idea what is going wrong here?
I get the same error when trying to build the port emacs-app.
Attachments (1)
Change History (7)
Changed 2 months ago by jwhowse4
Attachment: | emacs_main.log added |
---|
comment:1 Changed 2 months ago by jwhowse4
I forgot to add that I have Xcode 16.2 and the associated command line tools.
comment:2 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dports@… removed |
---|---|
Keywords: | sequoia arm64 added |
Owner: | set to drkp |
Port: | emacs-app removed |
Status: | new → assigned |
Summary: | emacs fails to build → emacs @30.1: error: incomplete definition of type 'struct dynarray_header' |
comment:3 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)
Port: | emacs-app added |
---|
#68414 reported the same thing with emacs-app and emacs-mac-app but no log files were provided there so we can't easily analyze that failure.
Comparing your log with our successful build on the build server, I see your build found lcms2 opportunistically. We should certainly fix that. But I don't know whether it is contributing to your build failure, especially since emacs-app declares a dependency on lcms2 and also builds fine on our build server. Still, you could test whether lcms2 is the cause of your emacs build failure by running:
sudo port clean emacs sudo port -f deactivate lcms2 sudo port install emacs sudo port activate lcms2
comment:4 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)
The error is also mentioned in #62804. There, I suspect the problem is caused by having the hdf4 port installed, so try:
sudo port clean emacs sudo port -f deactivate hdf4 sudo port install emacs sudo port activate hdf4
comment:5 Changed 2 months ago by jwhowse4
Thank you very much for your suggestions. Deactivating lcms2 resulted in the same error during the build. However deactivating hdf4, which was installed as part of netcdf, resulted in a successful build of both emacs and emacs-app. So at least on my system the problem was hdf4 and my non-standard netcdf configuration.
comment:6 Changed 7 weeks ago by massonseb
I had exactly the same error. Once deactivating hdf4, emacs compiled perfectly. Thanks a lot for the tip!
Full emacs build log