Stream: brlcad

Topic: Compiling BRL-CAD


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

@Sean I claimed a task called 'Compile BRL-CAD with Microsoft Visual Studio Community Edition' so where do I can find the SVN checkout.

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 12:13):

@Thusal Ranawaka I recommend to have a look at the more general task "[BEGIN HERE] Compile and Install BRL-CAD from source code". If you want to use Visual Studio the work is mainly the same, but the general task has more references in its description.

The "Compile with" tasks are for students, who already compiled BRL-CAD (in the general compilation task) and want to try another compiler/operating system now.

view this post on Zulip Thusal Ranawaka (Jan 04 2020 at 14:43):

Hey @Daniel Rossberg the task that have you mentioned above seems to be an beginner task so is there any solution for that problem?

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

Also @Daniel Rossberg I claimed a task called RUN A CODE QUALITY ASSESSMENT ON OGV USING CODECLIMATE I do not understand what to do in codeclimate. Can you tell what to do step wise?

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 14:52):

Hey Daniel Rossberg the task that have you mentioned above seems to be an beginner task so is there any solution for that problem?

Well, the solution would be to do the Visual Studio task instead. But, can you see the description of the general compilation task with the provided links?

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 14:53):

Also Daniel Rossberg I claimed a task called RUN A CODE QUALITY ASSESSMENT ON OGV USING CODECLIMATE I do not understand what to do in codeclimate. Can you tell what to do step wise?

Never heard of it before. Let me see ....

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 14:56):

... did you followed the steps from the task description? They look right straight forward.

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 14:58):

On Code Climate you should probably do the quality thing (automated code review).

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

as an "Open Source" user.

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

Hey @Daniel Rossberg do you know how to add BRL-CAD/OGV-meteor repo to Code Climate I can't figure it out.

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 15:27):

Did you cloned OGV to your own github account?

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

No. I don't know how to do it.

view this post on Zulip Daniel Rossberg (Jan 04 2020 at 15:29):

Did you googled for this? Google should provide you a link to the corresponding github help side.

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

I will try.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:33):

@Sean , I checked out the trunk from SVN and trying to compile it using CMake, I entered where the source code is and where to build, but I think I missed something. Because it shows this error, image.png

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:34):

(deleted)

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:35):

(deleted)

view this post on Zulip Sean (Mar 02 2021 at 06:36):

I don't see an error there yet.

view this post on Zulip Sean (Mar 02 2021 at 06:37):

Are you following the compilation/installation wiki page instructions?

view this post on Zulip Sean (Mar 02 2021 at 06:37):

be sure to do that...

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:37):

Yes

view this post on Zulip Sean (Mar 02 2021 at 06:37):

So what's the next step?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:38):

This one know, https://brlcad.org/wiki/Building_from_SVN

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:38):

Sean said:

So what's the next step?

Configure the build system with CMake

view this post on Zulip Sean (Mar 02 2021 at 06:39):

Okay, so have you pressed the "Configure" button?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:39):

Yes

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:40):

It shows this, image.png

view this post on Zulip Sean (Mar 02 2021 at 06:43):

Scroll that bottom window up, what does it say in there?

view this post on Zulip Sean (Mar 02 2021 at 06:44):

You'll want to make sure you specified paths to the right folders for source and build

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:44):

image.png

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:46):

Sean said:

You'll want to make sure you specified paths to the right folders for source and build

I did it correct, path is direct to "brlcad" folder

view this post on Zulip Sean (Mar 02 2021 at 06:50):

So did you read the error message?

view this post on Zulip Sean (Mar 02 2021 at 06:50):

Seems pretty obvious what's wrong...

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:51):

Yes, it says error at CMakeLIsts.txt

view this post on Zulip Sean (Mar 02 2021 at 06:52):

Dude seriously... keep reading.

view this post on Zulip Sean (Mar 02 2021 at 06:53):

There's literally just 4 lines and it says what the problem is in pretty plain terms on one of them.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:55):

So, you mean read the CMakeOutput file?

view this post on Zulip Sean (Mar 02 2021 at 06:55):

....no

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:56):

This is the whole message,
CMake Error at CMakeLists.txt:85 (project):
Generator

Visual Studio 16 2019

could not find any instance of Visual Studio.

Configuring incomplete, errors occurred!
See also "C:/Users/Thusal Ranawaka/OneDrive/Documents/brlcad/build/CMakeFiles/CMakeOutput.log".

view this post on Zulip Sean (Mar 02 2021 at 06:57):

So you've apparently not seen this before and that's okay, but you should be able to read what you just pasted and realize what is wrong. What's it saying there?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:58):

It says, it can't find any instance of Visual Studio.

view this post on Zulip Sean (Mar 02 2021 at 06:58):

Bingo!

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 06:58):

So, I have to specify it?

view this post on Zulip Sean (Mar 02 2021 at 06:58):

Do you know what that means?

view this post on Zulip Sean (Mar 02 2021 at 06:59):

The term "instance" may be confusing you.

view this post on Zulip Sean (Mar 02 2021 at 06:59):

replace "instance" with "installation" and see if that makes more sense to you.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:00):

So, it can't find the installation file?

view this post on Zulip Sean (Mar 02 2021 at 07:03):

who said anything about a file

view this post on Zulip Sean (Mar 02 2021 at 07:03):

if you replace "instance" with "installation", what is it saying?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:04):

Could not find the Visual Studio in my laptop?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:06):

I don't have Visual Studio to my new laptop yet, so, is that the problem?

view this post on Zulip Sean (Mar 02 2021 at 07:09):

it can't find an installation of visual studio

view this post on Zulip Sean (Mar 02 2021 at 07:09):

do you know what visual studio is?

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:10):

Sean said:

do you know what visual studio is?

:face_palm:

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:10):

I built LiberCAD V3 using Visual Studio

view this post on Zulip Sean (Mar 02 2021 at 07:11):

Okay... so then even more confusing to me how you got stuck on this error :)

view this post on Zulip Sean (Mar 02 2021 at 07:11):

cmake is saying it can't find visual studio. that's the compiler.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:11):

I never thought that you need VS when you are compiling using CMake.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:11):

Sean said:

cmake is saying it can't find visual studio. that's the compiler.

Oh.

view this post on Zulip Sean (Mar 02 2021 at 07:12):

if it can't find the compiler, it can't prepare the build system

view this post on Zulip Sean (Mar 02 2021 at 07:12):

if it can't prepare the build system, there's nothing useful it can do yet..

view this post on Zulip Sean (Mar 02 2021 at 07:13):

so it throws an error telling you it couldn't find a compiler for the environment it's trying to generate

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:13):

Problem was I thought CMake was a compiler or act as a compiler, since I got less experience in it.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:13):

Okay

view this post on Zulip Sean (Mar 02 2021 at 07:13):

cmake configures the build environment, it's not a compiler

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:13):

I'll download VS tomorrow, because my wifi is limited.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:13):

Sean said:

cmake configures the build environment, it's not a compiler

Okay

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:14):

Sean said:

cmake configures the build environment, it's not a compiler

Same thing can be done in VS too know?

view this post on Zulip Sean (Mar 02 2021 at 07:14):

it writes out the files that tell a compiler how and what to compiler, and it supports lots of different compilation environments

view this post on Zulip Sean (Mar 02 2021 at 07:14):

Thusal Ranawaka said:

Same thing can be done in VS too know?

No.

view this post on Zulip Sean (Mar 02 2021 at 07:15):

because there are no visual studio project files yet

view this post on Zulip Sean (Mar 02 2021 at 07:15):

cmake generates the visual studio project files for brl-cad

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:16):

Yeah

view this post on Zulip Sean (Mar 02 2021 at 07:16):

cmake could also generate them for a variety of other environments like Mingw or Ninja or Makefiles or ... but it defaults to Visual Studio project files on Windows since they're the most common on Windows.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:16):

LibreCAD can, I think because I set both environments and compiled in same Visual Studio

view this post on Zulip Sean (Mar 02 2021 at 07:16):

notice how the error message even says a specific version

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:17):

Yes. Studio 2019

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:18):

I installed Visual Studio yesterday, and I updated my windows, but Windows crashed during the restarting process. So, I had to reset my pc

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:18):

It deleted VS

view this post on Zulip Sean (Mar 02 2021 at 07:18):

Thusal Ranawaka said:

LibreCAD can, I think because I set both environments and compiled in same Visual Studio

LibreCAD uses QMake which is a completely different build system generator

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:19):

Oh, I see.

view this post on Zulip Sean (Mar 02 2021 at 07:19):

You likely compiled in Qt-Creator

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:20):

I compiled it in VS, but I had to install Qt and set some paths to it.

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:21):

That LibreCAD building almost took me 3 weeks work with Florian

view this post on Zulip Sean (Mar 02 2021 at 07:22):

You're gonna need to work on understanding the toolchains you're working with... what each of them actually does, not just follow a recipe on a web page :)

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:22):

Yes

view this post on Zulip Sean (Mar 02 2021 at 07:23):

LibreCAD probably includes MSVC project files pre-generated from QMake, to make it easier for casual contributors

view this post on Zulip Thusal Ranawaka (Mar 02 2021 at 07:24):

oh

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 02:43):

Hey @Sean , slight problem, I generate the code after installing VS and compiled it the "BRLCAD.sln" solution file, and when I search the bin file I can't find mged application.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 02:44):

But others are there like, g-obj, asc-g, etc...

view this post on Zulip Sean (Mar 03 2021 at 03:55):

You'll want to make sure you compile the ALL_BUILD target

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 05:06):

Okay

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 05:06):

So, then the tutorial needs to be upgraded.

view this post on Zulip Sean (Mar 03 2021 at 05:41):

It's a wiki if you'd like to clarify or update it.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 05:56):

@Sean Hey, it still didn't work.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 05:57):

The mged isn't still there in the bin folder.

view this post on Zulip Sean (Mar 03 2021 at 15:01):

Not a useful statement if you're looking for help.. :)

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:02):

I compiled ALL_BUILD solution as you said, but still there isn't the mged app.

view this post on Zulip Sean (Mar 03 2021 at 15:02):

There's so many things you could be doing or not doing that can affect compilation... Did it complete building the solution successfully or did it report error(s)?

view this post on Zulip Sean (Mar 03 2021 at 15:03):

If it reported errors, you got to look at what they were.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:03):

image.png This one know?

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:03):

Sean said:

There's so many things you could be doing or not doing that can affect compilation... Did it complete building the solution successfully or did it report error(s)?

It completed with no errors, only some warnings.

view this post on Zulip Sean (Mar 03 2021 at 15:03):

So you're going to open the BRLCAD.sln solution .. and in there select the ALL_BUILD target.

view this post on Zulip Sean (Mar 03 2021 at 15:04):

not just select the ALL_BUILD.vcxproj file...

view this post on Zulip Sean (Mar 03 2021 at 15:05):

It shouldn't make a difference, but that's not something I can say I've tested

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:07):

Here's what I did, I just double clicked the ALL_BUILD.vcxproj file and it opened in VS with all the files. Then I clicked "Build Solution", it took about 45 minutes to complete and it completed without errors.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:14):

It's there in the BRLCAD.sln, I don't know why it isn't building, image.png

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:28):

@Sean , Build succeeded. image.png

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:28):

Let's see whether mged is in the bin folder.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:30):

Nope. It isn't still there.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:31):

(deleted)

view this post on Zulip Sean (Mar 03 2021 at 15:32):

Thusal Ranawaka said:

Sean , Build succeeded. image.png

What makes you think the build succeeded in that picture?

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:34):

Sean said:

Thusal Ranawaka said:

Sean , Build succeeded. image.png

What makes you think the build succeeded in that picture?

Yeah, concerning your question. It says 595 were succedded, another 300 failed.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:35):

I think I found the error, image.png

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:37):

It says it can't find the brlcad_config.h file.

view this post on Zulip starseeker (Mar 03 2021 at 15:40):

That file should be generated at configure time by CMake. Next question is why isn't it there?

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:43):

starseeker said:

That file should be generated at configure time by CMake. Next question is why isn't it there?

Yeah

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:43):

The CMake file generation went well.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 15:44):

I'll try the whole process from the beginning.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:06):

Okay, I just wanted you to know. Here is the brlcad_config file. So, I configured and generated the code from CMake from the beginning. image.png

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:14):

Now I am building the BRLCAD solution with ALL_BUILD targeted.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:38):

@Sean Okay, here's the update. So, after the second build, 983 succeeded, 67 failed.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:38):

image.png

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:39):

Noooo, it's not still there.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:40):

image.png This time error.

view this post on Zulip Thusal Ranawaka (Mar 03 2021 at 16:40):

image.png

view this post on Zulip Sean (Mar 04 2021 at 07:13):

@Thusal Ranawaka brlcad_config.h is not the same thing as brlcad-config

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:14):

Yeah, it needs to be compiled to become a header file, know?

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:19):

Okay, the brlcad_config.h file error never occurred after I started the whole process from the beginning. But there's a new error.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:19):

Associated with mged

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:21):

Last time build, 595 succeeded, 370 failed.
But after starting the whole process from the beginning, 983 succeeded, 97 failed.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:21):

Still mged app failed.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:22):

Thusal Ranawaka said:

image.png

It says it can't a library file.

view this post on Zulip Sean (Mar 04 2021 at 07:28):

That doesn't look like the first error.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:28):

Yeah,

view this post on Zulip Sean (Mar 04 2021 at 07:28):

You have to find the very first error reported, it's the only one that matters.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:29):

I'll try the whole process from beginning.

view this post on Zulip Sean (Mar 04 2021 at 07:31):

okay

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:56):

This time, I took a copy of the CMake Generation output to see if the error occurred there.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 07:57):

Now time for compiling ALL_BUILD target.

view this post on Zulip Sean (Mar 04 2021 at 07:58):

can you post the cmake output here?

view this post on Zulip Sean (Mar 04 2021 at 07:59):

more than likely, there's some recent change that broke the build on windows that needs to be fixed, but still good to make sure you're not overlooking a cmake failure.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:00):

Okay

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:01):

@Sean CMakeOutput.txt

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:28):

@Sean Okay, here are the results. It's the same error before. It can't find that .lib file.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:28):

983 succeeded, 97 failed. Build Failed.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:29):

image.png

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:29):

Severity Code Description Project File Line Suppression State Error LNK1104 cannot open file '..\..\Debug\lib\libtclcad.lib' mged C:\Users\Thusal Ranawaka\OneDrive\Documents\brlcad\build\src\mged\LINK 1

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:31):

And during the build I saw, that stating "mged.vcxproj" file failed.

view this post on Zulip Thusal Ranawaka (Mar 04 2021 at 08:40):

Here's the VS Output file, VSOutput.txt

view this post on Zulip Sean (Mar 04 2021 at 16:08):

@Thusal Ranawaka So again... you have to find the FIRST error, and what you screenshot was not the first error so it's useless.

view this post on Zulip Sean (Mar 04 2021 at 16:09):

Fortunately, you posted the VS Output file, which does make it easy to find the first error. To my eyes, this looks like the first error:

104>RC : fatal error RC1107: invalid usage; use RC /? for Help
104>
104>Done building project "tk.vcxproj" -- FAILED.

And that's a non-trivial failure that @starseeker may need to help with. Looks like libtk failed to compile, so everything that uses it also fails.

view this post on Zulip starseeker (Mar 04 2021 at 16:51):

rc is the resource compiler... I'm building on windows myself, I'll see if I can reproduce.

view this post on Zulip starseeker (Mar 04 2021 at 16:54):

@Thusal Ranawaka which version of CMake are you using?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:22):

starseeker said:

Thusal Ranawaka which version of CMake are you using?

@starseeker CMake 3.20.0-rc2

view this post on Zulip starseeker (Mar 05 2021 at 01:41):

Hmm. I just built successfully - can you try with 3.19.6?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:43):

Okay

view this post on Zulip starseeker (Mar 05 2021 at 01:44):

Hopefully that will give us an idea if CMake 3.20 is changing anything about their RC support...

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:44):

Do you think it was an error that occurred when I was exporting the repo from Tortoise SVN?

view this post on Zulip starseeker (Mar 05 2021 at 01:45):

You mean checking it out with TortoiseSVN? I doubt it - try running an update on your checkout folder to see if there is anything missing.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:46):

starseeker said:

You mean checking it out with TortoiseSVN? I doubt it - try running an update on your checkout folder to see if there is anything missing.

Yes

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:55):

I did an update.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 01:55):

image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:01):

OK, you're probably good there then. That's why I suggested trying the stable CMake - it's possible that they've tweaked how RC compilation logic is generated in the newer CMake, and it might be causing issues.

Presumably it's the wish.rc file being added by src/other/tk/CMakeLists.txt that's causing the issue...

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:02):

Hmm

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:02):

I just finished Configuring and Generating.

view this post on Zulip starseeker (Mar 05 2021 at 02:03):

OK, try building the "wish" target

view this post on Zulip starseeker (Mar 05 2021 at 02:03):

We don't need to try the full build until we see if that works.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:05):

Okay.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:06):

This one know, image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:07):

Yes

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:07):

No, build failed.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:07):

It's the tk file again.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:07):

image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:09):

Ah. OK, first thing - open the BRLCAD project or the ALL_BUILD project, not the wish project.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:09):

Okay. Did it

view this post on Zulip starseeker (Mar 05 2021 at 02:10):

Once you've opened that, look for that wish target in the main project. Right now it's trying to build deps it doesn't know about.

view this post on Zulip starseeker (Mar 05 2021 at 02:10):

Try building it from there - it should build the tk library first, then try to build wish.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:10):

starseeker said:

Once you've opened that, look for that wish target in the main project. Right now it's trying to build deps it doesn't know about.

That's how I did it.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:11):

I searched wish in BRLCAD.sln project.

view this post on Zulip starseeker (Mar 05 2021 at 02:11):

Hmm. OK. Did you run "Build" or the build only this project option?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:12):

I ran Build, because there was no "Build only"option

view this post on Zulip starseeker (Mar 05 2021 at 02:13):

If you right-click on the "wish" target, there's usual a series of options in the menu that pops up.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:13):

That's how I did it.

view this post on Zulip starseeker (Mar 05 2021 at 02:14):

OK. Can you try building the "tk" target?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:14):

Ah yes, there's build only option. In the Project only tab.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:14):

starseeker said:

OK. Can you try building the "tk" target?

Only that target?

view this post on Zulip starseeker (Mar 05 2021 at 02:15):

No, just try "Build" on the tk library. Let's see if that works.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:16):

It failed too. image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:17):

Ah, right - I forgot, tk also has a .rc file.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:18):

Yeah

view this post on Zulip starseeker (Mar 05 2021 at 02:18):

OK, under Source Files for the tk target, see if you can find tk.rc listed

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:22):

I am looking at the tk folder right now, but can't find a tk.rc file listed.

view this post on Zulip starseeker (Mar 05 2021 at 02:23):

So one other thing you can try quickly is to comment out line 673 in src/other/tk/CMakeLists.txt by prefixing it with "#" and re-running CMake, then trying the tk build again.

view this post on Zulip starseeker (Mar 05 2021 at 02:23):

I don't know why that would cause an invalid syntax issue, but it's a quick test to rule it out

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:25):

starseeker said:

So one other thing you can try quickly is to comment out line 673 in src/other/tk/CMakeLists.txt by prefixing it with "#" and re-running CMake, then trying the tk build again.

Hey there isn't a CMakeLists.txt file in that tk folder.

view this post on Zulip starseeker (Mar 05 2021 at 02:25):

In your TortoiseSVN checkout

view this post on Zulip starseeker (Mar 05 2021 at 02:25):

Not in the build directory.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:26):

starseeker said:

In your TortoiseSVN checkout

You mean the Checkout folder, know?

view this post on Zulip starseeker (Mar 05 2021 at 02:26):

yes

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:27):

Yeah, I checked there.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:27):

image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:28):

That's the build directory - you're in brlcad/build

view this post on Zulip starseeker (Mar 05 2021 at 02:28):

You want brlcad/src/other/tk

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:31):

This correct know? image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:31):

Yes.

view this post on Zulip starseeker (Mar 05 2021 at 02:32):

Let's see if that changes anything.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:32):

starseeker said:

You want brlcad/src/other/tk

Sorry. I totally forgot that I was on the build folder.

view this post on Zulip starseeker (Mar 05 2021 at 02:32):

So re-run CMake to regenerate the Visual Studio build files.

view this post on Zulip starseeker (Mar 05 2021 at 02:32):

The re-open Visual Studio and try the tk target again.

view this post on Zulip starseeker (Mar 05 2021 at 02:33):

If we still get the same error message, the next question is whether RC is correctly installed on your system.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:33):

ok

view this post on Zulip starseeker (Mar 05 2021 at 02:38):

According to this, you need the SDK: https://discourse.cmake.org/t/cmake-rc-support-ninja/2883/7 (You're not using Ninja to build, but the RC tool is what we're trying to run on those .rc files)

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:39):

Success!

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:39):

image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:40):

Does wish build?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:41):

Yes.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:41):

image.png

view this post on Zulip starseeker (Mar 05 2021 at 02:41):

Strange. OK, try the all-up build.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:43):

Building now

view this post on Zulip starseeker (Mar 05 2021 at 02:43):

That line was added in r76799 so the wish.exe.manifest file could be found. I wonder why it's suddenly a problem now...

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:45):

Hmm

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:46):

So, is this .rc file essential for this mged build? or can mged run without that?

view this post on Zulip starseeker (Mar 05 2021 at 02:46):

If I remember correctly, it's essential...

view this post on Zulip starseeker (Mar 05 2021 at 02:47):

Can you launch a Visual Studio Command Prompt?

view this post on Zulip starseeker (Mar 05 2021 at 02:48):

Also, if you look in the build directory for the CMakeCache.txt directory, what variables does it have set there that match the CMAKE_RC_* pattern?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 02:57):

I'll have a look after the build

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:07):

starseeker said:

Also, if you look in the build directory for the CMakeCache.txt directory, what variables does it have set there that match the CMAKE_RC_* pattern?

@starseeker
//RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc

//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=-DWIN32

//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG

//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=

//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=

//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=

view this post on Zulip starseeker (Mar 05 2021 at 03:07):

Did the build fully succeed?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:07):

starseeker said:

Did the build fully succeed?

Yes

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:07):

0 errors

view this post on Zulip starseeker (Mar 05 2021 at 03:08):

/me blinks. OK, can you run mged, archer and bwish?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:09):

Yep

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:09):

image.png

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:10):

It works

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:15):

So, build successful or do we have to look at .rc file?

view this post on Zulip starseeker (Mar 05 2021 at 03:16):

OK. I'll comment out that line in the repo once I can verify a similar result here (at least until I can understand why we might need to put it back in, and how to do so without inducing breakage)

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:16):

Okay

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:16):

Let me know after you have done that.

view this post on Zulip starseeker (Mar 05 2021 at 03:17):

I really don't understand why that line should break your build - if you can do it quickly, can you re-add it, re-configure CMake again and show me the CMAKE_RC_* variables from the CMakeCache.txt file?

view this post on Zulip starseeker (Mar 05 2021 at 03:17):

I'd like to see what the difference is

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:18):

Thusal Ranawaka said:

starseeker said:

Also, if you look in the build directory for the CMakeCache.txt directory, what variables does it have set there that match the CMAKE_RC_* pattern?

starseeker
//RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc

//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=-DWIN32

//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG

//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=

//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=

//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=

These are know?

view this post on Zulip starseeker (Mar 05 2021 at 03:18):

I'm curious what they were before commenting out the CMAKE_RC_FLAGS variable in src/other/tk/CMakeLists.txt

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:20):

if (MSVC)
set(TK_SRCS ${TK_SRCS} win/rc/tk.rc)
#set(CMAKE_RC_FLAGS /i${CMAKE_CURRENT_BINARY_DIR})
endif (MSVC)

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:20):

This one?

view this post on Zulip starseeker (Mar 05 2021 at 03:24):

yes

view this post on Zulip starseeker (Mar 05 2021 at 03:25):

removing that fixed your build, so I'm wondering what about it was causing breakage...

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:25):

Hmm

view this post on Zulip starseeker (Mar 05 2021 at 03:26):

As far as I know, /i and the include directory is valid syntax for RC...

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:27):

One single variable caused a whole build to fail.

view this post on Zulip starseeker (Mar 05 2021 at 03:28):

That's not so unusual in and of itself, but I'm wondering why that particular insertion caused a failure. Your error message seemed to indicate the /i flag was invalid, which is why I'm curious about what ended up in the CMakeCache.txt file with it enabled.

view this post on Zulip starseeker (Mar 05 2021 at 03:37):

I went ahead and committed the commenting out of that variable - if it breaks my build locally we'll have to figure out something else, but in the meantime you should be good to go.

view this post on Zulip starseeker (Mar 05 2021 at 03:37):

(I'm done for the night - back tomorrow.)

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:37):

Okay. Good Night!

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 03:38):

starseeker said:

I went ahead and committed the commenting out of that variable - if it breaks my build locally we'll have to figure out something else, but in the meantime you should be good to go.

What areas won't work in MGED?

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 13:59):

Did you check?

view this post on Zulip starseeker (Mar 05 2021 at 14:03):

It seems to have built. I'll test functionally later, but for now it looks like commenting out that line can stand.

view this post on Zulip Thusal Ranawaka (Mar 05 2021 at 14:04):

Okay

view this post on Zulip Thusal Ranawaka (Mar 07 2021 at 13:55):

@starseeker Hey, were you able to regenerate the rc error in your local machine?

view this post on Zulip Thusal Ranawaka (Mar 07 2021 at 13:57):

And why does this build folder took so much space in a Windows laptop? (just asking). The build folder is almost 8GB in my laptop. And the repo is almost 400MB.

view this post on Zulip starseeker (Mar 07 2021 at 14:40):

I haven't tried to reproduce it - as long as everyone is building right now, that's enough. We're about to switch how we build 3rd party dependencies, and when we do we'll be using Tcl/Tk's own build system instead of our CMake. If we still see an issue after that, we should be able to enlist the community's help in addition to our own efforts.

view this post on Zulip Thusal Ranawaka (Mar 07 2021 at 14:45):

Okay. Thanks!

view this post on Zulip Sean (Mar 08 2021 at 14:38):

@Thusal Ranawaka BRL-CAD is big and when yo compile, the compiler has all sorts of intermediate files it has to generate. They take up much more space than the source code itself. Also, I don't think that repo size you said is correct -- BRL-CAD sources alone are more than 400MB. Should be in the 1-2GB range.

view this post on Zulip Thusal Ranawaka (Mar 08 2021 at 14:38):

Sean said:

Thusal Ranawaka BRL-CAD is big and when yo compile, the compiler has all sorts of intermediate files it has to generate. They take up much more space than the source code itself. Also, I don't think that repo size you said is correct -- BRL-CAD sources alone are more than 400MB. Should be in the 1-2GB range.

Yeah, I only checked out the trunk

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:19):

Hey, So, if the migration to GitHub is done. I can try out my build from GitHub now, know?

view this post on Zulip starseeker (Mar 10 2021 at 13:19):

What do you mean?

view this post on Zulip starseeker (Mar 10 2021 at 13:19):

You can clone and build it, certainly...

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:19):

Yeah

view this post on Zulip starseeker (Mar 10 2021 at 13:20):

Or fork, clone, build if you like

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:20):

So, when cloning I have to clone the whole repo know?

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:20):

Because there isn't a trunk there.

view this post on Zulip starseeker (Mar 10 2021 at 13:21):

The new "trunk" is called "main"

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:21):

I see.

view this post on Zulip starseeker (Mar 10 2021 at 13:23):

However, git works a bit differently than subversion - a clone is going to download the full repo history. Fortunately, Git ended up being much more compact than SVN when it comes to storing that history - your Git clone shouldn't end up being too much larger than your SVN checkout.

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:23):

Now the Wiki needs an update too, about compiling BRL-CAD from Source using GitHub for newbies.

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:24):

starseeker said:

However, git works a bit differently than subversion - a clone is going to download the full repo history. Fortunately, Git ended up being much more compact than SVN when it comes to storing that history - your Git clone shouldn't end up being too much larger than your SVN checkout.

Yeah. For that, I won't delete the SVN Checkout, I will rename it and store it in my laptop safely, to use when necessary.

view this post on Zulip starseeker (Mar 10 2021 at 13:25):

It does. There's quite a lot of our documentation that will need to be updated. I'm currently making sure the build itself is working properly (our distcheck logic uses the version control system to get some information, and while I prototyped out a version using Git I now need to make sure it works in the final setup.)

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 13:25):

Okay. Good Luck!

view this post on Zulip starseeker (Mar 10 2021 at 14:42):

Blast. @Sean - something I never noticed until now. The tkhtml compilation apparently depends on having populated rcsid strings, so my stripping of those from the history during the conversion broke the tkhtml build.

view this post on Zulip starseeker (Mar 10 2021 at 14:43):

I fixed it in main, but that means older builds will trip on the tkhtml build.

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 16:30):

So, you found the error?

view this post on Zulip starseeker (Mar 10 2021 at 16:31):

Yes. Latest main will build now. Working on a solution for older commits.

view this post on Zulip Thusal Ranawaka (Mar 10 2021 at 16:31):

Okay. Great

view this post on Zulip Sean (Mar 10 2021 at 20:39):

Thusal Ranawaka said:

Now the Wiki needs an update too, about compiling BRL-CAD from Source using GitHub for newbies.

do you want to make the updates to fix the instructions?

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 01:26):

Sean said:

Thusal Ranawaka said:

Now the Wiki needs an update too, about compiling BRL-CAD from Source using GitHub for newbies.

do you want to make the updates to fix the instructions?

Yeah, may be.

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 01:29):

So, when building from GitHub repo, I have to clone this part know? https://github.com/BRL-CAD/brlcad/tree/main

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 01:33):

I think it's just https://github.com/BRL-CAD/brlcad know?

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 01:36):

Thusal Ranawaka@ThusalHP MINGW64 ~ $ git clone https://github.com/BRL-CAD/brlcad/tree/main Cloning into 'main'... fatal: repository 'https://github.com/BRL-CAD/brlcad/tree/main/' not found

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 01:55):

Hey, I just cloned main into my laptop, and wanted to know the build instructions are the same know as in the wiki?

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 02:36):

Build succeeded, image.png

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 02:37):

This time, no tk errors.

view this post on Zulip Thusal Ranawaka (Mar 11 2021 at 02:39):

And the mged runs too.

view this post on Zulip Sean (Mar 12 2021 at 06:43):

Excellent.

view this post on Zulip starseeker (Mar 16 2021 at 16:52):

@Thusal Ranawaka I think I figured out the CMAKE_RC_FLAGS issue - that flag is used/needed when the Ninja generator is used. Once the repo is live again, I'll commit the proper fix.

view this post on Zulip Thusal Ranawaka (Mar 17 2021 at 00:41):

Okay. Great

view this post on Zulip Erik (May 26 2021 at 17:14):

@starseeker : this might thrill/annoy ya :D https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256166

view this post on Zulip Sean (Jun 04 2021 at 14:16):

@Erik Oh, cool, that's interesting news to me. It might explain some other issues observed. Question is where those nulls came from.

view this post on Zulip Erik (Mar 15 2023 at 18:03):

I wonder if gold or mold (linkers) would noticeably speed up compile time :thinking:

view this post on Zulip Neeraj Sharma (Mar 16 2023 at 04:10):

hi , I have to install all GUI of brlcad separately?
or only build brlcad

view this post on Zulip Sean (Mar 16 2023 at 04:11):

@Neeraj Sharma What are you trying to do?

view this post on Zulip Neeraj Sharma (Mar 16 2023 at 04:11):

I just build brlcad

view this post on Zulip Sean (Mar 16 2023 at 04:12):

Okay, and what are you trying to do?

view this post on Zulip Sean (Mar 16 2023 at 04:13):

whether you need to install or build other things depends on what it is you're trying to accomplish

view this post on Zulip Jeramee (May 22 2023 at 00:12):

Did this build?
[5228/5262] Linking C executable bin\rtwizard.exe
[5234/5262] Linking CXX executable bin\brlman.exe
[5235/5262] Linking C executable bin\isst.exe
[5258/5262] Linking C executable bin\archer.exe
[5261/5262] Linking C executable bin\mged.exe
BRL-CAD Release 7.34.3, Build 20230521
Elapsed compilation time: 39 minutes 47 seconds
Elapsed time since configuration: 39 minutes 47 seconds
To build, launch Visual Studio and open C:/Users/jeram/source/repos/brlcad/out/build/x64-Debug/BRLCAD.sln
Build the ALL_BUILD target. To create an NSIS installer, build the PACKAGE target
Build All succeeded. (It looks like it built but not sure how many exe files. I removed my BRL-CAD install to make room)

But I get these 2 errors?

'C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '-C' 'C:/Users/jeram/source/repos/brlcad/out/build/x64-Debug' '-t' 'restat' 'build.ninja'
failed with:
ninja: error: failed recompaction: Permission denied C:\Users\jeram\Source\Repos\brlcad\ ninja
Error CMake Error:
Running
'C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '-C' 'C:/Users/jeram/source/repos/brlcad/out/build/x64-Debug' '-t' 'recompact'
failed with:
ninja: error: failed recompaction: Permission denied C:\Users\jeram\Source\Repos\brlcad\ ninja

The documentations said to change these flags to this:
BRLCAD_ENABLE_STRICT=OFF
BRLCAD_ENABLE_COMPILER_WARNINGS=OFF
BRLCAD_BUNDLED_LIBS=ON

I only found one of this flag:
BRLCAD_BUNDLED_LIBS=ON

But no easy way to change the flag and the other two were not present at all. Do I have to run an external CMake? I have the latest CMake installed and all my libraries are up to date. I'd rather use the one inside of Visual Studio because I kind of hate the external CMake. Didn't really expect this to build on the first try. I was surprised that it auto configured everything automatically. So I figured give it a try.

view this post on Zulip Daniel Rossberg (May 22 2023 at 14:58):

The error looks like https://developercommunity.visualstudio.com/t/cannot-build-cmake-solution-after-update-to-169/1367002. If updating Visual Studio does not help, using the stand-alone CMake should be a work-around.

view this post on Zulip Daniel Rossberg (May 22 2023 at 15:01):

Regardind the CMake flags: The only one I'm setting is CMAKE_INSTALL_PREFIX. I set it to a directory, where I can write in without becoming an administrator. In your case for example C:/Users/jeram/bin/brlcad?

view this post on Zulip Daniel Rossberg (May 22 2023 at 15:05):

The BRLCAD_ENABLE_STRICT is an "Advanced" flag. You have to hit the "Advanced" switch in the CMake GUI to see it.

The BRLCAD_ENABLE_COMPILER_WARNINGS flag had to be set (created) by you.

view this post on Zulip Sean (May 22 2023 at 20:15):

Few more changes to push, and still sans ogl, but Mac build is restored...
image.png


Last updated: Oct 09 2024 at 00:44 UTC