[CLN-list] Error building cln on M1 Mac

Bruno Haible bruno at clisp.org
Sun Mar 5 17:28:19 CET 2023


Richard B. Kreckel wrote:
> Did you use the CLN off from git?
> I'm asking because patch 6edafa136b which is not in the released 1.3.6.

I reproduce the issue also with CLN 1.3.6.

The problem is that while

====================================
typedef unsigned short uint16;

extern "C" uint16 divu_16_rest;

uint16 divu_16_rest;
====================================

and

====================================
typedef unsigned short uint16;

namespace cln {
extern "C" uint16 divu_16_rest;
}

uint16 cln::divu_16_rest;
====================================

compile OK, this one

====================================
typedef unsigned short uint16;

namespace cln {
extern "C" uint16 divu_16_rest;
}

uint16 divu_16_rest;
====================================

gives a compilation error. In other words, it's a namespace inconsistency
problem (although you would naïvely expect that the namespace does not
matter because of 'extern "C"'). The error message is just misleading.

This error occurs with all versions of clang, but not with GCC.

Bruno





More information about the CLN-list mailing list