#64842 closed defect (fixed)
xar @1.8.0.483_3: error: use of undeclared identifier 'XAR_CKSUM_SHA256', 'XAR_CKSUM_SHA512'
| Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | Schamschula (Marius Schamschula) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.7.2 |
| Keywords: | tiger leopard snowleopard lion mountainlion mavericks | Cc: | jmroot (Joshua Root) |
| Port: | xar |
Description
xar @1.8.0.483_3 fails on 10.9 and earlier:
src/xar.c:722:8: error: use of undeclared identifier 'XAR_CKSUM_SHA256'
case XAR_CKSUM_SHA256: printf("SHA256\n");
^
src/xar.c:724:8: error: use of undeclared identifier 'XAR_CKSUM_SHA512'
case XAR_CKSUM_SHA512: printf("SHA512\n");
^
Change History (9)
comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)
comment:2 Changed 4 years ago by jmroot (Joshua Root)
I think what is happening is that an external xar.h is being included, i.e. one from the SDK or MacPorts prefix, not the one in the worksrcdir. The one in the SDK only has those defines on the newer OS versions. This theory is supported by the fact that if I have the xar port already installed on the older OSes, the build succeeds.
comment:3 follow-up: 5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Weird... It doesn't look like the -I flags are in the wrong order:
/usr/bin/clang -pipe -I/opt/local/libexec/openssl3/include -Os -std=c99 -arch x86_64 -Iinclude -Iinclude -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -I/opt/local/include/libxml2 -c src/xar.c -o src/xar.o
comment:4 Changed 4 years ago by jmroot (Joshua Root)
comment:5 Changed 4 years ago by jmroot (Joshua Root)
Replying to ryandesign:
Weird... It doesn't look like the
-Iflags are in the wrong order:
No, but none of the directories given with -I contains a xar/xar.h.
comment:6 Changed 4 years ago by jmroot (Joshua Root)
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:7 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Yup, you win the prize. You found it first! :)
comment:8 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | jmroot added |
|---|
The problem has resurfaced in #71151 after your fix was removed.
I do wonder: why did you use a patchfile to remove the check for XARSIG_BUILDING_WITH_XAR rather than just defining XARSIG_BUILDING_WITH_XAR like the Xcode project file (that we don't use) does?
comment:9 Changed 15 months ago by jmroot (Joshua Root)
No idea, I had completely forgotten about this until now. :)

This error is result of eliminating other issues in #64837
Unfortunately, older OS versions seem to ignore
#include "xar.h"inxar.cand thus don't have these#definestatements.