Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with make on M1 mac #951

Closed
romanjlewis opened this issue Mar 8, 2024 · 1 comment
Closed

Error with make on M1 mac #951

romanjlewis opened this issue Mar 8, 2024 · 1 comment

Comments

@romanjlewis
Copy link

It seems like an issue similar to #820. When I try and make I get these errors.

In file included from print.c:397:
./dwg.spec:5969:15: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
VALUE_RS (0, 360);
~~~~~~~~~~^~~~~~~
print.c:216:37: note: expanded from macro 'VALUE_RS'
#define VALUE_RS(value, dxf) VALUE (value, RS, dxf)
~~~~~~~^~~~~~~~~~~~~~~
print.c:214:55: note: expanded from macro 'VALUE'
LOG_TRACE (FORMAT_##type " [" #type " " #dxf "]\n", value)

./logging.h:102:36: note: expanded from macro 'LOG_TRACE'
#define LOG_TRACE(...) LOG (TRACE, __VA_ARGS__)
                     ~~~~~~~~~~~~^~~~~~~~~~~~
./logging.h:61:26: note: expanded from macro 'LOG'
      HANDLER (OUTPUT, __VA_ARGS__);                                        \
                       ^~~~~~~~~~~
In file included from print.c:397:
./dwg.spec:5974:17: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
    VALUE_RS (0, 94);
    ~~~~~~~~~~^~~~~~
print.c:216:37: note: expanded from macro 'VALUE_RS'
#define VALUE_RS(value, dxf) VALUE (value, RS, dxf)
                           ~~~~~~~^~~~~~~~~~~~~~~
print.c:214:55: note: expanded from macro 'VALUE'
LOG_TRACE (FORMAT_##type " [" #type " " #dxf "]\n", value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
./logging.h:102:36: note: expanded from macro 'LOG_TRACE'
#define LOG_TRACE(...) LOG (TRACE, __VA_ARGS__)
                     ~~~~~~~~~~~~^~~~~~~~~~~~
./logging.h:61:26: note: expanded from macro 'LOG'
      HANDLER (OUTPUT, __VA_ARGS__);                                        \
                       ^~~~~~~~~~~
In file included from print.c:397:
./dwg.spec:6102:17: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
    VALUE_RS (0, 94);
    ~~~~~~~~~~^~~~~~
print.c:216:37: note: expanded from macro 'VALUE_RS'
#define VALUE_RS(value, dxf) VALUE (value, RS, dxf)
                           ~~~~~~~^~~~~~~~~~~~~~~
print.c:214:55: note: expanded from macro 'VALUE'
LOG_TRACE (FORMAT_##type " [" #type " " #dxf "]\n", value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
./logging.h:102:36: note: expanded from macro 'LOG_TRACE'
#define LOG_TRACE(...) LOG (TRACE, __VA_ARGS__)
                     ~~~~~~~~~~~~^~~~~~~~~~~~
./logging.h:61:26: note: expanded from macro 'LOG'
      HANDLER (OUTPUT, __VA_ARGS__);                                        \
                       ^~~~~~~~~~~
In file included from print.c:397:
./dwg.spec:12343:5: error: format specifies type 'unsigned short' but the argument has type 'BITCODE_BL' (aka 'unsigned int') [-Werror,-Wformat]
  SUB_FIELD_BS (hdls[rcount1], long1, 94);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./spec.h:193:37: note: expanded from macro 'SUB_FIELD_BS'
#  define SUB_FIELD_BS(o, nam, dxf) FIELDG (o.nam, BS, dxf)
                                  ^~~~~~~~~~~~~~~~~~~~~~~
print.c:47:32: note: expanded from macro 'FIELDG'
#define FIELDG(nam, type, dxf) FIELD_G_TRACE (nam, type, dxf)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print.c:51:65: note: expanded from macro 'FIELD_G_TRACE'
LOG_TRACE (#nam ": " FORMAT_##type " [" #type " " #dxf "]\n", _obj->nam)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
./logging.h:102:36: note: expanded from macro 'LOG_TRACE'
#define LOG_TRACE(...) LOG (TRACE, __VA_ARGS__)
                     ~~~~~~~~~~~~^~~~~~~~~~~~
./logging.h:61:26: note: expanded from macro 'LOG'
      HANDLER (OUTPUT, __VA_ARGS__);                                        \
                       ^~~~~~~~~~~
In file included from print.c:397:
./dwg.spec:12348:5: error: format specifies type 'unsigned short' but the argument has type 'BITCODE_BL' (aka 'unsigned int') [-Werror,-Wformat]
  SUB_FIELD_BS (hdls[rcount1], long2, 94);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./spec.h:193:37: note: expanded from macro 'SUB_FIELD_BS'
#  define SUB_FIELD_BS(o, nam, dxf) FIELDG (o.nam, BS, dxf)
                                  ^~~~~~~~~~~~~~~~~~~~~~~
print.c:47:32: note: expanded from macro 'FIELDG'
#define FIELDG(nam, type, dxf) FIELD_G_TRACE (nam, type, dxf)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print.c:51:65: note: expanded from macro 'FIELD_G_TRACE'
LOG_TRACE (#nam ": " FORMAT_##type " [" #type " " #dxf "]\n", _obj->nam)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
./logging.h:102:36: note: expanded from macro 'LOG_TRACE'
#define LOG_TRACE(...) LOG (TRACE, __VA_ARGS__)
                     ~~~~~~~~~~~~^~~~~~~~~~~~
./logging.h:61:26: note: expanded from macro 'LOG'
      HANDLER (OUTPUT, __VA_ARGS__);                                        \
                       ^~~~~~~~~~~
5 errors generated.
make[4]: *** [print.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@rurban
Copy link
Contributor

rurban commented Mar 10, 2024

./configure --disable-werror for the time being.
but I've added a better fix

rurban added a commit that referenced this issue Mar 10, 2024
rurban added a commit that referenced this issue Mar 10, 2024
0 is int, not short.
Fixes GH #951, -Werror,-Wformat
rurban added a commit that referenced this issue Mar 10, 2024
rurban added a commit that referenced this issue Mar 10, 2024
0 is int, not short.
Fixes GH #951, -Werror,-Wformat
rurban added a commit that referenced this issue Mar 10, 2024
0 is int, not short. But C doesn't know numeric literals shorter than int,
so the new Apple M1 clang is overly strict.

Fixes GH #951, -Werror,-Wformat on the M1
@rurban rurban closed this as completed Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants