Forum: Installation

Post: VoltDB under FreeBSD

VoltDB under FreeBSD
max_v
Apr 4, 2011
I'm trying to install VoltDB under FreeBSD.
I've got voltdb-1.2.1.07 by svn.
FreeBSD 8.0-RELEASE amd64 installed.
When I'm trying to make 'ant check' I'm getting


[exec] gmake: Entering directory `/usr/home/max/voltdb_src/svn/voltdb-1.2.1.07/obj/release'
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects//voltdbjni.co ../../src/ee//voltdbjni.cpp
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/executors/updateexecutor.co ../../src/ee/executors/updateexecutor.cpp
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/storage/constraintutil.co ../../src/ee/storage/constraintutil.cpp
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/storage/CopyOnWriteContext.co ../../src/ee/storage/CopyOnWriteContext.cpp
[exec] In file included from ../../src/ee//voltdbjni.cpp:92:
[exec] ../../third_party/cpp/jni.h:55: error: 'jint' does not name a type
[exec] ../../third_party/cpp/jni.h:114: error: 'jbyte' does not name a type
[exec] ../../third_party/cpp/jni.h:117: error: 'jint' does not name a type
[exec] ../../third_party/cpp/jni.h:118: error: 'jlong' does not name a type
[exec] ../../third_party/cpp/jni.h:212: error: 'JNICALL' has not been declared
[exec] ../../third_party/cpp/jni.h:212: error: 'jint' declared as function returning a function
[exec] ../../third_party/cpp/jni.h:214: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:217: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:220: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:222: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:225: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:228: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:230: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:233: error: expected `)' before '*' token
[exec] ../../third_party/cpp/jni.h:236: error: 'JNICALL' has not been declared
[exec] ../../third_party/cpp/jni.h:237: error: 'jint' declared as function returning a function
[exec] ../../third_party/cpp/jni.h:237: error: 'int JNINativeInterface_::jint(int*)' cannot be overloaded

... Many error messages skipped ...


[exec] ../../third_party/cpp/jni.h:1912: error: 'jint' does not name a type
[exec] ../../third_party/cpp/jni.h:1915: error: 'jint' does not name a type
[exec] ../../third_party/cpp/jni.h:1926: error: 'JNIIMPORT' does not name a type
[exec] ../../third_party/cpp/jni.h:1929: error: 'JNIIMPORT' does not name a type
[exec] ../../third_party/cpp/jni.h:1932: error: 'JNIIMPORT' does not name a type
[exec] ../../third_party/cpp/jni.h:1936: error: 'JNIEXPORT' does not name a type
[exec] ../../third_party/cpp/jni.h:1939: error: expected constructor, destructor, or type conversion before 'void'
[exec] In file included from ../../src/ee//voltdbjni.cpp:94:
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:21: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:29: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:37: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:45: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:53: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:61: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:69: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:77: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:85: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:93: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:101: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:109: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:117: error: expected constructor, destructor, or type conversion before 'void'
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:125: error: expected constructor, destructor, or type conversion before 'void'
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:133: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:141: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:149: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:157: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:165: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:173: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:181: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:189: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:197: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:205: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:213: error: expected constructor, destructor, or type conversion before 'void'
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:221: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:229: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_jni_ExecutionEngine.h:237: error: 'JNIEXPORT' does not name a type
[exec] In file included from ../../src/ee//voltdbjni.cpp:95:
[exec] ../../src/ee//org_voltdb_utils_DBBPool.h:25: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//org_voltdb_utils_DBBPool.h:33: error: 'JNIEXPORT' does not name a type
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/storage/CopyOnWriteIterator.co ../../src/ee/storage/CopyOnWriteIterator.cpp
[exec] ../../src/ee//voltdbjni.cpp: In function 'void signalHandler(int, siginfo_t*, void*)':
[exec] ../../src/ee//voltdbjni.cpp:146: error: 'struct JavaVM_' has no member named 'AttachCurrentThread'
[exec] ../../src/ee//voltdbjni.cpp:150: error: 'struct JavaVM_' has no member named 'DetachCurrentThread'
[exec] ../../src/ee//voltdbjni.cpp: At global scope:
[exec] ../../src/ee//voltdbjni.cpp:185: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:225: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:248: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:301: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:345: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:388: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:451: error: 'jint' has not been declared
[exec] ../../src/ee//voltdbjni.cpp:480: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:522: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:559: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:616: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:688: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:728: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:745: error: 'JNIEXPORT' does not name a type
[exec] ../../src/ee//voltdbjni.cpp:772: error: expected constructor, destructor, or type conversion before 'void'
[exec] gmake: *** [objects//voltdbjni.co] Error 1
[exec] gmake: *** Waiting for unfinished jobs....
[exec] gmake: Leaving directory `/usr/home/max/voltdb_src/svn/voltdb-1.2.1.07/obj/release'
[exec] Detected 4 hardware threads to use during the build
[exec] Make returned: 512
BUILD FAILED
/usr/home/max/voltdb_src/svn/voltdb-1.2.1.07/build.xml:809: exec returned: 255



It looks like some library (which describes jint, jbyte and other types) is not included.

I'm new at ant build processes and Java platform and I can't I solve this problem.

Please, help me.
Thanks.
FreeBSD
rbetts
Apr 4, 2011
Max,

There are a few places in VoltDB source that we distinguish Mac OS X builds and Linux builds. We don't build for FreeBSD internally - and there aren't preprocessor cases for FreeBSD.

This specific error is related to the Java headers necessary to define and call C functions from Java (JNI).

I think at least these places will need FreeBSD specific handling to get Volt compiling; there may well be other minor issues beyond these.

$ pwd
/home/rbetts/workspace/eng/src/ee

$ git grep LINUX
execution/VoltDBEngine.cpp:#ifdef LINUX
execution/VoltDBEngine.cpp:#endif // LINUX
execution/VoltDBEngine.cpp:#ifdef LINUX
execution/VoltDBEngine.cpp:#endif // LINUX
voltdbjni.cpp:#ifdef LINUX
voltdbjni.cpp:#endif // LINUX
voltdbjni.cpp:#ifdef LINUX
voltdbjni.cpp:#endif // LINUX
Hi Max, Thanks for being the
aweisberg
Apr 4, 2011
Hi Max,


Thanks for being the first to build on BSD.


I think the JNI problem is that the JNI headers provided by Sun don't work with FreeBSD. I don't think Sun or OpenJDK have a BSD distro. I think you will need to replace the JNI headers (jni.h) in our codebase with the ones from http://www.freebsd.org/java/ or some other BSD java distro.


I would start by doing that and seeing what compilation errors that resolves. Ryan is right that we #ifdef on LINUX/Mac so there is probably some stuff that needs to be defined that won't unless you pick -DLINUX or -DMACOSX, but it probably isn't a lot of code.

-Ariel
Thank you very much for your
max_v
Apr 5, 2011
Thank you very much for your help.
I have some progress. There are my common changes in source code:


1. It is necessary to compile all cpp files with gmake instead make so I changed all strings like

retval = os.system("make --directory=%s -j%d" % (CTX.OUTPUT_PREFIX, numHardwareThreads))


to

if CTX.PLATFORM == "FreeBSD":
retval = os.system("gmake --directory=%s -j%d" % (CTX.OUTPUT_PREFIX, numHardwareThreads))
else:
retval = os.system("make --directory=%s -j%d" % (CTX.OUTPUT_PREFIX, numHardwareThreads))



in build.py and buildtools.py files.

2. CTX.LDFLAGS in build.py must not contain -ldl flag. I changed

CTX.LDFLAGS = """ -g3 -rdynamic -ldl"""


to
if CTX.PLATFORM == "FreeBSD":
CTX.LDFLAGS = """ -g3 -rdynamic"""
else:
CTX.LDFLAGS = """ -g3 -rdynamic -ldl"""



3. FreeBSD requires own paremeters at Default section in build.py. I took MACOSX parameters as a default and changed it to minimize different errors at compilation. My result is

if CTX.PLATFORM == "FreeBSD":
CTX.CPPFLAGS += " -DFreeBSD -fPIC"
CTX.JNIEXT = "jnilib"
CTX.JNILIBFLAGS = "-L/usr/local/lib -lexecinfo"
CTX.JNIBINFLAGS = " -framework JavaVM,1.6"
CTX.SOFLAGS += "-dynamiclib -undefined dynamic_lookup -single_module"
CTX.SOEXT = "dylib"
CTX.JNIFLAGS = "-framework JavaVM,1.6"



But I'm not shure that it is fully correct. 4. To avoid error with jint and otheh j-types I copied /usr/local/jdk1.6.0/include/freebsd/jni_md.h to third_party/cpp/jni/freebsd/jni_md.h
5. To glue my jni_md.h with VoltDB source I added this lines to the head of third_party/cpp/jni.h


#ifdef FreeBSD
#include "jni/freebsd/jni_md.h"
#endif // FreeBSD

6. I added stdlib.h to src/ee/execution/VoltDBEngine.cpp for FreeBSD:

#ifdef FreeBSD
#include <stdlib.h>
#endif // FreeBSD

7. And finally I added some #include lines to src/ee/voltdbjni.cpp

#ifdef FreeBSD
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#ifndef __USE_GNU
#define __USE_GNU
#endif // __USE_GNU
#include <sched.h>
#endif // FreeBSD




Now 'ant check' returns this error:


[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -DFreeBSD -fPIC -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/json_spirit/json_spirit_reader.co ../../third_party/cpp/json_spirit/json_spirit_reader.cpp
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -DFreeBSD -fPIC -isystem ../../third_party/cpp -I../../src/ee -c -g3 -O3 -mmmx -msse -msse2 -msse3 -DNDEBUG -DVOLT_LOG_LEVEL=500 -o objects/json_spirit/json_spirit_value.co ../../third_party/cpp/json_spirit/json_spirit_value.cpp
[exec] g++ -Wall -Wextra -Werror -Woverloaded-virtual -Wconversion -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wno-sign-compare -Wno-unused-parameter -pthread -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNOCLOCK -fno-omit-frame-pointer -fvisibility=hidden -DBOOST_SP_DISABLE_THREADS -DFreeBSD -fPIC -isystem ../../third_party/cpp -I../../src/ee -g3 -rdynamic -L/usr/local/lib -lexecinfo -o nativelibs/libvoltdb-1.2.1.07.jnilib objects//voltdbjni.co objects/stats/StatsAgent.co objects/stats/StatsSource.co objects/executors/abstractexecutor.co objects/executors/deleteexecutor.co objects/executors/distinctexecutor.co objects/executors/executorutil.co objects/executors/indexscanexecutor.co objects/executors/insertexecutor.co objects/executors/limitexecutor.co objects/executors/materializeexecutor.co objects/executors/nestloopexecutor.co objects/executors/nestloopindexexecutor.co objects/executors/orderbyexecutor.co objects/executors/projectionexecutor.co objects/executors/receiveexecutor.co objects/executors/sendexecutor.co objects/executors/seqscanexecutor.co objects/executors/unionexecutor.co objects/executors/updateexecutor.co objects/storage/constraintutil.co objects/storage/CopyOnWriteContext.co objects/storage/CopyOnWriteIterator.co objects/storage/ConstraintFailureException.co objects/storage/MaterializedViewMetadata.co objects/storage/persistenttable.co objects/storage/PersistentTableStats.co objects/storage/PersistentTableUndoDeleteAction.co objects/storage/PersistentTableUndoInsertAction.co objects/storage/PersistentTableUndoUpdateAction.co objects/storage/StreamedTableStats.co objects/storage/streamedtable.co objects/storage/table.co objects/storage/TableCatalogDelegate.co objects/storage/tablefactory.co objects/storage/TableStats.co objects/storage/tableutil.co objects/storage/temptable.co objects/storage/TupleStreamWrapper.co objects/storage/RecoveryContext.co objects/storage/TupleBlock.co objects/indexes/arrayuniqueindex.co objects/indexes/tableindex.co objects/indexes/tableindexfactory.co objects/indexes/IndexStats.co objects/catalog/authprogram.co objects/catalog/catalog.co objects/catalog/cataloginteger.co objects/catalog/catalogtype.co objects/catalog/cluster.co objects/catalog/column.co objects/catalog/columnref.co objects/catalog/connector.co objects/catalog/connectortableinfo.co objects/catalog/constraint.co objects/catalog/constraintref.co objects/catalog/database.co objects/catalog/group.co objects/catalog/groupref.co objects/catalog/host.co objects/catalog/index.co objects/catalog/materializedviewinfo.co objects/catalog/partition.co objects/catalog/planfragment.co objects/catalog/procedure.co objects/catalog/procparameter.co objects/catalog/program.co objects/catalog/site.co objects/catalog/statement.co objects/catalog/stmtparameter.co objects/catalog/table.co objects/catalog/user.co objects/catalog/userref.co objects/catalog/snapshotschedule.co objects/common/ThreadLocalPool.co objects/common/SegvException.co objects/common/SerializableEEException.co objects/common/SQLException.co objects/common/tabletuple.co objects/common/TupleSchema.co objects/common/types.co objects/common/UndoLog.co objects/common/NValue.co objects/common/RecoveryProtoMessage.co objects/common/RecoveryProtoMessageBuilder.co objects/common/DefaultTupleSerializer.co objects/plannodes/abstractjoinnode.co objects/plannodes/abstractoperationnode.co objects/plannodes/abstractplannode.co objects/plannodes/abstractscannode.co objects/plannodes/aggregatenode.co objects/plannodes/deletenode.co objects/plannodes/distinctnode.co objects/plannodes/indexscannode.co objects/plannodes/insertnode.co objects/plannodes/limitnode.co objects/plannodes/materializenode.co objects/plannodes/nestloopindexnode.co objects/plannodes/nestloopnode.co objects/plannodes/orderbynode.co objects/plannodes/plannodefragment.co objects/plannodes/plannodeutil.co objects/plannodes/projectionnode.co objects/plannodes/receivenode.co objects/plannodes/SchemaColumn.co objects/plannodes/sendnode.co objects/plannodes/seqscannode.co objects/plannodes/unionnode.co objects/plannodes/updatenode.co objects/expressions/abstractexpression.co objects/expressions/expressionutil.co objects/expressions/tupleaddressexpression.co objects/execution/JNITopend.co objects/execution/VoltDBEngine.co objects/logging/JNILogProxy.co objects/logging/LogManager.co objects/json_spirit/json_spirit_reader.co objects/json_spirit/json_spirit_value.co
[exec] /usr/lib/crt1.o(.text+0x8a): In function `_start':
[exec] : undefined reference to `main'
[exec] gmake: *** [nativelibs/libvoltdb-1.2.1.07.jnilib] Error 1
[exec] gmake: Leaving directory `/usr/home/max/voltdb_src/svn/voltdb-1.2.1.07/obj/release'
[exec] Detected 4 hardware threads to use during the build
[exec] Make returned: 512
BUILD FAILED
/usr/home/max/voltdb_src/svn/voltdb-1.2.1.07/build.xml:809: exec returned: 255



I don't know what to do next.

Any adia?


Thank you for your time.

P.S. Sorry for my English. I try as I can. :)
Hi Max, We build a few
aweisberg
Apr 5, 2011
Thank you very much for your help.
I have some progress...


Hi Max,
We build a few different things when you run ant check. If you do plain ant do you still see this?

ant check first builds the shared library, then it builds a version of the execution engine that is a standalone executable that communicates with java via TCP (voltdbipc), and then it builds a static version of the EE library. Then it builds each C++ unit test as a standalone executable that links against the static version of the EE library. It then runs the C++ unit tests under valgrind, and then the Java unit tests under junit.

If you invoke ant then only the shared library is built.


It looks like it is trying to link everything together as an executable instead of a shared library, an executable requires that main be defined so that there is an entry point, hence the error. On Linux it is the -shared in CTX.SOFLAGS and CTX.JNILIBFLAGS. I am not sure what that should be on FreeBSD, but you could try
-shared and see if the linker accepts it.


-Ariel