PlatformLab/Arachne

Arachne: Build error while compiling core engine

leemgs opened this issue · 4 comments

It is weird. We meet unexpected build error when I try to reproduce the binary files with the instruction manual.

  • Log messge:
invain@u1604:/work/study/archne$ cppcheck ./src/
Checking src/Arachne.cc...
Checking src/Arachne.cc: ARACHNE_TEST...
Checking src/Arachne.cc: __GNUC__...
1/8 files checked 12% done
Checking src/ArachneTest.cc...
Checking src/ArachneTest.cc: TIME_TRACE...
Checking src/ArachneTest.cc: __GNUC__...
2/8 files checked 25% done
Checking src/CoreLoadEstimator.cc...
Checking src/CoreLoadEstimator.cc: __GNUC__...
3/8 files checked 37% done
Checking src/CorePolicyTest.cc...
4/8 files checked 50% done
Checking src/DefaultCorePolicy.cc...
Checking src/DefaultCorePolicy.cc: ARACHNE_TEST...
Checking src/DefaultCorePolicy.cc: TIME_TRACE...
Checking src/DefaultCorePolicy.cc: __GNUC__...
5/8 files checked 62% done
Checking src/DefaultCorePolicyTest.cc...
Checking src/DefaultCorePolicyTest.cc: ARACHNE_TEST...
Checking src/DefaultCorePolicyTest.cc: TIME_TRACE...
Checking src/DefaultCorePolicyTest.cc: __GNUC__...
6/8 files checked 75% done
Checking src/Logger.cc...
[src/Logger.cc:73]: (error) va_list 'args' used before va_start() was called.
7/8 files checked 87% done
Checking src/PerfStats.cc...
Checking src/PerfStats.cc: __GNUC__...
8/8 files checked 100% done
invain@u1604:/work/study/archne$
hq6 commented

This is quite unusual indeed, because the va_list usage matches with the example in the man page.

What compiler are you using and what OS are you building on?

because the va_list usage matches with the example in the man page.

Right. It's strange. At that time, I tried to compile the source code on Ubuntu 16.04 X86_64.

From my analysis, this issue can be fixed by running the below commands.

$ sudo apt -y update
$  cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"

Fixed.