Anyone know what the embeddedlua errors are for? I keep getting things like "error: 'free' was not declared in this scope." When trying to run sudo make on the rt^3 makefile
hmm... why run make
as root?
and, is there any erros with cmake
? you probably have to install BRL-CAD before buildin rt^3
My directory for the files was restricted to the root user. Do you know how I may resolve the issue? I also installed BRLCAD 2 weeks ago so it's odd for it not to work
chown -R <user>:<groop> *
?
I've tried building it without a rooted directory and it still wouldn't work
The embeddedlua files seem to throw it off
I've never even tried to build it as root.
Do you have any ideas why it wont build properly?
you should never need to compile as root -- if you did, something else was wrong and compiling as root causes other problems
whenever I hear someone do that, my recommendation is to delete the directory and start over -- you made a mess and trying to figure out where the mess started is a bit of a waste of time... :)
I've tried to do it without root and it didn't work but I'll give it another shot.
Do you mean make
or make install
?
Reading the installation guide it says to use su -c "make install" but reports that no rule was made for "install."
I've tried setting the install path and base dir in the cmake
No luck
Is that a common error?
No. My point was that the standard installation directory can only be created by root. But, if you changed the install path in CMake to something in your home directory ...
(deleted)
@Mahdi try compiling (i.e., "make" on Linux or Compile in MSVC on Windows) and report whether that succeeds or not
you might not even need to install
So I create a makefile in /build and run make on it, right? I've done that before without success as it always fails with the lua
saying it fails doesn't tell anyone anything that could possibly be helpful :)
what platform are you on?
My apologies, I was just about to send the error information:
@Mahdi You should install BRL-CAD before and add the bin directory of the installation to your path environment variable.
I have been trying to build rt^3 but I have been getting errors.
the error I have been getting is:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: [lib/libge.dylib] Error 1
make[1]: [src/libge/CMakeFiles/ge.dir/all] Error 2
make: *** [all] Error 2
I am building this on mac
caleb can you run "make VERBOSE=1" and post all the output?
here is the output https://gist.github.com/sunkink29/057534fb413f1d5be8c084f7869d1c69
@caleb parks try this: edit src/libge/CMakeLists.txt, find the ge_SRCS section, and add ../coreInterface/BagOfTriangles.cpp to the list
in that same file, also edit the bottom TARGET_LINK_LIBRARIES line and put nmg into the list e.g., TARGET_LINK_LIBRARIES(ge nmg ${BRLCAD_BU_LIBRARY} ...
that worked to get past that part but it threw another error
here is the log: https://gist.github.com/sunkink29/057534fb413f1d5be8c084f7869d1c69
it didn't get past it, it just fixed one set of symbols -- there' s a handful in there missing
actually doesn't look different...
sorry that was the same one. I updated it now
ahh, that's definitely different ;)
do you have BRL-CAD installed?
okay, I see that you installed it into /usr/local/brlcad
run this: ls -la /usr/local/brlcad/lib/libnmg.dylib
this is what I get back
-rwxr-xr-x 1 root wheel 951324 Dec 18 22:01 /usr/local/brlcad/lib/libnmg.dylib
okay, so it's just a build burp that you can work around temporarily...
run this: cd "/Users/RPS/Documents/BRL-CAD/rt^3/.build/src/libge"
then:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -dynamiclib -Wl,-headerpad_max_install_names -o ../../lib/libge.dylib -install_name "/Users/RPS/Documents/BRL-CAD/rt^3/.build/lib/"libge.dylib CMakeFiles/ge.dir/GeometryEngine.o CMakeFiles/ge.dir/MinimalDatabase.o CMakeFiles/ge.dir/MinimalObject.o CMakeFiles/ge.dir/__/coreInterface/Arb8.o CMakeFiles/ge.dir/__/coreInterface/BagOfTriangles.o CMakeFiles/ge.dir/__/coreInterface/Combination.o CMakeFiles/ge.dir/__/coreInterface/Cone.o CMakeFiles/ge.dir/__/coreInterface/ConstDatabase.o CMakeFiles/ge.dir/__/coreInterface/Database.o CMakeFiles/ge.dir/__/coreInterface/Ellipsoid.o CMakeFiles/ge.dir/__/coreInterface/EllipticalTorus.o CMakeFiles/ge.dir/__/coreInterface/FileDatabase.o CMakeFiles/ge.dir/__/coreInterface/globals.o CMakeFiles/ge.dir/__/coreInterface/Halfspace.o CMakeFiles/ge.dir/__/coreInterface/HyperbolicCylinder.o CMakeFiles/ge.dir/__/coreInterface/Hyperboloid.o CMakeFiles/ge.dir/__/coreInterface/MemoryDatabase.o CMakeFiles/ge.dir/__/coreInterface/NonManifoldGeometry.o CMakeFiles/ge.dir/__/coreInterface/Object.o CMakeFiles/ge.dir/__/coreInterface/ParabolicCylinder.o CMakeFiles/ge.dir/__/coreInterface/Paraboloid.o CMakeFiles/ge.dir/__/coreInterface/Particle.o CMakeFiles/ge.dir/__/coreInterface/Pipe.o CMakeFiles/ge.dir/__/coreInterface/Torus.o CMakeFiles/ge.dir/__/coreInterface/Unknown.o /usr/local/brlcad/lib/libnmg.dylib /usr/local/brlcad/lib/libbu.dylib /usr/local/brlcad/lib/libbn.dylib /usr/local/brlcad/lib/librt.dylib /usr/local/brlcad/lib/libwdb.dylib
got this error back:
Undefined symbols for architecture x86_64:
"BRLCAD::Sphere::ClassName()", referenced from:
BRLCAD::Database::Add(BRLCAD::Object const&) in Database.o
"BRLCAD::Sphere::Sphere(resource, directory, rt_db_internal, db_i)", referenced from:
BRLCAD::ConstDatabase::Get(char const*, BRLCAD::ConstDatabase::ObjectCallback&) const in ConstDatabase.o
"BRLCAD::Sphere::~Sphere()", referenced from:
BRLCAD::ConstDatabase::Get(char const*, BRLCAD::ConstDatabase::ObjectCallback&) const in ConstDatabase.o
"BRLCAD::Sphere::Internal() const", referenced from:
BRLCAD::Database::Add(BRLCAD::Object const&) in Database.o
"typeinfo for BRLCAD::Sphere", referenced from:
BRLCAD::Database::Add(BRLCAD::Object const&) in Database.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
okay cool, so just a couple more lines missing from that CMakeLists.txt file that you edited
@caleb parks I assume you have an svn checkout, yes? try "svn up" in the top source directory. you should see a couple files update with changes I just made
I now have this error:
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:35: warning:
missing terminating '"' character [-Winvalid-pp-token]
const char* const TheLuaScript = R"ESCSEQ(
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:34: error: use of
undeclared identifier 'R'
const char* const TheLuaScript = R"ESCSEQ(
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:35: error:
expected ';' after top level declarator
const char* const TheLuaScript = R"ESCSEQ(
^
;
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:42:8: warning:
missing terminating '"' character [-Winvalid-pp-token]
)ESCSEQ";
^
2 warnings and 2 errors generated.
make[2]: [tests/embeddedLua/CMakeFiles/hellobrlcad.dir/hellobrlcad.o] Error 1
make[1]: [tests/embeddedLua/CMakeFiles/hellobrlcad.dir/all] Error 2
@caleb parks try editing tests/embeddedLua/hellobrlcad.cpp and change the print("Hello ", database:Title(), "!") line to:
print(\"Hello \", database:Title(), \"!\")
i.e., put a slash before all of the double quote characters just on that line
I get even more errors:
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:35: warning:
missing terminating '"' character [-Winvalid-pp-token]
const char* const TheLuaScript = R"ESCSEQ(
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:34: error: use of
undeclared identifier 'R'
const char* const TheLuaScript = R"ESCSEQ(
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:40:35: error:
expected ';' after top level declarator
const char* const TheLuaScript = R"ESCSEQ(
^
;
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:41:8: error:
non-ASCII characters are not allowed outside of literals and identifiers
print(\”Hello \”, database:Title(), \”!\”)
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:41:18: error:
non-ASCII characters are not allowed outside of literals and identifiers
print(\”Hello \”, database:Title(), \”!\”)
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:41:42: error:
non-ASCII characters are not allowed outside of literals and identifiers
print(\”Hello \”, database:Title(), \”!\”)
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:41:47: error:
non-ASCII characters are not allowed outside of literals and identifiers
print(\”Hello \”, database:Title(), \”!\”)
^
/Users/RPS/Documents/BRL-CAD/rt^3/tests/embeddedLua/hellobrlcad.cpp:42:8: warning:
missing terminating '"' character [-Winvalid-pp-token]
)ESCSEQ";
^
2 warnings and 6 errors generated.
make[2]: [tests/embeddedLua/CMakeFiles/hellobrlcad.dir/hellobrlcad.o] Error 1
make[1]: [tests/embeddedLua/CMakeFiles/hellobrlcad.dir/all] Error 2
okay, no worries, that was just a guess -- let me see what's going on there
ahhh, it's a c++11 thing
@caleb parks try this instead: const char* const TheLuaScript = "print(\"Hello \", database:Title(), \"!\")";
actually: const char* const TheLuaScript = "print(\"Hello \", database:Title(), \"!\")\n";
it compiled correctly after that change
I'm having trouble trying to build rt^3. I have installed CMake, pkg-config and OGRE.
I built BRL-CAD from source, but haven't make install
, only make
.
I've tried setting the relevant paths in CMakeLists.txt
in the root folder of rt3 like so (/home/jeff/Documents/brlcad
is the location of the folder containing brlcad):
SET(BRLCAD_BASE_DIR /home/jeff/Documents/brlcad) SET(BRLCAD_HEADERS_DIR /home/jeff/Documents/brlcad/src) SET(BRLCAD_OPENNURBS_HEADERS_DIR /home/jeff/Documents/brlcad/src/other/openNURBS) SET(TCL_INCLUDE_PATH /home/jeff/Documents/brlcad/src/other/tcl)
Then I tried building by doing:
cd rt3 mkdir build cd build cmake ...
which looked fine (no errors from cmake), but executing
make
returned a bunch of not declared in this scope
s.
Also tried:
cd src/other sudo make install
but this returns
file INSTALL cannot find "/include/embeddedlua.h
@Jeff Sieu Please try again after an svn update
. There seem to be differences between the gcc versions (maybe in connection with the standard C++ compliance).
Now I get this when I try to build in rt3/build
and the same file INSTALL cannot find "/include/embeddedlua.h
running make install
in src/other
.
@Jeff Sieu Please, do a svn update
again.
I got it to build! I had to install brlcad release via make install
first.
:tada:
Installing BRL-CAD before helps (and is part of the task description ;) It's possible to set all the paths by hand, but it's not easy.
/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.1: undefined reference to `png_set_interlace_handling@PNG16_0'
Some missing libs?
that's usually version incompatibility. you have a system-installed libQt5Gui library that uses libpng, but the libpng it found didn't have a function it needs (png_set_interface_handling())
the fix can be tricky, can be simple
Using my own libpng?
Is the libpng in brl-cad older?
no, brl-cad includes a very new version (which can cause that problem too)
it would be newer than whatever qt5 used
Well, Can I put older version of libpng(the version Qt5 use) in a different location and link Qt with that version instead of the one in BRL-CAD?
that should be possible -- you'll probably need to rebuild BRL-CAD and make sure libpng compilation is turned off (you may need to point it at the one Qt used)
I'll try ...
Last updated: Jan 10 2025 at 00:48 UTC