Open mimooh opened 6 years ago
Hi, To generate executable binary file, you should switch to master branch first [#9] Probably the document is not clear enough, my mistake ; )
OK, this time I get this error on Ubuntu 16.04:
mimooh:master$ pwd /home/git/recastCLI.js.git/branches/master mimooh:master$ make ===> Building recast.a: make[1]: Entering directory '/home/git/recastCLI.js.git/branches/master/recast' AR all make[1]: Leaving directory '/home/git/recastCLI.js.git/branches/master/recast' ===> Building main.a: make[1]: Entering directory '/home/git/recastCLI.js.git/branches/master/main' CC build.o build.cpp: In function 'int build(const char*, float, float, float, float, float, int, int, int, int, float, int, int, int)': build.cpp:106:33: error: 'memset' was not declared in this scope memset(&m_cfg, 0, sizeof(m_cfg)); ^
May be confusing, because I use svn in github. But with git it is the same for me:
mimooh:recastCLI.js$ git checkout master Branch master set up to track remote branch master from origin. Switched to a new branch 'master' mimooh:recastCLI.js$ ls main recast LICENSE README.md dungeon.obj make.config makefile nav_test.obj mimooh:recastCLI.js$ make ===> Building recast.a: make[1]: Entering directory '/home/git/recastCLI.js/recast' CC RecastAlloc.o CC RecastMeshDetail.o CC RecastRasterization.o CC RecastLayers.o CC RecastFilter.o CC RecastMesh.o CC RecastContour.o CC RecastAssert.o CC RecastRegion.o CC Recast.o CC RecastArea.o AR all make[1]: Leaving directory '/home/git/recastCLI.js/recast' ===> Building main.a: make[1]: Entering directory '/home/git/recastCLI.js/main' CC ChunkyTriMesh.o CC InputGeom.o CC MeshLoaderObj.o CC build.o build.cpp: In function 'int build(const char*, float, float, float, float, float, int, int, int, int, float, int, int, int)': build.cpp:106:33: error: 'memset' was not declared in this scope memset(&m_cfg, 0, sizeof(m_cfg)); ^
Fixed memset
issues, but still have some trouble #8
I'm getting this
===> Building recast.a:
make[1]: Entering directory '/home/mrsonic/Downloads/master/recast'
AR all
make[1]: Leaving directory '/home/mrsonic/Downloads/master/recast'
===> Building main.a:
make[1]: Entering directory '/home/mrsonic/Downloads/master/main'
CC port.o
CC main.o
main.cpp: In function ‘int main(int, const char**)’:
main.cpp:49:236: error: cannot convert ‘const char*’ to ‘float’ for argument ‘1’ to ‘char* build(float, float, float, float, float, float, float, float, float, float, float, float, float)’
lSize, c_cellHeight, c_agentHeight, c_agentRadius, c_agentMaxClimp, c_agentMaxSlope, c_regionMinSize, c_regionMergeSize, c_edgeMaxLen, c_edgeMaxError, c_vertsPerPoly, c_detailSampleDist, c_detailSampleMaxErro);
^
<builtin>: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory '/home/mrsonic/Downloads/master/main'
makefile:13: recipe for target 'main' failed
make: *** [main] Error 2
@MrSonicMaster
Try node-gyp rebuild
Or switch to master branch before make
git checkout master
'/home/mrsonic/Downloads/*master*/main'
I was using master branch, and node-gyp rebuild didn't/wouldn't help (as this isn't node version, it's master branch.) Thank's for the fast reply though
Probably you haven't switching to master branch correctly.
port.c
doesn't exist in master branch.
nodejs
branch I get the following error:
# node-gyp rebuild
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.
I have graceful-fs installled globally.
2. On the `master` branch I get the following error:
===> Building recast.a:
make[1]: Entering directory 'recastCLI.js/recast'
C++ RecastAlloc.o
C++ RecastLayers.o
C++ RecastFilter.o
C++ RecastMesh.o
C++ RecastRasterization.o
C++ RecastContour.o
C++ RecastAssert.o
C++ Recast.o
C++ RecastRegion.o
C++ RecastMeshDetail.o
C++ RecastArea.o
AR all
make[1]: Leaving directory 'recastCLI.js/recast'
===> Building main.a:
make[1]: Entering directory 'recastCLI.js/main'
C++ ChunkyTriMesh.o
C++ InputGeom.o
C++ MeshLoaderObj.o
C++ build.o
C++ main.o
AR all
make[1]: Leaving directory 'recastCLI.js/main'
Done
C++ all
main/main.a(build.o): In function build(char const*, float, float, float, float, float, int, int, int, int, float, int, int, int)': build.cpp:(.text+0x26b): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x33e): undefined reference to `rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x510): undefined reference to rcCalcGridSize(float const*, float const*, float, int*, int*)' build.cpp:(.text+0x538): undefined reference to
rcAllocHeightfield()'
build.cpp:(.text+0x56b): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0x5c4): undefined reference to
rcCreateHeightfield(rcContext, rcHeightfield&, int, int, float const, float const, float, float)'
build.cpp:(.text+0x5eb): undefined reference to `rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x63a): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0x697): undefined reference to
rcMarkWalkableTriangles(rcContext, float, float const, int, int const, int, unsigned char)'
build.cpp:(.text+0x6d0): undefined reference to rcRasterizeTriangles(rcContext*, float const*, int, int const*, unsigned char const*, int, rcHeightfield&, int)' build.cpp:(.text+0x6fb): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x762): undefined reference to `rcFilterLowHangingWalkableObstacles(rcContext, int, rcHeightfield&)'
build.cpp:(.text+0x78f): undefined reference to rcFilterLedgeSpans(rcContext*, int, int, rcHeightfield&)' build.cpp:(.text+0x7b8): undefined reference to
rcFilterWalkableLowHeightSpans(rcContext, int, rcHeightfield&)'
build.cpp:(.text+0x7bd): undefined reference to rcAllocCompactHeightfield()' build.cpp:(.text+0x7f0): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x826): undefined reference to rcBuildCompactHeightfield(rcContext*, int, int, rcHeightfield&, rcCompactHeightfield&)' build.cpp:(.text+0x84d): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x874): undefined reference to `rcFreeHeightField(rcHeightfield)'
build.cpp:(.text+0x89d): undefined reference to rcErodeWalkableArea(rcContext*, int, rcCompactHeightfield&)' build.cpp:(.text+0x8c4): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0x9e7): undefined reference to `rcMarkConvexPolyArea(rcContext, float const, int, float, float, unsigned char, rcCompactHeightfield&)'
build.cpp:(.text+0xa17): undefined reference to `rcBuildDistanceField(rcContext, rcCompactHeightfield&)'
build.cpp:(.text+0xa3e): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0xa74): undefined reference to
rcBuildRegions(rcContext, rcCompactHeightfield&, int, int, int)'
build.cpp:(.text+0xa9f): undefined reference to `rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0xae0): undefined reference to rcBuildRegionsMonotone(rcContext*, rcCompactHeightfield&, int, int, int)' build.cpp:(.text+0xb07): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0xb34): undefined reference to `rcBuildLayerRegions(rcContext, rcCompactHeightfield&, int, int)'
build.cpp:(.text+0xb5b): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0xb6a): undefined reference to
rcAllocContourSet()'
build.cpp:(.text+0xb9d): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0xbe4): undefined reference to
rcBuildContours(rcContext, rcCompactHeightfield&, float, int, rcContourSet&, int)'
build.cpp:(.text+0xc0b): undefined reference to `rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0xc1a): undefined reference to rcAllocPolyMesh()' build.cpp:(.text+0xc4d): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0xc7a): undefined reference to `rcBuildPolyMesh(rcContext, rcContourSet&, int, rcPolyMesh&)'
build.cpp:(.text+0xca1): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0xcb0): undefined reference to
rcAllocPolyMeshDetail()'
build.cpp:(.text+0xce3): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' build.cpp:(.text+0xd30): undefined reference to
rcBuildPolyMeshDetail(rcContext, rcPolyMesh const&, rcCompactHeightfield const&, float, float, rcPolyMeshDetail&)'
build.cpp:(.text+0xd57): undefined reference to `rcContext::log(rcLogCategory, char const, ...)'
build.cpp:(.text+0xd7e): undefined reference to rcFreeCompactHeightfield(rcCompactHeightfield*)' build.cpp:(.text+0xd98): undefined reference to
rcFreeContourSet(rcContourSet)'
main/main.a(InputGeom.o): In function `InputGeom::loadMesh(rcContext, std::__cxx11::basic_string<char, std::char_traitsrcContext::log(rcLogCategory, char const*, ...)' InputGeom.cpp:(.text+0x474): undefined reference to
rcContext::log(rcLogCategory, char const, ...)'
InputGeom.cpp:(.text+0x4c2): undefined reference to `rcCalcBounds(float const, int, float, float)'
InputGeom.cpp:(.text+0x507): undefined reference to rcContext::log(rcLogCategory, char const*, ...)' InputGeom.cpp:(.text+0x588): undefined reference to
rcContext::log(rcLogCategory, char const*, ...)'
collect2: error: ld returned 1 exit status
makefile:3: recipe for target 'all' failed
make: *** [all] Error 1
My OS is Debian GNU/Linux 9.6 (stretch).
Any insight on this?
@Vagelis-Prokopiou
I'm getting the same errors as @Vagelis-Prokopiou lots of undefined references. CentOS 7
First thing is I cannot find /usr/include/node/node.h. Which I fix by adding this line to makefile: CPPFLAGS+=-I/usr/include/node/
make[1]: Leaving directory '/home/mimooh/recastCLI.js-nodejs/recast' ===> Building main.a: make[1]: Entering directory '/home/mimooh/recastCLI.js-nodejs/main' CC build.o CC port.o port.cpp:3:18: fatal error: node.h: No such file or directory compilation terminated.