Stream: brlcad

Topic: LibreCAD 3


view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:05):

Hey @Jeffrey Liu

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:05):

Hey @Thusal Ranawaka, how's it going?

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:06):

Sorry, I didn't get your first tag for some reason.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:06):

Working on LibreCAD.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:06):

The final 3 days.

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:06):

Cool, have you compiled it successfully?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:07):

No. I can't understand it shows errors.

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:07):

The final 3 days.

Yeah, honestly the past 1 1/2 months have just flown by...

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:08):

I finally make a soltuion for the error and click on compile another error shows up.

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:08):

What's the error? I haven't compiled it myself but I might be able to help out.

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:09):

Be careful not to make too many drastic changes though, if your fixes are what is causing new errors, you might be straying a little too far.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:10):

It shows a lot of errors showing these kind Severity Code Description Project File Line Source Suppression State
Error LNK2001 unresolved external symbol lua_gettop C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\LibreCAD_3 C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\lc_entity.cpp.obj 1 Build

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 08:11):

pasted image Look

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:12):

I think those generally mean that something isn't linking properly (lua related) - perhaps some Lua lib?

view this post on Zulip Jeffrey Liu (Jan 19 2020 at 08:13):

Sending the whole output build would help

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 10:47):

The most important error is usually the first error in the list. The succeeding ones are often consequences of this first error.

For example, if there is an error in the compilation of the Lua library, everything which depends on this library can't be compiled too.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 10:50):

Have you read the build instructions? (There is a link in the task's description.) There is a list of required libraries. Do you installed/build them? Lua is one of them.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 10:51):

Make sure that you read the "Windows" section in the build instructions.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:35):

@Daniel Rossberg Yeah. I did I have been working on it for weeks with @Feragon . I enter the build instructions.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:39):

Hi @Jeffrey Liu Thank you for helping me out and waste your a lot of time for me. The output log is really long. So, I will send you the last outputs of it. [154/281] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\HostX64\x64\cl.exe /nologo /TP -DBOOST_ALL_DYN_LINK -DKAGUYA_SUPPORT_MULTIPLE_SHARED_LIBRARY=1 -DUSE_PERSISTENCE=1 -Dlcviewernoqt_EXPORTS -I..\..\..\third_party\msvc_dirent -IC:\Users\Asus\Documents\glew-2.1.0-win32\glew-2.1.0\include -IC:\Users\Asus\Documents\glm-0.9.9.6\glm -IC:\Users\Asus\Documents\boost_1_71_0-msvc-14.2-64 -IC:\Users\Asus\Documents\ft2101\freetype-2.10.1\include -IC:\Users\Asus\Documents\eigen-3.3.7\eigen-3.3.7 -I..\..\..\lckernel -I..\..\..\third_party -I..\..\..\lcviewernoqt /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /bigobj -std:c++14 /showIncludes /Folcviewernoqt\CMakeFiles\lcviewernoqt.dir\drawables\lccursor.cpp.obj /Fdlcviewernoqt\CMakeFiles\lcviewernoqt.dir\ /FS -c ..\..\..\lcviewernoqt\drawables\lccursor.cpp
[155/281] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\HostX64\x64\cl.exe /nologo /TP -DBOOST_ALL_DYN_LINK -DKAGUYA_SUPPORT_MULTIPLE_SHARED_LIBRARY=1 -DUSE_PERSISTENCE=1 -Dlcviewernoqt_EXPORTS -I..\..\..\third_party\msvc_dirent -IC:\Users\Asus\Documents\glew-2.1.0-win32\glew-2.1.0\include -IC:\Users\Asus\Documents\glm-0.9.9.6\glm -IC:\Users\Asus\Documents\boost_1_71_0-msvc-14.2-64 -IC:\Users\Asus\Documents\ft2101\freetype-2.10.1\include -IC:\Users\Asus\Documents\eigen-3.3.7\eigen-3.3.7 -I..\..\..\lckernel -I..\..\..\third_party -I..\..\..\lcviewernoqt /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /bigobj -std:c++14 /showIncludes /Folcviewernoqt\CMakeFiles\lcviewernoqt.dir\managers\dragmanager.cpp.obj /Fdlcviewernoqt\CMakeFiles\lcviewernoqt.dir\ /FS -c ..\..\..\lcviewernoqt\managers\dragmanager.cpp
[156/281] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\HostX64\x64\cl.exe /nologo /TP -DBOOST_ALL_DYN_LINK -DKAGUYA_SUPPORT_MULTIPLE_SHARED_LIBRARY=1 -DUSE_PERSISTENCE=1 -Dlcviewernoqt_EXPORTS -I..\..\..\third_party\msvc_dirent -IC:\Users\Asus\Documents\glew-2.1.0-win32\glew-2.1.0\include -IC:\Users\Asus\Documents\glm-0.9.9.6\glm -IC:\Users\Asus\Documents\boost_1_71_0-msvc-14.2-64 -IC:\Users\Asus\Documents\ft2101\freetype-2.10.1\include -IC:\Users\Asus\Documents\eigen-3.3.7\eigen-3.3.7 -I..\..\..\lckernel -I..\..\..\third_party -I..\..\..\lcviewernoqt /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /bigobj -std:c++14 /showIncludes /Folcviewernoqt\CMakeFiles\lcviewernoqt.dir\drawitems\lclwpolyline.cpp.obj /Fdlcviewernoqt\CMakeFiles\lcviewernoqt.dir\ /FS -c ..\..\..\lcviewernoqt\drawitems\lclwpolyline.cpp
[157/281] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\HostX64\x64\cl.exe /nologo /TP -DBOOST_ALL_DYN_LINK -DKAGUYA_SUPPORT_MULTIPLE_SHARED_LIBRARY=1 -DUSE_PERSISTENCE=1 -Dlcviewernoqt_EXPORTS -I..\..\..\third_party\msvc_dirent -IC:\Users\Asus\Documents\glew-2.1.0-win32\glew-2.1.0\include -IC:\Users\Asus\Documents\glm-0.9.9.6\glm -IC:\Users\Asus\Documents\boost_1_71_0-msvc-14.2-64 -IC:\Users\Asus\Documents\ft2101\freetype-2.10.1\include -IC:\Users\Asus\Documents\eigen-3.3.7\eigen-3.3.7 -I..\..\..\lckernel -I..\..\..\third_party -I..\..\..\lcviewernoqt /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /bigobj -std:c++14 /showIncludes /Folcviewernoqt\CMakeFiles\lcviewernoqt.dir\documentcanvas.cpp.obj /Fdlcviewernoqt\CMakeFiles\lcviewernoqt.dir\ /FS -c ..\..\..\lcviewernoqt\documentcanvas.cpp
C:\Users\Asus\LibreCAD_3\lcviewernoqt\documentcanvas.cpp(374): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data
C:\Users\Asus\LibreCAD_3\lcviewernoqt\documentcanvas.cpp(466): warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data
[158/281] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1424~1.283\bin\HostX64\x64\cl.exe /nologo /TP -DBOOST_ALL_DYN_LINK -DKAGUYA_SUPPORT_MULTIPLE_SHARED_LIBRARY=1 -DUSE_PERSISTENCE=1 -Dlcviewernoqt_EXPORTS -I..\..\..\third_party\msvc_dirent -IC:\Users\Asus\Documents\glew-2.1.0-win32\glew-2.1.0\include -IC:\Users\Asus\Documents\glm-0.9.9.6\glm -IC:\Users\Asus\Documents\boost_1_71_0-msvc-14.2-64 -IC:\Users\Asus\Documents\ft2101\freetype-2.10.1\include -IC:\Users\Asus\Documents\eigen-3.3.7\eigen-3.3.7 -I..\..\..\lckernel -I..\..\..\third_party -I..\..\..\lcviewernoqt /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /bigobj -std:c++14 /showIncludes /Folcviewernoqt\CMakeFiles\lcviewernoqt.dir\managers\snapmanagerimpl.cpp.obj /Fdlcviewernoqt\CMakeFiles\lcviewernoqt.dir\ /FS -c ..\..\..\lcviewernoqt\managers\snapmanagerimpl.cpp
ninja: build stopped: subcommand failed.

Build All failed.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:39):

In your screen shot there are errors regarding an unresolved external "lua_rawseti". This indicates that the Lua library is missing.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:40):

So

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:41):

No, I enter the libraries correctly.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:41):

The first errors are the important ones.
And, you can upload files here.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:41):

The lua libraries???

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:42):

No, I enter the libraries correctly.

Visual Studio says no, and this is the instance you have to satisfy ;)

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:43):

The lua libraries???

No, the Visual Studio build log.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:43):

But the build log is half a mile long.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:45):

Copy it to a file and attach this file here to your post.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:50):

@Daniel Rossberg Here, Build-All-started.docx

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:51):

However, maybe we should start with the CMake configuration. For example, with CMakeOutput.log (in the CMakeFiles directory of your build directory (where the Visual Studio solution (.sln) file is)).

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:53):

CMakeOutput.log Here is it. @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:57):

Daniel Rossberg Here, Build-All-started.docx

Okay, the first error is a Lua ink error:

C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\pluginmanager.cpp.obj : error LNK2019: unresolved external symbol lua_close referenced in function "public: __cdecl kaguya::State::~State(void)" (??1State@kaguya@@QEAA@XZ)

This can mean that it couldn't find the Lua library or the library version is to old. lua_close was formerly luaL_close.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 13:58):

But as far as I know version 5.3.5 id the latest version of lua.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 13:59):

CMakeOutput.log Here is it. Daniel Rossberg

Okay ...
CMakeCache.txt in your build directory?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:00):

CMakeCache.txt Here is it but it doesn't located on the build directory of the repo file but it present when I open the repo folder.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:09):

Daniel Rossberg Here, Build-All-started.docx

Okay, the first error is a Lua ink error:

C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\pluginmanager.cpp.obj : error LNK2019: unresolved external symbol lua_close referenced in function "public: __cdecl kaguya::State::~State(void)" (??1State@kaguya@@QEAA@XZ)

This can mean that it couldn't find the Lua library or the library version is to old. `lua_close` was formerly `luaL_close`.

But the lua library is present when the lua folder is open. @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:10):

According to the logs, your Lua installation should be at C:/Users/Asus/Documents/lua-5.3.5_Win64_dll14_lib. Where are the files ending on ".lib" there?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:11):

Yes. The library present on that path.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:12):

Exactly there or in a subdirectory? How is the library called?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:12):

lua53.lib This library is present at the exact location

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:15):

Okay...
Among the Visual Studio projects there is a "lcadluascript". Building this should produce he link errors.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:16):

So what should I do?

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:18):

Okay, try the following:
Do again the CMake configuration. Give there the LUA_LIBRARY variable the value C:/Users/Asus/Documents/lua-5.3.5_Win64_dll14_lib/lua53.lib. Then, hit Configure and Generate, and then try again to build LibreCAD 3.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:24):

That reduce 510 errors to 45 errors. That means the lua case is solved but the glew case. Severity Code Description Project File Line Source Suppression State
Error LNK2001 unresolved external symbol __imp___glewBindBuffer C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\LibreCAD_3 C:\Users\Asus\LibreCAD_3\out\build\x64-Debug\vertexbuffer.cpp.obj 1 Build @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:34):

There are some NOTFOUND entries regarding GLEW in CMake.
You can try the following: Open the CMake GUI. Filter for GLEW there (type "GLEW" in the Search field). Look for bad (NOTFOUND) entries there. Start with GLEW_DIR. Set them appropriate and hit Configure after each change (changing one entry can result in chaging others too).

BTW, the right directory for GLEW_DIR is probable C:/Users/Asus/Documents/glew-2.1.0-win32/glew-2.1.0.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:46):

It's not Configuring because the CMakeLists.txt is not appearing in that folder. @Daniel Rossberg pasted image

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:49):

No, I'm talking about the LibreCAD CMake configuration.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:49):

The one you already worked with.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:49):

I'm working on MSVC 2019

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 14:54):

@Daniel Rossberg When I enter the LibreCAD_3 folder in CMake it shows CMakeLists.txt does not appear.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 14:59):

Then, how did you set LUA_LIBRARY to C:/Users/Asus/Documents/lua-5.3.5_Win64_dll14_lib/lua53.lib? I'm talking about the same CMake configuration.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:00):

I do it in Microsoft Visual Studio 2019 not in CMake.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:01):

I downloaded the CMake and C++ workload for Visual Studio.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:03):

Maybe you can set GLEW_DIR in Visual Studio too, if it has CMake integrated. I don't have Visual Studio here.

In the CMake GUI you had to set the build directory only. It should find the rest automatically.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:04):

Yeah. But the some of the functions does not work on it.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:07):

There are some NOTFOUND entries regarding GLEW in CMake.
You can try the following: Open the CMake GUI. Filter for GLEW there (type "GLEW" in the Search field). Look for bad (NOTFOUND) entries there. Start with GLEW_DIR. Set them appropriate and hit Configure after each change (changing one entry can result in chaging others too).

BTW, the right directory for GLEW_DIR is probable C:/Users/Asus/Documents/glew-2.1.0-win32/glew-2.1.0.

When I enter GLEW_DIR so should I have to remove the GLEW_INCLUDE_DIR @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:13):

Maybe, it should generate it again with the information from GLEW_DIR. But, GLEW_INCLUDE_DIR looks good. It should be save to keep it.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:14):

I generate the Cache with both environment variables but the errors are the same. @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:24):

Did you checked all of the GLEW variables? E.g. GLEW_ROOT too?

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:24):

And GLEW_SHARED_LIBRARY_DEBUG and GLEW_STATIC_LIBRARY_DEBUG?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:26):

And GLEW_SHARED_LIBRARY_DEBUG and GLEW_STATIC_LIBRARY_DEBUG?

I never entered those. They don't need to enter and GLEW_ROOT variable is defined as a windows environment variable not Cmake.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:32):

Looking at the files provided by you, it looks like GLEW is at C:/Users/Asus/Documents/glew-2.1.0-win32/glew-2.1.0, but the Windows envoronment variable points to C:\Users\Asus\Documents\glew.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:34):

I would think that GLEW_SHARED_LIBRARY_DEBUG and GLEW_STATIC_LIBRARY_DEBUG will be used for the debug build.

How does it build if you switch to release in Visual Studio?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 15:35):

First you have to generate the Cache and build the files

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 15:39):

?
In Visual Studio, at the top, in the middle, you have "x64-Debug". You should be able to switch to Release there.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:02):

I tried but there are 45 errors Severity Code Description Project File Line Source Suppression State
Error LNK2019 unresolved external symbol __imp___glewBindBuffer referenced in function "public: void __cdecl lc::viewer::opengl::VertexBuffer::bind(void)const " (?bind@VertexBuffer@opengl@viewer@lc@@QEBAXXZ) C:\Users\Asus\LibreCAD_3\out\build\x64-Release\LibreCAD_3 C:\Users\Asus\LibreCAD_3\out\build\x64-Release\vertexbuffer.cpp.obj 1 Build @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:03):

This means that there are the GLEW errors too.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:04):

The problem is why is it happens.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:07):

Where you able to open the CMake GUI with the LibreCAD project? I.e., setting the build directory to C:\Users\Asus\LibreCAD_3\out\build in this GUI. The other values should be set automatically then.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:08):

(I hope this is the root of your build directory.)

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:08):

But it doesn't configure because there are no CMakeLists.txt files in it.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:10):

That's right. CMakeLists.txt is in the source directory. But, if you write a valid build directory in the second(!) line of CMake, the first line with the sorce directory should be automatically set.

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:11):

Therefore, not "Where is the source code" but "Where to build the binaries".

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:12):

So what should I do?

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:14):

Put C:\Users\Asus\LibreCAD_3\out\build (or whatever is the directory with the CMakeCache.txt) into the "Where to build the binaries" field of the CMake GUI.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:21):

But it show this error pasted image

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:22):

pasted image

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:27):

This looks unusual. Did Visual Studio generated two distinct configurations for Debug and Release?

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:28):

No. only release

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:29):

I don't think so, because there is the C:\Users\Asus\LibreCAD_3\out\build\x64-Debug directory with the debug configuration too.

view this post on Zulip Thusal Ranawaka (Jan 19 2020 at 16:29):

Should I remove it?

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:33):

I personally would try to get a clean CMake configuration:

view this post on Zulip Daniel Rossberg (Jan 19 2020 at 16:34):

Should I remove it?

No.

view this post on Zulip Thusal Ranawaka (Jan 20 2020 at 13:26):

And, if you set GLEW_DIR and hit Configure, it will reset to NOTFOUND?

@Daniel Rossberg Yes. It happens as you said.

view this post on Zulip Daniel Rossberg (Jan 20 2020 at 18:52):

Here, pasted image

According to this image, CMake is missing GLW_INCLUDE_DIRS. You can set it by hitting the Add Entry Button. It has to be a path.


Last updated: Oct 09 2024 at 00:44 UTC