GNU bug report logs -
#27059
Can't compile master branch on Mac OS X
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27059 in the body.
You can then email your comments to 27059 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Wed, 24 May 2017 16:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Caldwell <david <at> porkrind.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 24 May 2017 16:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On Mac OS X 10.9 (Mavericks) and Mac OS X 10.8 (Mountain Lion):
CC nsterm.o
nsterm.m:5496:33: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
return NSRunAlertPanel(title, msgFormat, defaultButton,
alternateButton, nil)
^~~~~~~~~
1 warning generated.
CC nsfns.o
CC nsmenu.o
nsmenu.m:1496:70: error: expected a type
- (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
(NSWindowStyleMask)aStyle
^
nsmenu.m:1520:10: warning: incompatible integer to pointer conversion
assigning to 'id' from 'int' [-Wint-conversion]
aStyle =
NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskUtilityWindow;
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nsmenu.m:1524:54: warning: incompatible pointer to integer conversion
sending 'id' to parameter of type 'NSUInteger' (aka 'unsigned long')
[-Wint-conversion]
[super initWithContentRect: contentRect styleMask: aStyle
^~~~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:289:69:
note: passing argument to parameter 'aStyle' here
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
^
nsmenu.m:1496:88: warning: conflicting parameter types in implementation
of 'initWithContentRect:styleMask:backing:defer:': 'NSUInteger' (aka
'unsigned long') vs 'id' [-Wmismatched-parameter-types]
- (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
(NSWindowStyleMask)aStyle
^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:289:69:
note: previous definition is here
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
~~~~~~~~~~ ^
3 warnings and 1 error generated.
make[1]: *** [nsmenu.o] Error 1
make: *** [src] Error 2
make failed
On Mac OS X 10.6 (Snow Leopard):
CC nsterm.o
In file included from nsterm.m:48:
nsterm.h:454: error: expected ')' before 'instancetype'
nsterm.h:455: error: expected ')' before 'instancetype'
nsterm.h:456: error: expected ')' before 'instancetype'
nsterm.h:460: error: expected ')' before 'instancetype'
nsterm.h:463: error: expected ')' before 'instancetype'
nsterm.h:523: error: expected ')' before 'instancetype'
nsterm.h:557: error: expected ')' before 'instancetype'
nsterm.h:592: error: expected ')' before 'instancetype'
nsterm.h:611: error: expected ')' before 'instancetype'
nsterm.h:659: error: expected ')' before 'instancetype'
nsterm.h:661: error: expected ')' before 'instancetype'
nsterm.h:663: error: expected ')' before 'instancetype'
nsterm.h:664: error: expected ')' before 'instancetype'
nsterm.h:703: error: expected ')' before 'instancetype'
nsterm.h:706: error: expected ')' before 'instancetype'
nsterm.h:710: error: expected ')' before 'instancetype'
nsterm.h:711: error: expected ')' before 'instancetype'
nsterm.h:712: error: expected ')' before 'instancetype'
nsterm.h:735: error: expected ')' before 'instancetype'
nsterm.m:6900: error: expected ')' before 'instancetype'
nsterm.m:7630: error: expected ')' before 'instancetype'
nsterm.m:7655: error: expected ')' before 'instancetype'
nsterm.m:7681: error: expected ')' before 'instancetype'
nsterm.m:7909: error: expected ')' before 'instancetype'
nsterm.m:8261: error: expected ')' before 'instancetype'
nsterm.m:8345: error: expected ')' before 'instancetype'
nsterm.m:8353: error: expected ')' before 'instancetype'
nsterm.m:8408: error: expected ')' before 'instancetype'
nsterm.m:8487: error: expected ')' before 'instancetype'
make[1]: *** [nsterm.o] Error 1
make: *** [src] Error 2
make failed
I think these may have been caused by the recent GNUStep changes.
-David
Merged 27041 27059.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 24 May 2017 16:59:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Wed, 24 May 2017 20:21:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
David Caldwell <david <at> porkrind.org> schrieb am Mi., 24. Mai 2017 um
18:24 Uhr:
> On Mac OS X 10.9 (Mavericks) and Mac OS X 10.8 (Mountain Lion):
>
> CC nsterm.o
> nsterm.m:5496:33: warning: format string is not a string literal
> (potentially insecure) [-Wformat-security]
> return NSRunAlertPanel(title, msgFormat, defaultButton,
> alternateButton, nil)
> ^~~~~~~~~
> 1 warning generated.
> CC nsfns.o
> CC nsmenu.o
> nsmenu.m:1496:70: error: expected a type
> - (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
> (NSWindowStyleMask)aStyle
> ^
> nsmenu.m:1520:10: warning: incompatible integer to pointer conversion
> assigning to 'id' from 'int' [-Wint-conversion]
> aStyle =
>
> NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskUtilityWindow;
> ^
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> nsmenu.m:1524:54: warning: incompatible pointer to integer conversion
> sending 'id' to parameter of type 'NSUInteger' (aka 'unsigned long')
> [-Wint-conversion]
> [super initWithContentRect: contentRect styleMask: aStyle
> ^~~~~~
> /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:289:69:
> note: passing argument to parameter 'aStyle' here
> - (id)initWithContentRect:(NSRect)contentRect
> styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
> defer:(BOOL)flag;
> ^
> nsmenu.m:1496:88: warning: conflicting parameter types in implementation
> of 'initWithContentRect:styleMask:backing:defer:': 'NSUInteger' (aka
> 'unsigned long') vs 'id' [-Wmismatched-parameter-types]
> - (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
> (NSWindowStyleMask)aStyle
>
> ^
> /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:289:69:
> note: previous definition is here
> - (id)initWithContentRect:(NSRect)contentRect
> styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
> defer:(BOOL)flag;
> ~~~~~~~~~~ ^
> 3 warnings and 1 error generated.
> make[1]: *** [nsmenu.o] Error 1
> make: *** [src] Error 2
> make failed
>
>
>
> On Mac OS X 10.6 (Snow Leopard):
> CC nsterm.o
> In file included from nsterm.m:48:
> nsterm.h:454: error: expected ')' before 'instancetype'
> nsterm.h:455: error: expected ')' before 'instancetype'
> nsterm.h:456: error: expected ')' before 'instancetype'
> nsterm.h:460: error: expected ')' before 'instancetype'
> nsterm.h:463: error: expected ')' before 'instancetype'
> nsterm.h:523: error: expected ')' before 'instancetype'
> nsterm.h:557: error: expected ')' before 'instancetype'
> nsterm.h:592: error: expected ')' before 'instancetype'
> nsterm.h:611: error: expected ')' before 'instancetype'
> nsterm.h:659: error: expected ')' before 'instancetype'
> nsterm.h:661: error: expected ')' before 'instancetype'
> nsterm.h:663: error: expected ')' before 'instancetype'
> nsterm.h:664: error: expected ')' before 'instancetype'
> nsterm.h:703: error: expected ')' before 'instancetype'
> nsterm.h:706: error: expected ')' before 'instancetype'
> nsterm.h:710: error: expected ')' before 'instancetype'
> nsterm.h:711: error: expected ')' before 'instancetype'
> nsterm.h:712: error: expected ')' before 'instancetype'
> nsterm.h:735: error: expected ')' before 'instancetype'
> nsterm.m:6900: error: expected ')' before 'instancetype'
> nsterm.m:7630: error: expected ')' before 'instancetype'
> nsterm.m:7655: error: expected ')' before 'instancetype'
> nsterm.m:7681: error: expected ')' before 'instancetype'
> nsterm.m:7909: error: expected ')' before 'instancetype'
> nsterm.m:8261: error: expected ')' before 'instancetype'
> nsterm.m:8345: error: expected ')' before 'instancetype'
> nsterm.m:8353: error: expected ')' before 'instancetype'
> nsterm.m:8408: error: expected ')' before 'instancetype'
> nsterm.m:8487: error: expected ')' before 'instancetype'
> make[1]: *** [nsterm.o] Error 1
> make: *** [src] Error 2
> make failed
>
>
> I think these may have been caused by the recent GNUStep changes.
>
Can you try applying the following patch:
diff --git a/src/nsterm.h b/src/nsterm.h
index 8f3d92b353..288b91269d 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -65,7 +65,7 @@ typedef float EmacsCGFloat;
/* FIXME: instancetype is a language built-in, but older versions of
Clang don't support it, and I don't know if GCC supports it at all.
Should this be tested for in ./configure? */
-#if defined (NS_IMPL_GNUSTEP)
+#if defined (NS_IMPL_GNUSTEP) \
|| MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
typedef id instancetype;
typedef NSUInteger NSWindowStyleMask;
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Thu, 25 May 2017 16:27:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/24/17 1:20 PM, Philipp Stephani wrote:
>
>
> David Caldwell <david <at> porkrind.org <mailto:david <at> porkrind.org>> schrieb
> am Mi., 24. Mai 2017 um 18:24 Uhr:
>
> CC nsmenu.o
> nsmenu.m:1496:70: error: expected a type
> - (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
> (NSWindowStyleMask)aStyle
>
> Can you try applying the following patch:
>
> diff --git a/src/nsterm.h b/src/nsterm.h
> index 8f3d92b353..288b91269d 100644
> --- a/src/nsterm.h
> +++ b/src/nsterm.h
> @@ -65,7 +65,7 @@ typedef float EmacsCGFloat;
> /* FIXME: instancetype is a language built-in, but older versions of
> Clang don't support it, and I don't know if GCC supports it at all.
> Should this be tested for in ./configure? */
> -#if defined (NS_IMPL_GNUSTEP)
> +#if defined (NS_IMPL_GNUSTEP) \
> || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
> typedef id instancetype;
> typedef NSUInteger NSWindowStyleMask;
>
That didn't work, neither did the current HEAD. The current HEAD is
missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
OSes, it needs to be the hardcoded value '101000' (since the define
didn't exist back then). To sum up, this is the patch that worked for me:
diff --git a/src/nsterm.h b/src/nsterm.h
index 8f3d92b353..04ec82814a 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -65,8 +65,8 @@ typedef float EmacsCGFloat;
/* FIXME: instancetype is a language built-in, but older versions of
Clang don't support it, and I don't know if GCC supports it at all.
Should this be tested for in ./configure? */
-#if defined (NS_IMPL_GNUSTEP)
- || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
+#if defined (NS_IMPL_GNUSTEP) \
+ || MAC_OS_X_VERSION_MAX_ALLOWED < 101000
typedef id instancetype;
typedef NSUInteger NSWindowStyleMask;
#endif
-David
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Thu, 25 May 2017 19:03:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, May 25, 2017 at 09:25:47AM -0700, David Caldwell wrote:
> That didn't work, neither did the current HEAD. The current HEAD is
> missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
> thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
> OSes, it needs to be the hardcoded value '101000' (since the define
> didn't exist back then). To sum up, this is the patch that worked for me:
Please try the attached patch. It should be a neater solution
(checking whether the compiler supports instancetype directly).
If MAC_OS_X_VERSION_10_10 doesn’t exist we can define it ourselves, we
already do this with the other versions that have specific
requirements (top of nsterm.h). I evidently forgot to check whether we
need to define it before committing the change.
Not that it matters now, this patch should work without it.
--
Alan Third
[0001-Check-if-instancetype-supported-in-ObjC.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Thu, 25 May 2017 21:13:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 27059 <at> debbugs.gnu.org (full text, mbox):
> That didn't work, neither did the current HEAD. The current HEAD is
> missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
> thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
> OSes, it needs to be the hardcoded value '101000' (since the define
> didn't exist back then). To sum up, this is the patch that worked for me:
NSWindowStyleMask introduced since 10.12.
SDK 10.10 requires typedef too to compile master branch.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Fri, 26 May 2017 17:24:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/25/17 12:02 PM, Alan Third wrote:
> On Thu, May 25, 2017 at 09:25:47AM -0700, David Caldwell wrote:
>> That didn't work, neither did the current HEAD. The current HEAD is
>> missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
>> thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
>> OSes, it needs to be the hardcoded value '101000' (since the define
>> didn't exist back then). To sum up, this is the patch that worked for me:
>
> Please try the attached patch. It should be a neater solution
> (checking whether the compiler supports instancetype directly).
>
> If MAC_OS_X_VERSION_10_10 doesn’t exist we can define it ourselves, we
> already do this with the other versions that have specific
> requirements (top of nsterm.h). I evidently forgot to check whether we
> need to define it before committing the change.
>
> Not that it matters now, this patch should work without it.
I tried the patch out, still has problems (this output is from Mac OS 10.9):
CC nsmenu.o
nsmenu.m:1496:70: error: expected a type
- (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
(NSWindowStyleMask)aStyle
^
nsmenu.m:1520:10: warning: incompatible integer to pointer conversion
assigning to 'id' from 'int' [-Wint-conversion]
aStyle =
NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskUtilityWindow;
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nsmenu.m:1524:54: warning: incompatible pointer to integer conversion
sending 'id' to parameter of type 'NSUInteger' (aka 'unsigned long')
[-Wint-conversion]
[super initWithContentRect: contentRect styleMask: aStyle
^~~~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:301:69:
note: passing argument to parameter 'aStyle' here
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
^
nsmenu.m:1496:88: warning: conflicting parameter types in implementation
of 'initWithContentRect:styleMask:backing:defer:': 'NSUInteger' (aka
'unsigned long') vs 'id' [-Wmismatched-parameter-types]
- (instancetype)initWithContentRect: (NSRect)contentRect styleMask:
(NSWindowStyleMask)aStyle
^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:301:69:
note: previous definition is here
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
~~~~~~~~~~ ^
3 warnings and 1 error generated.
make: *** [nsmenu.o] Error 1
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Fri, 26 May 2017 18:48:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
David Caldwell <david <at> porkrind.org> schrieb am Fr., 26. Mai 2017 um
19:23 Uhr:
> On 5/25/17 12:02 PM, Alan Third wrote:
> > On Thu, May 25, 2017 at 09:25:47AM -0700, David Caldwell wrote:
> >> That didn't work, neither did the current HEAD. The current HEAD is
> >> missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
> >> thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
> >> OSes, it needs to be the hardcoded value '101000' (since the define
> >> didn't exist back then). To sum up, this is the patch that worked for
> me:
> >
> > Please try the attached patch. It should be a neater solution
> > (checking whether the compiler supports instancetype directly).
> >
> > If MAC_OS_X_VERSION_10_10 doesn’t exist we can define it ourselves, we
> > already do this with the other versions that have specific
> > requirements (top of nsterm.h). I evidently forgot to check whether we
> > need to define it before committing the change.
> >
> > Not that it matters now, this patch should work without it.
>
> I tried the patch out, still has problems (this output is from Mac OS
> 10.9):
>
Can you try the following patch on top:
diff --git a/src/nsterm.h b/src/nsterm.h
index f75e3759e4..77c7729c96 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1264,6 +1264,7 @@ extern char gnustep_base_version[]; /* version
tracking */
/* macOS 10.12 deprecates a bunch of constants. */
#if !defined (NS_IMPL_COCOA) || \
+ ! defined MAC_OS_X_VERSION_10_12 || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
#define NSEventModifierFlagCommand NSCommandKeyMask
#define NSEventModifierFlagControl NSControlKeyMask
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Fri, 26 May 2017 19:32:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/26/17 10:23 AM, David Caldwell wrote:
> On 5/25/17 12:02 PM, Alan Third wrote:
>> On Thu, May 25, 2017 at 09:25:47AM -0700, David Caldwell wrote:
>>> That didn't work, neither did the current HEAD. The current HEAD is
>>> missing the backslash after the defined (NS_IMPL_GNUSTEP), for one
>>> thing. But testing against MAC_OS_X_VERSION_10_10 doesn't work on older
>>> OSes, it needs to be the hardcoded value '101000' (since the define
>>> didn't exist back then). To sum up, this is the patch that worked for me:
>>
>> Please try the attached patch. It should be a neater solution
>> (checking whether the compiler supports instancetype directly).
>>
>> If MAC_OS_X_VERSION_10_10 doesn’t exist we can define it ourselves, we
>> already do this with the other versions that have specific
>> requirements (top of nsterm.h). I evidently forgot to check whether we
>> need to define it before committing the change.
>>
>> Not that it matters now, this patch should work without it.
>
> I tried the patch out, still has problems (this output is from Mac OS 10.9):
Crap. Ignore that last failure report, I accidentally tested a version
with the patch unapplied. When I actually test correctly, the patch
works. I tested on 10.6 and 10.8 (and I assume that the ones in between
also work :-)). Thanks!
-David
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Fri, 26 May 2017 23:59:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 27059 <at> debbugs.gnu.org (full text, mbox):
On Fri, May 26, 2017 at 12:30:44PM -0700, David Caldwell wrote:
> On 5/26/17 10:23 AM, David Caldwell wrote:
> > On 5/25/17 12:02 PM, Alan Third wrote:
> >> Please try the attached patch. It should be a neater solution
> >> (checking whether the compiler supports instancetype directly).
> >>
> >> If MAC_OS_X_VERSION_10_10 doesn’t exist we can define it ourselves, we
> >> already do this with the other versions that have specific
> >> requirements (top of nsterm.h). I evidently forgot to check whether we
> >> need to define it before committing the change.
> >>
> >> Not that it matters now, this patch should work without it.
> >
> > I tried the patch out, still has problems (this output is from Mac OS 10.9):
>
> Crap. Ignore that last failure report, I accidentally tested a version
> with the patch unapplied. When I actually test correctly, the patch
> works. I tested on 10.6 and 10.8 (and I assume that the ones in between
> also work :-)). Thanks!
Thanks. I’ve pushed the change to master.
--
Alan Third
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Mon, 29 May 2017 06:57:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/26/17 4:58 PM, Alan Third wrote:
> Thanks. I’ve pushed the change to master.
Thanks. Emacs compiles on 10.7 and above, but I'm still getting an error
on 10.6. It's a different part of the code, maybe it should be a new bug?
CC nsfns.o
nsfns.m: In function 'compute_tip_xy':
nsfns.m:2756: error: incompatible type for argument 1 of
'CGRectContainsPoint'
nsfns.m:2756: error: incompatible type for argument 2 of
'CGRectContainsPoint'
make[1]: *** [nsfns.o] Error 1
make: *** [src] Error 2
make failed
-David
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Mon, 29 May 2017 08:25:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 29 May 2017 7:56 a.m., "David Caldwell" <david <at> porkrind.org> wrote:
On 5/26/17 4:58 PM, Alan Third wrote:
> Thanks. I’ve pushed the change to master.
Thanks. Emacs compiles on 10.7 and above, but I'm still getting an error
on 10.6. It's a different part of the code, maybe it should be a new bug?
CC nsfns.o
nsfns.m: In function 'compute_tip_xy':
nsfns.m:2756: error: incompatible type for argument 1 of
'CGRectContainsPoint'
nsfns.m:2756: error: incompatible type for argument 2 of
'CGRectContainsPoint'
make[1]: *** [nsfns.o] Error 1
make: *** [src] Error 2
make failed
Hmm, this is a bit strange. Perhaps we need to cast the arguments to CGRect
and CGPoint explicitly, but I don't see why, and surely that would be a
warning rather than an error.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Mon, 29 May 2017 08:57:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/29/17 1:24 AM, Alan Third wrote:
>
>
> On 29 May 2017 7:56 a.m., "David Caldwell" <david <at> porkrind.org
> <mailto:david <at> porkrind.org>> wrote:
>
> On 5/26/17 4:58 PM, Alan Third wrote:
> > Thanks. I’ve pushed the change to master.
>
> Thanks. Emacs compiles on 10.7 and above, but I'm still getting an error
> on 10.6. It's a different part of the code, maybe it should be a new
> bug?
>
> CC nsfns.o
> nsfns.m: In function 'compute_tip_xy':
> nsfns.m:2756: error: incompatible type for argument 1 of
> 'CGRectContainsPoint'
> nsfns.m:2756: error: incompatible type for argument 2 of
> 'CGRectContainsPoint'
> make[1]: *** [nsfns.o] Error 1
> make: *** [src] Error 2
> make failed
>
>
> Hmm, this is a bit strange. Perhaps we need to cast the arguments to
> CGRect and CGPoint explicitly, but I don't see why, and surely that
> would be a warning rather than an error.
Yeah, it's defined in NSGeometry.h as:
typedef CGRect NSRect;
...which should make them compatible. Maybe it's something in the old
version of gcc (4.2.1) that 10.6 X-Code uses by default.
Nevertheless, you are right--Putting the explicit cast in makes it compile.
-David
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Mon, 29 May 2017 16:06:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 27059 <at> debbugs.gnu.org (full text, mbox):
On Mon, May 29, 2017 at 01:56:05AM -0700, David Caldwell wrote:
> Nevertheless, you are right--Putting the explicit cast in makes it compile.
Pushed fix to master.
Thanks!
--
Alan Third
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Tue, 30 May 2017 18:37:01 GMT)
Full text and
rfc822 format available.
Message #46 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/29/17 9:05 AM, Alan Third wrote:
> On Mon, May 29, 2017 at 01:56:05AM -0700, David Caldwell wrote:
>> Nevertheless, you are right--Putting the explicit cast in makes it compile.
>
> Pushed fix to master.
Still not quite there :-/
This time the error happens on 10.6 compiling for 32 bit targets
(compiler is i686-apple-darwin10-gcc-4.2.1):
i686-apple-darwin10-gcc-4.2.1 -mmacosx-version-min=10.6 -std=gnu99 -c
-Demacs -I. -I. -I../lib -I../lib -I'/usr/include/libxml2'
-MMD -MF deps/nsfns.d -MP -g3 -O2 nsfns.m
nsfns.m: In function 'compute_tip_xy':
nsfns.m:2756: error: conversion to non-scalar type requested
nsfns.m:2756: error: conversion to non-scalar type requested
make[1]: *** [nsfns.o] Error 1
make: *** [src] Error 2
This was the best I could come up with for this compiler:
NSRect r = [screen frame];
if (CGRectContainsPoint (*(CGRect*)&r, *(CGPoint*)&pt))
(yuck). Interestingly, I tried searching for this and found this thread
from 15 years ago:
https://lists.apple.com/archives/cocoa-dev/2002/Jan/msg00763.html
Maybe it would be better to fall back to the GNUStep else clause in
these cases?
-David
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Tue, 30 May 2017 19:02:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, May 30, 2017 at 11:36:43AM -0700, David Caldwell wrote:
> nsfns.m: In function 'compute_tip_xy':
> nsfns.m:2756: error: conversion to non-scalar type requested
> nsfns.m:2756: error: conversion to non-scalar type requested
> make[1]: *** [nsfns.o] Error 1
> make: *** [src] Error 2
>
> This was the best I could come up with for this compiler:
>
> NSRect r = [screen frame];
> if (CGRectContainsPoint (*(CGRect*)&r, *(CGPoint*)&pt))
>
> (yuck).
Indeed.
> Maybe it would be better to fall back to the GNUStep else clause in
> these cases?
That’s exactly what I was thinking as I read through this. There’s no
reason not to, afaict it is exactly equivalent.
I’ve attached a patch that reverts to the GNUstep code in all cases
and explains why.
--
Alan Third
[0001-Fix-build-errors-on-macOS-10.6.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27059
; Package
emacs
.
(Wed, 31 May 2017 23:41:01 GMT)
Full text and
rfc822 format available.
Message #52 received at 27059 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5/30/17 12:01 PM, Alan Third wrote:
> On Tue, May 30, 2017 at 11:36:43AM -0700, David Caldwell wrote:
>> nsfns.m: In function 'compute_tip_xy':
>> nsfns.m:2756: error: conversion to non-scalar type requested
>> nsfns.m:2756: error: conversion to non-scalar type requested
>> make[1]: *** [nsfns.o] Error 1
>> make: *** [src] Error 2
>>
>> This was the best I could come up with for this compiler:
>>
>> NSRect r = [screen frame];
>> if (CGRectContainsPoint (*(CGRect*)&r, *(CGPoint*)&pt))
>>
>> (yuck).
>
> Indeed.
>
>> Maybe it would be better to fall back to the GNUStep else clause in
>> these cases?
>
> That’s exactly what I was thinking as I read through this. There’s no
> reason not to, afaict it is exactly equivalent.
>
> I’ve attached a patch that reverts to the GNUstep code in all cases
> and explains why.
I like it. That patch works on this old compiler--with it i686 gcc now
gets to the elisp compilation phase (I didn't have the patience to sit
through that part ;-)).
-David
[signature.asc (application/pgp-signature, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 29 Jun 2017 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.