[MacPorts] #61868: libusb @1.0.24: cannot parse USB.h with mainline gcc versions due to variant pragma handling not accepted by gcc
MacPorts
noreply at macports.org
Sat Jan 23 16:49:53 UTC 2021
#61868: libusb @1.0.24: cannot parse USB.h with mainline gcc versions due to
variant pragma handling not accepted by gcc
-----------------------------------+-----------------------
Reporter: dgonyier | Owner: michaelld
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords:
Port: libusb, libusb-devel |
-----------------------------------+-----------------------
Comment (by ballapete):
For me on PPC Leopard `configure` runs fine with `GCC7`, but later this
happens:
{{{
/bin/sh ../libtool --tag=CC --mode=compile /opt/local/bin/gcc-
mp-7 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -std=gnu11 -Wall
-Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror
=implicit-function-declaration -Werror=implicit-int -Werror=init-self
-Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef
-Werror=uninitialized -fvisibility=hidden -pthread -pipe -Os -arch ppc -MT
os/darwin_usb.lo -MD -MP -MF $depbase.Tpo -c -o os/darwin_usb.lo
os/darwin_usb.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I..
-I/opt/local/include -std=gnu11 -Wall -Wextra -Wshadow -Wunused -Wwrite-
strings -Werror=format-security -Werror=implicit-function-declaration
-Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror
=strict-prototypes -Werror=undef -Werror=uninitialized -fvisibility=hidden
-pthread -pipe -Os -arch ppc -MT os/darwin_usb.lo -MD -MP -MF
os/.deps/darwin_usb.Tpo -c os/darwin_usb.c -fno-common -DPIC -o
os/.libs/darwin_usb.o
In file included from
/System/Library/Frameworks/IOKit.framework/Headers/usb/IOUSBLib.h:27:0,
from os/darwin_usb.h:30,
from os/darwin_usb.c:49:
/System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:594:9: error:
too many #pragma options align=reset
#pragma options align=reset
^~~~~~~
/System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:612:9: error:
too many #pragma options align=reset
#pragma options align=reset
^~~~~~~
/System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:632:9: error:
too many #pragma options align=reset
#pragma options align=reset
^~~~~~~
In file included from os/darwin_usb.h:26:0,
from os/darwin_usb.c:49:
os/darwin_usb.c: In function 'darwin_get_cached_device':
os/darwin_usb.c:1011:16: warning: format '%x' expects argument of type
'unsigned int', but argument 6 has type 'UInt32 {aka long unsigned int}'
[-Wformat=]
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
^
./libusbi.h:287:67: note: in definition of macro '_usbi_log'
#define _usbi_log(ctx, level, ...) usbi_log(ctx, level, __func__,
__VA_ARGS__)
^~~~~~~~~~~
os/darwin_usb.c:1011:7: note: in expansion of macro 'usbi_dbg'
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
^~~~~~~~
os/darwin_usb.c:1011:64: note: format string is defined here
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
~^
%lx
In file included from os/darwin_usb.h:26:0,
from os/darwin_usb.c:49:
os/darwin_usb.c:1011:16: warning: format '%x' expects argument of type
'unsigned int', but argument 8 has type 'UInt32 {aka long unsigned int}'
[-Wformat=]
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
^
sessionID, locationID, new_device->session,
new_device->location);
~~~~~~~~~~~~~
./libusbi.h:287:67: note: in definition of macro '_usbi_log'
#define _usbi_log(ctx, level, ...) usbi_log(ctx, level, __func__,
__VA_ARGS__)
^~~~~~~~~~~
os/darwin_usb.c:1011:7: note: in expansion of macro 'usbi_dbg'
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
^~~~~~~~
os/darwin_usb.c:1011:131: note: format string is defined here
usbi_dbg("matching sessionID/locationID 0x%" PRIx64 "/0x%x against
cached device with sessionID/locationID 0x%" PRIx64 "/0x%x",
~^
%lx
make[2]: *** [os/darwin_usb.lo] Error 1
make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libusb/libusb/work
/libusb-libusb-c6a35c5/libusb'
}}}
--
Ticket URL: <https://trac.macports.org/ticket/61868#comment:27>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list