Closed carlocab closed 3 years ago
Though, applying the fix I suggest above leads to another missing #include
:
/tmp/freeling-20210524-61311-n18juv/FreeLing-4.2/src/libfreeling/csr_kb.cc:157:19: error: use of undeclared identifier 'fabs'
change += fabs(ranks[NEXT][v] - ranks[CURRENT][v]);
^
https://github.com/Homebrew/homebrew-core/runs/2661832770?check_suite_focus=true#step:7:2221
You are right, that should fix it (actually, it is a bit surprising it works without it...) I added also "using std:fabs", hope it works now I changed it in master, if you want to pull
Thanks for the fix! I am curious about https://github.com/TALP-UPC/FreeLing/commit/aaf733521a329d26aa71dd0e34da340a8b4a1291, since the error about the undeclared identifier fabs
comes from src/libfreeling/csr_kb.cc
, but I don't see it #include
-ing smoothingLD.h
anywhere.
Am I just confused?
Ups, my fault. I assumed the problem was in smoothingLD as well, since it also uses fabs...
But... you mean the fix solved that too? that is weird... :S
I haven't tested the using std::fabs
fix yet. It's chugging through CI now, which takes a while (since it's part of a boost
version bump which tests all these other boost
dependencies).
Actually, I'm also confused by the new error I mention in https://github.com/TALP-UPC/FreeLing/issues/114#issuecomment-847631999.
In src/libfreeling/csr_kb.cc
, you have
and
In src/include/freeling/morfo/util.h
,
which defines std::fabs
.
Ok, one of the CI nodes finished (the ARM node is a lot faster than the others), and it seems (I guess unsurprisingly) that https://github.com/TALP-UPC/FreeLing/commit/aaf733521a329d26aa71dd0e34da340a8b4a1291 does not fix the undeclared identifier
error for fabs
.
As for https://github.com/TALP-UPC/FreeLing/issues/114#issuecomment-847723544, I just misread cppreference. cstdlib
defines only abs
, but not fabs
. For fabs
we need cmath
.
I guess you are using clang, and maybe it uses different defaults than g++ ...
I included cmath wherever fabs is used... check if it works now.
Yes, we do build with Clang.
Your new patches seem to have done the trick, at least on ARM. Let me just see how the build does on the other CI nodes (should be done at some point tonight), but I expect to be able to close this issue soon.
Thanks!
Yep, can confirm that your patches fixed everything. Thanks for this!
Building FreeLing on macOS Mojave (10.14.6) and Big Sur (11.3.1) with Boost 1.76 fails with the following error:
Oddly enough, this does not fail on macOS Catalina (10.15.7).
This seems straightforward enough to fix with
but I wanted to check in before trying to apply that fix in case this has consequences I'm not aware of.
Build logs available at https://github.com/Homebrew/homebrew-core/actions/runs/870966679. The error on (Intel) Big Sur starts at https://github.com/Homebrew/homebrew-core/runs/2654992071?check_suite_focus=true#step:7:2359.
See also https://github.com/Homebrew/homebrew-core/pull/75459.