netsim compilation error on Linux.
Opened this issue · 1 comments
jstressman commented
I'm now stuck with a compilation error.
justin@kuroiishi:~/Downloads/breve-master$ make
Generating dependencies for bin/breve.cc
Generating dependencies for util/bigMatrix.cc
Generating dependencies for util/vector.cc
Generating dependencies for util/text.cc
Generating dependencies for util/stringstream.cc
Generating dependencies for util/quat.cc
Generating dependencies for util/nr.cc
Generating dependencies for util/memory.cc
Generating dependencies for util/matrix.cc
Generating dependencies for util/list.cc
Generating dependencies for util/hash.cc
Generating dependencies for util/error.cc
Generating dependencies for scheme/scheme.cc
Generating dependencies for lisp/lisp.cc
Generating dependencies for python/breveFunctionsPython.cc
Generating dependencies for python/pythonFrontend.cc
Generating dependencies for steve/perlconvert.cc
Generating dependencies for steve/pyconvert.cc
Generating dependencies for steve/xml.cc
Generating dependencies for steve/stringexp.cc
Generating dependencies for steve/steveFrontend.cc
Generating dependencies for steve/object.cc
Generating dependencies for steve/interactive.cc
Generating dependencies for steve/genetic.cc
Generating dependencies for steve/gc.cc
Generating dependencies for steve/expression.cc
Generating dependencies for steve/evaluation.cc
Generating dependencies for steve/evalListSort.cc
Generating dependencies for steve/dataObject.cc
Generating dependencies for steve/breveFunctionsSteveXML.cc
Generating dependencies for steve/breveFunctionsSteveObject.cc
Generating dependencies for steve/breveFunctionsSteveDataObject.cc
yacc -d -o steve/steveparse.tab.c steve/steveparse.y
Generating dependencies for steve/steveparse.tab.c
: -t steve/stevelex.l > steve/stevelex.c
Generating dependencies for steve/stevelex.c
: -t steve/format.l > steve/format.c
Generating dependencies for steve/format.c
Generating dependencies for neural/Network/neuralNetworkLearningAlgorithm.cc
Generating dependencies for neural/Network/neuralNetwork.cc
Generating dependencies for neural/ffTrain.c
Generating dependencies for neural/ff.c
Generating dependencies for kernel/network.cc
Generating dependencies for kernel/namespace.cc
Generating dependencies for kernel/multithread.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsWorld.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsTerrain.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsStationary.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsSpring.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsSound.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsShape.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsQGAME.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsPushCallback.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsPush.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsPhysics.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsPatches.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsObject.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsNeural.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsNeuralNetwork.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsNetwork.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsMultibody.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsMovie.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsMenu.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsStatistics.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsVector.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsMatrix.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsMath.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsReal.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsLink.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsJoint.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsImage.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsFile.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsDrawing.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsControl.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsURL.cc
Generating dependencies for kernel/internalFunctions/breveFunctionsCamera.cc
Generating dependencies for kernel/url.cc
Generating dependencies for kernel/sound.cc
Generating dependencies for kernel/plugins.cc
Generating dependencies for kernel/internal.cc
Generating dependencies for kernel/interface.cc
Generating dependencies for kernel/frontendAPI.cc
Generating dependencies for kernel/evalList.cc
Generating dependencies for kernel/evalHash.cc
Generating dependencies for kernel/evalData.cc
Generating dependencies for kernel/engine.cc
Generating dependencies for kernel/color.cc
Generating dependencies for kernel/callback.cc
Generating dependencies for kernel/breveObjectAPI.cc
Generating dependencies for kernel/breveEval.cc
Generating dependencies for simulation/shadowvolume.cc
Generating dependencies for simulation/render.cc
Generating dependencies for simulation/skybox.cc
Generating dependencies for simulation/texture.cc
Generating dependencies for simulation/drawcommand.cc
Generating dependencies for simulation/camera.cc
Generating dependencies for simulation/fonts.cc
Generating dependencies for simulation/mesh.cc
Generating dependencies for simulation/roam.cc
Generating dependencies for simulation/worldObject.cc
Generating dependencies for simulation/world.cc
Generating dependencies for simulation/volInt.cc
Generating dependencies for simulation/vclipData.cc
Generating dependencies for simulation/vclip.cc
Generating dependencies for simulation/tiger.cc
Generating dependencies for simulation/terrain.cc
Generating dependencies for simulation/springs.cc
Generating dependencies for simulation/shape.cc
Generating dependencies for simulation/sensor.cc
Generating dependencies for simulation/patch.cc
Generating dependencies for simulation/netsim.cc
Generating dependencies for simulation/multibody.cc
Generating dependencies for simulation/movie.cc
Generating dependencies for simulation/link.cc
Generating dependencies for simulation/lightdetector.cc
Generating dependencies for simulation/joint.cc
Generating dependencies for simulation/integrate.cc
Generating dependencies for simulation/image.cc
rm steve/stevelex.c steve/format.c
: -t steve/stevelex.l > steve/stevelex.c
Generating dependencies for steve/stevelex.c
: -t steve/format.l > steve/format.c
Generating dependencies for steve/format.c
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/image.o simulation/image.cc
simulation/image.cc: In function ‘unsigned char* slReadPNGImage(const char*, int*, int*, int*, int)’:
simulation/image.cc:248:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( y = 0;y < *height;y++ ) rows[y] = ( png_byte* ) malloc( png_get_rowbytes(png_ptr, info) );
~~^~~~~~~~~
simulation/image.cc:254:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( x = 0;x < *height;x++ ) {
~~^~~~~~~~~
simulation/image.cc:257:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( y = 0;y < *width;y++ ) {
~~^~~~~~~~
simulation/image.cc:270:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( y = 0;y < *height;y++ ) free( rows[y] );
~~^~~~~~~~~
simulation/image.cc:185:6: warning: variable ‘passes’ set but not used [-Wunused-but-set-variable]
int passes;
^~~~~~
simulation/image.cc:197:26: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
fread( header, 1, 8, f );
^
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/integrate.o simulation/integrate.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/joint.o simulation/joint.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/lightdetector.o simulation/lightdetector.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/link.o simulation/link.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/movie.o simulation/movie.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/multibody.o simulation/multibody.cc
g++ -I/usr/include/python2.7 -Iinclude/breve -DdDOUBLE -DHAVE_CONFIG_H -g -g -O2 -pipe -Wall -c -o simulation/netsim.o simulation/netsim.cc
In file included from simulation/netsim.cc:3:0:
include/breve/netsim.h:46:33: error: expected ‘)’ before ‘*’ token
slNetsimServer( slWorld *inWorld );
^
include/breve/netsim.h:54:3: error: ‘slWorld’ does not name a type
slWorld* _world;
^~~~~~~
include/breve/netsim.h:98:25: error: variable or field ‘slDrawNetsimBounds’ declared void
void slDrawNetsimBounds(slWorld *);
^~~~~~~
include/breve/netsim.h:98:25: error: ‘slWorld’ was not declared in this scope
include/breve/netsim.h:98:34: error: expected primary-expression before ‘)’ token
void slDrawNetsimBounds(slWorld *);
^
simulation/netsim.cc:20:1: error: prototype for ‘slNetsimServer::slNetsimServer(slWorld*)’ does not match any in class ‘slNetsimServer’
slNetsimServer::slNetsimServer( slWorld *inWorld ) {
^~~~~~~~~~~~~~
In file included from simulation/netsim.cc:3:0:
include/breve/netsim.h:44:7: error: candidates are: slNetsimServer::slNetsimServer(slNetsimServer&&)
class slNetsimServer {
^~~~~~~~~~~~~~
include/breve/netsim.h:44:7: error: slNetsimServer::slNetsimServer(const slNetsimServer&)
include/breve/netsim.h:44:7: error: slNetsimServer::slNetsimServer()
simulation/netsim.cc: In function ‘void* slNetsimThread(void*)’:
simulation/netsim.cc:100:78: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive]
slMessage( DEBUG_ALL, "netsim: disconnect from %d\n", ( int )event.peer->data );
^~~~
simulation/netsim.cc: In member function ‘slNetsimClient* slNetsimServer::openConnection(ENetAddress*)’:
simulation/netsim.cc:118:54: error: too few arguments to function ‘ENetPeer* enet_host_connect(ENetHost*, const ENetAddress*, size_t, enet_uint32)’
data->_peer = enet_host_connect( _host, address, 32 );
^
In file included from include/breve/netsim.h:5:0,
from simulation/netsim.cc:3:
/usr/include/enet/enet.h:547:21: note: declared here
ENET_API ENetPeer * enet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32);
^~~~~~~~~~~~~~~~~
Makefile:73: recipe for target 'simulation/netsim.o' failed
make: *** [simulation/netsim.o] Error 1
jonklein commented
If you remove the check for libenet in configure.ac, it will skip compilation of this: AC_CHECK_LIB([enet], [enet_initialize])