Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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:
Port: xar

Description

xar @1.8.0.483_3 fails on 10.9 and earlier:

https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/182133/steps/install-port/logs/stdio

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 (7)

comment:1 Changed 2 years ago by Schamschula (Marius Schamschula)

This error is result of eliminating other issues in #64837

Unfortunately, older OS versions seem to ignore #include "xar.h" in xar.c and thus don't have these #define statements.

comment:2 Changed 2 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 Changed 2 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 2 years ago by jmroot (Joshua Root)

In 910521d9f3c891a6aa147f59890a10603968093d/macports-ports (master):

xar: ensure internal xar.h is used

This would previously use the header from the SDK, which will usually
be outdated, or potentially the MacPorts prefix, if an older version
of the port was installed.

See: #64842

comment:5 in reply to:  3 Changed 2 years ago by jmroot (Joshua Root)

Replying to ryandesign:

Weird... It doesn't look like the -I flags are in the wrong order:

No, but none of the directories given with -I contains a xar/xar.h.

comment:6 Changed 2 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

comment:7 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Yup, you win the prize. You found it first! :)

Note: See TracTickets for help on using tickets.