Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60782 closed defect (fixed)

libaacs: error: implicit declaration of function is invalid in C99

Reported by: dyne2meter Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: libaacs

Description

:info:build src/examples/aacs_info.c:122:33: error: implicit declaration of function 'aacs_get_bdj_root_cert_hash' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build     const uint8_t *bdj_hash   = aacs_get_bdj_root_cert_hash(aacs);
:info:build                                 ^
:info:build src/examples/aacs_info.c:122:20: warning: incompatible integer to pointer conversion initializing 'const uint8_t *' (aka 'const unsigned char *') with an expression of type 'int' [-Wint-conversion]
:info:build     const uint8_t *bdj_hash   = aacs_get_bdj_root_cert_hash(aacs);
:info:build                    ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build src/examples/aacs_info.c:123:33: error: implicit declaration of function 'aacs_get_content_cert_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build     const uint8_t *cc_id      = aacs_get_content_cert_id(aacs);
:info:build                                 ^
:info:build src/examples/aacs_info.c:123:20: warning: incompatible integer to pointer conversion initializing 'const uint8_t *' (aka 'const unsigned char *') with an expression of type 'int' [-Wint-conversion]
:info:build     const uint8_t *cc_id      = aacs_get_content_cert_id(aacs);
:info:build                    ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 2 warnings and 2 errors generated.

Attachments (1)

main.log.zip (5.5 KB) - added by dyne2meter 4 years ago.
main.log

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by dyne2meter

Attachment: main.log.zip added

main.log

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: libaacs C99 removed
Owner: set to i0ntempest
Status: newassigned
Summary: libaacslibaacs: error: implicit declaration of function is invalid in C99

It probably shouldn't be using -Werror.

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

But it built successfully on many macOS versions on our buildbot. The 10.11 builder was temporarily offline so it hadn't built this yet, but it's back online now. We should check if it builds this port without error, and if so, we should compare its log with the one attached to this ticket to see what's different.

comment:3 Changed 4 years ago by dyne2meter

It won't differ, at least not by much. This build failure was on 10.11

comment:4 Changed 4 years ago by i0ntempest

Do you by chance have the previous version of the library active? If yes maybe deactivate it and try again, I noticed this when trying to upgrade from 0.9 to 0.10

comment:5 Changed 4 years ago by jmroot (Joshua Root)

If that works, it would indicate incorrect ordering of include flags.

comment:6 in reply to:  4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

We should check if it builds this port without error, and if so, we should compare its log with the one attached to this ticket to see what's different.

Successful build on buildbot:

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/117016

Looking at the diff between the logs isn't very helpful because the port didn't disable silent build rules. I've fixed that now.

Replying to i0ntempest:

Do you by chance have the previous version of the library active? If yes maybe deactivate it and try again, I noticed this when trying to upgrade from 0.9 to 0.10

Yes, I can confirm that I see that problem on my macOS 10.13 system with libaacs @0.8.1 installed.

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

Resolution: fixed
Status: assignedclosed

In ef39340413dd948928012923c56bb1265477d37d/macports-ports (master):

libaacs: Use -isystem instead of -I

Works around incorrect order of flags and fixes a potential build
failure when a previous version of the port is installed.

Closes: #60782

comment:8 Changed 4 years ago by jmroot (Joshua Root)

In 76973121d7f85a25c850223b7736ced12f5c5aa5/macports-ports (master):

libaacs: fix incorrect include ordering

Fixes: #60782

Note: See TracTickets for help on using tickets.