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

From: Kish Shen <kish.shen_at_...6...>
Date: Wed, 18 Sep 2019 14:25:03 +0100
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

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.

If you get something other than 0 or 4, this would imply that clang or
Apple changed the size of int. 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)

Cheers,

Kish
Received on Wed Sep 18 2019 - 13:25:25 CEST

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