Opened 16 months ago

Last modified 14 months ago

#67960 assigned defect

emacs-mac-app @29.1: error: unknown type name 'ulonglong' — at Version 1

Reported by: squarepegsys (Mike Hostetler) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: emacs-mac-app

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have tried to install the latest emacs-mac-app port via:

sudo port install emacs-mac-app +imagemagick +treesitter +nativecomp +rsvg

And I get the following compile errors:

:info:build In file included from fns.c:5526:
:info:build /opt/local/include/sha1.h:48:3: error: unknown type name 'ulonglong'
:info:build   ulonglong  Length;            /* Message length in bits      */
:info:build   ^
:info:build /opt/local/include/sha1.h:52:3: error: unknown type name 'int16'
:info:build   int16 Message_Block_Index;    /* Index into message block array   */
:info:build   ^
:info:build /opt/local/include/sha1.h:60:1: error: unknown type name 'C_MODE_START'
:info:build C_MODE_START
:info:build ^
:info:build /opt/local/include/sha1.h:66:1: error: unknown type name 'C_MODE_END'
:info:build C_MODE_END
:info:build ^
:info:build fns.c:5775:21: error: use of undeclared identifier 'SHA1_DIGEST_SIZE'; did you mean 'SHA512_DIGEST_SIZE'?
:info:build       digest_size = SHA1_DIGEST_SIZE;
:info:build                     ^~~~~~~~~~~~~~~~
:info:build                     SHA512_DIGEST_SIZE
:info:build ../lib/sha512.h:36:8: note: 'SHA512_DIGEST_SIZE' declared here
:info:build enum { SHA512_DIGEST_SIZE = 512 / 8 };
:info:build        ^
:info:build fns.c:5776:21: error: use of undeclared identifier 'sha1_buffer'; did you mean 'sha512_buffer'?
:info:build       hash_func   = sha1_buffer;
:info:build                     ^~~~~~~~~~~
:info:build                     sha512_buffer
:info:build ../lib/sha512.h:96:14: note: 'sha512_buffer' declared here
:info:build extern void *sha512_buffer (const char *buffer, size_t len,
:info:build              ^
:info:build fns.c:5893:19: error: variable has incomplete type 'struct sha1_ctx'
:info:build   struct sha1_ctx ctx;
:info:build                   ^
:info:build fns.c:5893:10: note: forward declaration of 'struct sha1_ctx'
:info:build   struct sha1_ctx ctx;
:info:build          ^
:info:build fns.c:5903:3: error: call to undeclared function 'sha1_init_ctx'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Change History (2)

Changed 16 months ago by squarepegsys (Mike Hostetler)

Attachment: main.log added

the build log

comment:1 Changed 16 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: x86_64 removed
Owner: set to ryandesign
Port: emacs-mac-app added; emac-mac-app removed
Status: newassigned
Summary: compile errors with emacs-mac-app 29.1emacs-mac-app @29.1: error: unknown type name 'ulonglong'
Version: 2.8.1

This is happening because the build wishes to use the file sha1.h which is part of the emacs-mac-app source code, but erroneously the flag -I/opt/local/include is being used prior to the project's own -I flags, which means that the file /opt/local/include/sha1.h which must have come from some other port is being used instead. The order of the -I flags must be fixed.

Where did this file come from? Find out with:

port provides /opt/local/include/sha1.h

I could not find a port providing that file by searching https://ports.macports.org.

If you were using macOS 12 or earlier you could work around the problem using trace mode:

sudo port clean emacs-mac-app
sudo port -t install emacs-mac-app

But since you are using macOS 13 and trace mode is broken in macOS 13 and later, the solution would be to sudo port -f deactivate whatever port provided /opt/local/include/sha1.h, then install emacs-mac-app, then, if desired, sudo port activate the port that provided sha1.h again.

Note: See TracTickets for help on using tickets.