Summary: | sci-libs/gdal-2.0.2 - /usr/include/sys/types.h:150:27: error: duplicate ‘unsigned’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Sci-geo Project <sci-geosciences> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | orzel, yamadharma |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
accomodate_recent_jasper.patch |
Description
Juergen Rose
2016-10-30 21:39:36 UTC
The public jasper headers seem to like breaking libc headers... jasper/jas_types.h has the following: /* Hopefully, these macro definitions will fix more problems than they cause. */ #if !defined(uchar) #define uchar unsigned char #endif #if !defined(ushort) #define ushort unsigned short #endif #if !defined(uint) #define uint unsigned int #endif #if !defined(ulong) #define ulong unsigned long #endif #if !defined(longlong) #define longlong long long #endif #if !defined(ulonglong) #define ulonglong unsigned long long #endif This breaks when libc headers try to define "ulong" with a typedef: typedef unsigned long ulong Before commit https://github.com/mdadams/jasper/commit/5971949c0c88281c7e5044c367a9d03597fca3fd everything still worked fine, because jas_types.h included <sys/types.h> (with the typedef for ulong) before the macro hackery. Even in that case jasper overrided the libc definition of ulong because #ifdef can only check for preprocessor definitions, and not for typedefs. jasper should really be using typedefs instead of macros. Created attachment 452063 [details, diff]
accomodate_recent_jasper.patch
Dirty compile-time workaround based on Felix Janda's comment.
I get the same error here when compiling gdal. But for a workaround it is possible to disable jpeg2k support with USE=-jpeg2k. Then the package compiles. Of course this is only a intermediate solution. Hit by this too. committer Amy Winston <amynka@gentoo.org> 2016-11-07 13:55:55 (GMT) commit 33c636fd5f8adad1a38696dcc01252b29a77c616 sci-libs/gdal: fix jasper bug #598597 Should be fixed now. Thank you ! |