Note that there are some explanatory texts on larger screens.

plurals
  1. PO"error: too many #pragma options align=reset" on mac with gcc 4.8
    text
    copied!<p>I used macports to update gcc to version 4.8.1. I would like to use that version to build libusbx 1.0.17. But when I './configure' and then 'make' libusbx I get "error: too many #pragma options align=reset" (see error bellow), and it fails to build. If I configure libusbx with 'CC=clang ./configure' and then 'make' it works fine but that is building with gcc 4.2, and that is not what I want. Is there any way to build libusbx with gcc 4.8 on mac? Thanks</p> <pre><code>make all-recursive Making all in libusb CC libusb_1_0_la-core.lo CC libusb_1_0_la-descriptor.lo CC libusb_1_0_la-io.lo CC libusb_1_0_la-strerror.lo CC libusb_1_0_la-sync.lo CC libusb_1_0_la-hotplug.lo CC os/libusb_1_0_la-threads_posix.lo CC os/libusb_1_0_la-darwin_usb.lo In file included from /System/Library/Frameworks/IOKit.framework/Headers/usb/IOUSBLib.h:27:0, from os/darwin_usb.h:27, from os/darwin_usb.c:43: /System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:576:9: error: too many #pragma options align=reset #pragma options align=reset ^ In file included from /System/Library/Frameworks/IOKit.framework/Headers/usb/IOUSBLib.h:27:0, from os/darwin_usb.h:27, from os/darwin_usb.c:43: /System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:746:9: error: too many #pragma options align=reset #pragma options align=reset ^ /System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:797:9: error: too many #pragma options align=reset #pragma options align=reset ^ /System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:815:9: error: too many #pragma options align=reset #pragma options align=reset ^ /System/Library/Frameworks/IOKit.framework/Headers/usb/USB.h:835:9: error: too many #pragma options align=reset #pragma options align=reset ^ os/darwin_usb.c: In function 'darwin_get_device_descriptor': os/darwin_usb.c:58:76: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] #define DARWIN_CACHED_DEVICE(a) ((struct darwin_cached_device *) (((struct darwin_device_priv *)((a)-&gt;os_priv))-&gt;dev)) ^ [...]' </code></pre> <p>In USB.h file the pragma's seem to be in this form.</p> <pre><code>#pragma pack(1) ... struct .... #pragma options align=reset </code></pre> <p>What is the equivalent that works with gcc 4.8? They all seem to be paired correctly, so the issue must be that gcc 4.8 does not understand one or the other.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload