Re: [eclipse-clp-users] ECLiPSe 7.0#49 compilation errors on macOS

From: Paulo Moura <pmoura_at_...342...>
Date: Wed, 18 Sep 2019 15:25:14 +0100
Hi,

Removing the MACOS_VERSION_MIN=10.5 lines in configure makes no difference. Int size is still reported as zero.

> On 18 Sep 2019, at 14:25, Kish Shen <kish.shen_at_...6...> wrote:
> 
> Hi Paulo,
> 
> it looks like there is a problem with your clang's sizeof test. Try
> compiling and running the following:
> 
> #include <stdio.h>
> int main() {
>  int i = sizeof(int);
>  printf("sizrof(int)= %i\n", i);
> 
> }
> 
> compile and run the file:
> 
> Kish-Shens-iMac:text kish$ gcc t.c
> 
> Kish-Shens-iMac:text kish$ ./a.out
> 
> sizrof(int)= 4

I do get the expected result with this small program:

$ ./a.out
sizrof(int)= 4

> Your messages suggest you will get 0 instead of 4 for this. If this is
> the case, there is a serious problem with your version of clang, but I
> could not find any mention of this problem with a quick web search.

I have also been able to find any help searching the web so far.

> If you get something other than 0 or 4, this would imply that clang or
> Apple changed the size of int.

Not the case here.

> I think ECLiPSe itself can cope with
> this (it should only need a word size integer type), but apparently
> GMP does not.
> 
> I have Mac OS 10.12.6, and an older version of clang:
> 
> Configured with:
> --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
> 
> Apple LLVM version 8.1.0 (clang-802.0.42)

I compiled ECLiPSe 7.0#43 some time ago without these issues (although using an older version of Xcode).

Thanks for the suggestions. I will continue looking for the cause.

Cheers,
Paulo

-----------------------------------------------------------------
Paulo Moura
Logtalk developer
Received on Wed Sep 18 2019 - 14:25:52 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST