Closed elgeeko1 closed 3 months ago
Hmm. This line looks correct to me. What platform are you one? I think the only relevant change between v6 and v7 is that warnings are treated as errors. The PRINTF_TIME macro is defined as follows:
#define PRINTF_TIME "%" PRId64
The reason for this macro is that in C, long long
has no fixed correct way to format by printf
. Some platforms want %ld
and some want %lld
. Whichever of these you choose, you get warnings on the other platforms.
PRId64
is supposed to be defined by the compiler and should be one of ld
or lld
. I suspect whatever platform/compiler you are using is defining this incorrectly.
This appears to work on OSX, but not on Ubuntu. I'm using standard gcc, apt install build-essential
. I've tried both in my VM as well as native Ubuntu and this now fails (it didn't on LF v0.6)
elgeeko@reanimate-primary:~/xronos-inc/example-monte-carlo-pi$ uname --all
Linux reanimate-primary 5.15.0-112-generic #122-Ubuntu SMP Thu May 23 07:51:32 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
elgeeko@reanimate-primary:~/xronos-inc/example-monte-carlo-pi$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Arg... it appears I needed to clean the build outputs. Deleting src-gen
, include
and bin
resolved.
So this can be closed?
Yes. The learning here is that changing the version of LF may break builds that were previously working, until a clean is performed.
Context: Monte Carlo pi example xronos-inc/example-monte-carlo-pi
LF version: 7.0 and later
Architecture: aarch64 (Mac M2)
Error:
Steps to recreate: Clone the example repository, and either
./run.sh
orlfc src/app.lf
using LF v7.0 or later.This example built and ran correctly with LF v6.