Forum: Installation

Post: "ant check" fails with licensecheck.

"ant check" fails with licensecheck.
sowani
Jan 6, 2017
I am testing ported VoltDB code on Power8. The code built successfully without any errors. When I run "ant check" I am getting following error though:

Buildfile: /root/voltdb/build.xml

licensecheck:
[exec] ERROR: "/root/voltdb/src/frontend/org/voltdb/utils/PosixAdvise.java" does not start with an approved license.
[exec] ERROR: "/root/voltdb/src/ee/voltdbjni.cpp" does not start with an approved license.
[exec] FAILURE. Found 2 license text or whitespace errors.

BUILD FAILED
/root/voltdb/build.xml:1645: exec returned: 2

I am using the top-of-the-tree source cloned from github.

Any suggestions on how to get around this issue?

Thanks,
Atul.
sowani
Jan 6, 2017
I think this attributes to following code in src/ee/voltdbjni.cpp:

bool success =
engine->initialize(clusterIndex,
siteId,
partitionId,
hostId,
hostString,
drClusterId,
defaultDrBufferSize,
tempTableMemory,
createDrReplicatedStream,
static_cast<int32_t>(compactionThreshold));
if (success) {
VOLT_DEBUG("initialize succeeded");
return org_voltdb_jni_ExecutionEngine_ERRORCODE_SUCCESS;
} else {
throwFatalException("initialize failed");
return org_voltdb_jni_ExecutionEngine_ERRORCODE_ERROR;
}

This code seems to be newer, because in the earlier VoltDB code on which I am working there is no "bool success" and subsequent check. This code gives me following error while building the source:

[exec] /root/voltdb/src/ee/voltdbjni.cpp: In function 'jint Java_org_voltdb_jni_ExecutionEngine_nativeInitialize(JNIEnv*, jobject, jlong, jint, jlong, jint, jint, jbyteArray, jint, jint, jlong, jboolean, jint)':
[exec] /root/voltdb/src/ee/voltdbjni.cpp:301:77: error: void value not ignored as it ought to be
[exec] static_cast<int32_t>(compactionThreshold));
[exec] ^
[exec] makefile:440: recipe for target 'objects/voltdbjni.o' failed
[exec] make: Leaving directory '/root/voltdb/obj/release'
[exec] Building with c++11
[exec] Compiler: gcc 5.4.0
[exec] OpenSSL: version 1.0.2d, config linux-ppc64le:gcc
[exec]
[exec] Making in directory "obj/release/" with 1 threads
[exec] make: *** [objects/voltdbjni.o] Error 1

Hence I commented out the new code. When commented out, the code builds fine, but then gives run time error about "licensecheck".

Thanks,
Atul.
sowani
Jan 9, 2017
In the older version, VoltDBEngine::initialize() was "bool" instead of "void" and always seems to have returned "true". For my better understanding of the code, I would like to know the particular reason this change was made.
sowani
Jan 13, 2017
Investigated this issue further. It seems that "ant check" goes and checks header of each source file being compiled. For 2 files involved in the error message, the copyright message still read "till 2016". The moment I updated it to 2017, the issue got fixed.
rmorgenstein
Jan 14, 2017
Atul,

Running voltdb check is a catch-all target for licensecheck, eecheck, and junit. We don't usually run it any more - it takes hours. We push our branches to Jenkins. In our Jenkins CI, we run these separately and we break the junit job into 3, using the targets junit_other, junit_regression_h1 and junit_regression_h2. We're planning on breaking this down further and also are doing a few things to speed up these tests.

Ruth
sowani
Jan 16, 2017
Thanks @Ruth for giving insight into the test execution method of VoltDB. Are your Jenkins build results published anywhere? If so, could you please share the location so that I can compare my results with it? I was looking at the voltdb github base for indicators like "build passed" etc., but couldn't find any. I am trying to create a baseline on x86_64 machine, but some of the tests are timing out or crashing. Hence I am not able to deduce anything without any established baseline.

Thanks,
Atul.
bballard
Jan 18, 2017
Hi Atul,

You can checkout the latest release rather than the master branch to be sure the code has passed all of our tests. For example:

git checkout tags/voltdb-6.9 -b <your_branch_name>

Ben