Stream: Google Code-in

Topic: Compilation of BRL-CAD source


view this post on Zulip Mitesh (Nov 30 2017 at 15:35):

Sir I am having an issue.
I referred the compilation guides: -

http://brlcad.org/wiki/Compiling

http://svn.code.sf.net/p/brlcad/code/brlcad/trunk/INSTALL ----->(Quick Install)

I was successful till cmake part.
but my "make" command didn't work in both the cases.
I am getting the following error :-
"make: *** No targets specified and no makefile found. Stop."
i am running the commands in "VS015 x86 Native Tools Command Prompt".

can you please help me out.
thank you

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 15:52):

@Mitesh Are you working on Windows with Visual Studio?

view this post on Zulip Mitesh (Nov 30 2017 at 15:52):

Yes sir.

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 15:59):

I don't know somebody with name Sir here but OK: There should be a solution file BRLCAD.sln somewhere. Open it with Visual Studio (double click on it) and build the INSTALL target (or project).

view this post on Zulip Mitesh (Nov 30 2017 at 16:12):

I don't know somebody with name Sir here but OK: There should be a solution file BRLCAD.sln somewhere. Open it with Visual Studio (double click on it) and build the INSTALL target (or project).

Extremely sorry for addressing everyone as sir.
Thanks alot for replying. I will try the solution.

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 16:17):

Extremely sorry for addressing everyone as sir.
Thanks alot for replying. I will try the solution.

No need to be sorry. I only wanted to mention that the usage of "sir" is extremely unusual in the open source community. If you want to address somebody special use the @ as in @Mitesh . Otherwise, simply ask your question and I'm sure that somebody will try to help you.

view this post on Zulip Mitesh (Nov 30 2017 at 16:18):

sure @Daniel Rossberg

view this post on Zulip Mitesh (Nov 30 2017 at 17:05):

I have build the INSTALL project but got 10 errors:-

Capture.PNG

can you please help me out.
thank you

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 17:24):

These are CMake errors. What do you get when you run CMake alone?

view this post on Zulip Mitesh (Nov 30 2017 at 17:29):

when i ran the command in the process earlier it was something like this:-
task4.png

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 17:38):

This doesn't look so bad.
Did you choose different directories for the source code and the build? The directory where you run cmake is the build directory where you can find the BRLCAD.sln afterwards. The first argument to cmake is the source code root directory.

view this post on Zulip Mitesh (Nov 30 2017 at 17:42):

Yes @Daniel Rossberg i chose different directories for the source code and the build

view this post on Zulip Mitesh (Nov 30 2017 at 17:45):

And I only downloaded zip file from:- https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/7.26.4/
not the other files. is that ok?

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 17:58):

Using the files from the subversion repository would be better but the zip file should work too. For me it looks like the Visual Studio can't find CMake. When you started cmake for the first time you choosed your development environment, right?

view this post on Zulip Mitesh (Nov 30 2017 at 18:04):

@Daniel Rossberg i have gui of cmake....and when it was opened first time as far as i remember there was no option to choose anything, or maybe i don't remember

view this post on Zulip Daniel Rossberg (Nov 30 2017 at 18:15):

I'm using the CMake GUI too. When you press "Configure" there for the first time a dialog should pop up which lets you choose between the supported compilers.

view this post on Zulip Mitesh (Dec 01 2017 at 02:44):

I'm using the CMake GUI too. When you press "Configure" there for the first time a dialog should pop up which lets you choose between the supported compilers.

I remember that...
but I ran cmake command in vs15command line, and did not build it through gui.

view this post on Zulip Mitesh (Dec 01 2017 at 06:02):

There were errors while building INSTALL
but when I opened "Debug folder>> Bin>> I was able to run Mged.exe". Is it done?

view this post on Zulip Sean (Dec 01 2017 at 06:05):

if mged runs, then you're probably done -- screenshot?

view this post on Zulip Mitesh (Dec 01 2017 at 06:11):

Capture.PNG

view this post on Zulip Mitesh (Dec 01 2017 at 06:12):

But I would like to know how to solve the cmake errors.

view this post on Zulip Sean (Dec 01 2017 at 06:23):

that's definitely looking like a build of 7.26.4

view this post on Zulip Mitesh (Dec 01 2017 at 06:23):

Thank You @Christopher Sean Morrison

view this post on Zulip Sean (Dec 01 2017 at 06:23):

what cmake errors are you referring to?

view this post on Zulip Sean (Dec 01 2017 at 06:23):

not seeing them in the earlier discussion

view this post on Zulip Mitesh (Dec 01 2017 at 06:32):

Capture-1.png

view this post on Zulip Sean (Dec 01 2017 at 06:35):

those look like msvc errors, not cmake

view this post on Zulip Mitesh (Dec 01 2017 at 06:37):

okk... but how to solve them?

I tried one way out i.e by changing the cmake and build directories to another drive.
but got the same result

view this post on Zulip Sean (Dec 01 2017 at 06:37):

now did you run cmake?

view this post on Zulip Sean (Dec 01 2017 at 06:37):

s/now/how/

view this post on Zulip Sean (Dec 01 2017 at 06:38):

via gui or command-line?

view this post on Zulip Mitesh (Dec 01 2017 at 06:38):

command line

view this post on Zulip Sean (Dec 01 2017 at 06:39):

it shouldn't matter but try running it from the gui

view this post on Zulip Sean (Dec 01 2017 at 06:40):

you need to specify where the sources are and where your build directory is

view this post on Zulip Sean (Dec 01 2017 at 06:40):

(the first time)

view this post on Zulip Mitesh (Dec 01 2017 at 06:41):

okk... Thank You @Christopher Sean Morrison
I will try it.

view this post on Zulip Sean (Dec 01 2017 at 06:43):

no problem, that's why we're here

view this post on Zulip Mitesh (Dec 01 2017 at 06:43):

Should I add anything in "option toolset to use"?

view this post on Zulip Sean (Dec 01 2017 at 06:44):

er, picture please

view this post on Zulip Sean (Dec 01 2017 at 06:44):

probably not, but I don't recall that option

view this post on Zulip Mitesh (Dec 01 2017 at 06:45):

Capture1.PNG

view this post on Zulip Sean (Dec 01 2017 at 06:45):

aha, no don't add anything

view this post on Zulip Sean (Dec 01 2017 at 06:45):

what version of studio do you have?

view this post on Zulip Sean (Dec 01 2017 at 06:46):

community edition?

view this post on Zulip Mitesh (Dec 01 2017 at 06:46):

2015 community

view this post on Zulip Sean (Dec 01 2017 at 06:50):

okay, then that looks fine -- did you run it?

view this post on Zulip Mitesh (Dec 01 2017 at 06:50):

yes....its running

view this post on Zulip Sean (Dec 01 2017 at 06:50):

yay!

view this post on Zulip Mitesh (Dec 01 2017 at 06:53):

Capture2.PNG

view this post on Zulip Mitesh (Dec 01 2017 at 06:55):

I got this:-Capture4.PNG

view this post on Zulip Mitesh (Dec 01 2017 at 06:56):

should I press generate?

view this post on Zulip Sean (Dec 01 2017 at 06:56):

yep, that looks all good so far

view this post on Zulip Sean (Dec 01 2017 at 06:58):

for what it's worth, your compile more than likely completed 99% of the way

view this post on Zulip Sean (Dec 01 2017 at 06:58):

mged is one of the last steps, so that's a good sign

view this post on Zulip Mitesh (Dec 01 2017 at 07:00):

ok ...I have opened the project...and then after I will try to build the install project.
will update once its done.
thank you.

view this post on Zulip Sean (Dec 01 2017 at 07:00):

OH, did you run the install project the first time too?

view this post on Zulip Mitesh (Dec 01 2017 at 07:01):

yup

view this post on Zulip Sean (Dec 01 2017 at 07:01):

that's the problem -- run the ALLBUILD target

view this post on Zulip Mitesh (Dec 01 2017 at 07:01):

only ALLBUILD Target?

view this post on Zulip Sean (Dec 01 2017 at 07:01):

yeah, that will be fine

view this post on Zulip Mitesh (Dec 01 2017 at 07:02):

okk

view this post on Zulip Mitesh (Dec 01 2017 at 07:03):

bingo....build succeeded

view this post on Zulip Mitesh (Dec 01 2017 at 07:04):

Capture5.PNG

view this post on Zulip Sean (Dec 01 2017 at 07:04):

I don't know the specifics on Windows, but I think the INSTALL target attempts to create a Windows installer, and you would need to have other tools installed for that

view this post on Zulip Mitesh (Dec 01 2017 at 07:05):

ok

view this post on Zulip Mitesh (Dec 01 2017 at 07:06):

whats the next step?

view this post on Zulip Sean (Dec 01 2017 at 07:06):

have you done any of the tutorials yet?

view this post on Zulip Sean (Dec 01 2017 at 07:07):

I suggest you try that next, just to get a little familiar with the tools, then pick a coding task and just give it a try :)

view this post on Zulip Mitesh (Dec 01 2017 at 07:08):

ok sure @Christopher Sean Morrison
thank you so much.
can you please send me the link of tutorials?

view this post on Zulip Sean (Dec 01 2017 at 07:09):

I don't have it handy, but you can find it on the site if you just search tutorial

view this post on Zulip Sean (Dec 01 2017 at 07:10):

there's two, part one is the first 8 lessons, part 2 is the second 8 lessons

view this post on Zulip Sean (Dec 01 2017 at 07:10):

you can do all of them or just the first one if your intention is to write code

view this post on Zulip Sean (Dec 01 2017 at 07:10):

what kinds of tasks sound interesting to you?

view this post on Zulip Mitesh (Dec 01 2017 at 07:10):

ok these tutoials
I already completed the first one

view this post on Zulip Mitesh (Dec 01 2017 at 07:11):

I am on verge of completion of second

view this post on Zulip Sean (Dec 01 2017 at 07:11):

when you say first one, do you mean lessons 1-8 or lesson 1 ?

view this post on Zulip Mitesh (Dec 01 2017 at 07:12):

lesson 1-8

view this post on Zulip Sean (Dec 01 2017 at 07:12):

ah, cool -- so got all your screenshots?

view this post on Zulip Mitesh (Dec 01 2017 at 07:13):

yup sir....this task was already approved yesterday.

view this post on Zulip Mitesh (Dec 01 2017 at 07:13):

i think it was approved you @Christopher Sean Morrison

view this post on Zulip Sean (Dec 01 2017 at 07:15):

yup sir....this task was already approved yesterday.

I appreciate your respect, but please know that it's VERY unusual to refer to people as sir when working in open source

view this post on Zulip Sean (Dec 01 2017 at 07:15):

very much not necessary, distracting even

view this post on Zulip Mitesh (Dec 01 2017 at 07:17):

sorry i forgot about that

view this post on Zulip Sean (Dec 01 2017 at 07:17):

no need to be sorry @Mitesh

view this post on Zulip Mitesh (Dec 01 2017 at 07:18):

@Christopher Sean Morrison i have one doubt.
once the "all_build" file is built, i could only find these files in the debug>>bin folder:-
Capture6.PNG
where are the other files?

view this post on Zulip Sean (Dec 01 2017 at 07:22):

hm, did you check up in the release dir?

view this post on Zulip Sean (Dec 01 2017 at 07:22):

I didn't see if you compiled debug or release

view this post on Zulip Mitesh (Dec 01 2017 at 07:24):

Its the same in release dir. No other files are there.

view this post on Zulip Sean (Dec 01 2017 at 07:25):

huh, was bin the same folder where you found mged earlier?

view this post on Zulip Mitesh (Dec 01 2017 at 07:25):

yes

view this post on Zulip Sean (Dec 01 2017 at 07:26):

that is odd

view this post on Zulip Sean (Dec 01 2017 at 07:26):

and it's the dir you fed to cmake

view this post on Zulip Sean (Dec 01 2017 at 07:26):

what was the msvc output?

view this post on Zulip Mitesh (Dec 01 2017 at 07:26):

there was no output

view this post on Zulip Sean (Dec 01 2017 at 07:27):

there's always output :)

view this post on Zulip Sean (Dec 01 2017 at 07:27):

it just might be hidden

view this post on Zulip Mitesh (Dec 01 2017 at 07:28):

i just go this result....Capture5.PNG

view this post on Zulip Sean (Dec 01 2017 at 07:29):

was msvc still open and running when you were running cmake?

view this post on Zulip Sean (Dec 01 2017 at 07:29):

quit msvc and try re-opening the solution

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 07:35):

Hi @Mitesh , try the following: Start the CMake GUI, look for the CMAKE_INSTALL_PREFIX there, and set it to a directory where you have write access (e.g. H:/brlcad.install). Then build the INSTALL target. The issue with the ALLBUILD target is that it doesn't copy the files in the order of a BRL-CAD installation. This is what INSTALL does. The reason for the errors you experienced could have been that you hadn't write access to the install directory which is something in C:/Program Files/ by default.

view this post on Zulip Sean (Dec 01 2017 at 07:36):

huh, learned something new ... and I've built with the windows solution many many times

view this post on Zulip Sean (Dec 01 2017 at 07:36):

I don't recall ever having a problem with ALL_BUILD -- that's supposed to be the same target logic as make's default

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 07:40):

Some things work in the build directory (Mitesh could successfully start mged) others may not. On Windows INSTALL simply copies everything into the right order, similar to Linux.

view this post on Zulip Mitesh (Dec 01 2017 at 08:07):

@Daniel Rossberg I tried your method....but built failed:-
Capture7.PNG

view this post on Zulip Sean (Dec 01 2017 at 08:16):

mahdi, okay -- we're exhausting options. I suggest you install Subversion and download the latest BRL-CAD source code from a repository checkout

view this post on Zulip Mitesh (Dec 01 2017 at 08:17):

quit msvc and try re-opening the solution

I also tried this but got the same result i.e built succeeded but only few files are present in bin folder

view this post on Zulip Sean (Dec 01 2017 at 08:17):

and see if you still run into a problem -- but basically starting over, and trying in a different location with the latest source code, and we can try some things

view this post on Zulip Sean (Dec 01 2017 at 08:18):

that said, I'm out for a bit -- have fun!

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 08:21):

That is really strange. The install script complains about a missing regex.dll but mged can be started.

view this post on Zulip Sean (Dec 01 2017 at 08:22):

yeah, it's not adding up

view this post on Zulip Mitesh (Dec 01 2017 at 10:55):

i tries with svn....got this errorCapture1.PNG

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 11:27):

I got the same error with today's svn checkout. The reason is that since yesterday the configuration requires a distinct C++ standard conformity but Visual Studio doesn't know about C++ standard conformity levels at all. I'll see what can be done there.

view this post on Zulip Mitesh (Dec 01 2017 at 11:55):

ok @Daniel Rossberg

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 13:35):

@Mitesh You can now update from svn and give it another try.

view this post on Zulip Naseef (Dec 01 2017 at 15:58):

He's probably Indian, They have tendency to use 'Sir' all the time.

view this post on Zulip Sean (Dec 01 2017 at 16:02):

He's probably Indian, They have tendency to use 'Sir' all the time.

we have many Indian developers that have contributed to the project over the years, so we know, but also using that designation is not limited to them -- it's a cultural norm for respect. part of our job introducing students like yourself to open source is to present what the open source cultural norms are as well.

view this post on Zulip Sean (Dec 01 2017 at 16:03):

with open source, it's incredibly rare to use titles and designations -- any title is usually earned through contributions, not through position or education, and they're rarely indicated during conversation

view this post on Zulip Naseef (Dec 01 2017 at 16:04):

You mean 'everyone is treated same in open source'?

view this post on Zulip Sean (Dec 01 2017 at 16:05):

no, not necessarily

view this post on Zulip Sean (Dec 01 2017 at 16:05):

our community, for example, operates as a meritocracy

view this post on Zulip Sean (Dec 01 2017 at 16:05):

the more you contribute and the more you do, the more you get a say in what gets done, what others can/cannot do

view this post on Zulip Daniel Rossberg (Dec 01 2017 at 16:24):

@Mitesh With the latest svn revision I could successfully build the INSTALL target.

view this post on Zulip Mitesh (Dec 01 2017 at 17:32):

ok @Daniel Rossberg i will try it after some time.

view this post on Zulip Mitesh (Dec 01 2017 at 17:35):

Ya...i am from India:)

view this post on Zulip Mitesh (Dec 02 2017 at 04:43):

@Daniel Rossberg Still facing the same problem when i built install in visual studio

view this post on Zulip Sean (Dec 02 2017 at 15:30):

which problem is that?

view this post on Zulip Sean (Dec 02 2017 at 15:31):

sounded like the issue was building a mixture of mingw and msvc when the whole stack should really be msvc only

view this post on Zulip Sean (Dec 02 2017 at 15:31):

if you remain stuck, we can get you set up in a virtual machine where everything is preconfigured and more seamless

view this post on Zulip Mitesh (Dec 02 2017 at 16:55):

@Sean its fine..got a good news.... I just tried again and it worked

view this post on Zulip Mitesh (Dec 02 2017 at 17:05):

Capture.PNG

view this post on Zulip Naseef (Dec 02 2017 at 17:13):

Naseef : He's probably Indian, They have tendency to use 'Sir' all the time.

Well, I've met some Indians in IRC, Chats, and Forums and helped them to solve some small problems, Most of them called me 'Sir' at least once within the conversations.

view this post on Zulip Naseef (Dec 02 2017 at 17:17):

I know it's irrelevant, But I had a little anxiety about saying it, So I wanted to clear it up

view this post on Zulip Naseef (Dec 02 2017 at 17:17):

:wink:

view this post on Zulip Daniel Rossberg (Dec 02 2017 at 17:18):

@Mitesh Congratulations! :tada:

view this post on Zulip Naseef (Dec 02 2017 at 17:20):

Should I install BRL CAD on Windows or Linux?

view this post on Zulip Daniel Rossberg (Dec 02 2017 at 17:22):

On whichever system you feel yourself more comfortable. Both should work.

view this post on Zulip Naseef (Dec 02 2017 at 22:00):

I'd go with Linux then.

view this post on Zulip Naseef (Dec 03 2017 at 15:44):

How much storage space I'll need? I have around 600 mb left on Ubuntu partition.

view this post on Zulip Daniel Rossberg (Dec 03 2017 at 16:30):

My build directory has 2.3 GiB. I performed only a single standard build there. Therefore, I would say you are in trouble :(

view this post on Zulip Sean (Dec 03 2017 at 16:55):

@Naseef a complete build+compile usually takes about 2GB-6GB depending on your OS/filesystem

view this post on Zulip Naseef (Dec 03 2017 at 17:14):

Oh, Well. I have around 32 GB unallocated space left on my disk, unfortunately I already have 4 primary partitions.

view this post on Zulip Naseef (Dec 03 2017 at 17:18):

Windows partition has around 30 GB left, But Windows is always in Unsafe State.

view this post on Zulip Naseef (Dec 03 2017 at 17:20):

Files partition have 4.5 GB left, I think I can build it there.

view this post on Zulip Daniel Rossberg (Dec 03 2017 at 17:32):

The souce code, the build, and the installation can be on different partitions.

view this post on Zulip Naseef (Dec 03 2017 at 17:33):

So I can keep the source and build in Files partition and install it to Ubuntu partition?

view this post on Zulip Sean (Dec 03 2017 at 17:36):

sure, and for most tasks, you don't even need to install (you can run from the build tree)

view this post on Zulip Daniel Rossberg (Dec 03 2017 at 17:37):

Yep, set CMAKE_INSTALL_PREFIX to a directory in your Ubuntu partition, that's it.

view this post on Zulip Naseef (Dec 03 2017 at 17:37):

That's good.

view this post on Zulip Naseef (Dec 03 2017 at 17:38):

Is there a Git repo for BRL-CAD?

view this post on Zulip Naseef (Dec 03 2017 at 17:38):

or Just SVN?

view this post on Zulip Sean (Dec 03 2017 at 17:38):

the website and ogv tasks are in git, the main code is svn

view this post on Zulip Naseef (Dec 03 2017 at 17:56):

Does BRL-CAD SVN have both MGED and Archer?

view this post on Zulip Sean (Dec 03 2017 at 17:57):

yes

view this post on Zulip Sean (Dec 03 2017 at 17:57):

and 398 other tools ;)

view this post on Zulip Naseef (Dec 03 2017 at 17:57):

:cold_sweat:

view this post on Zulip Sean (Dec 03 2017 at 17:59):

most are very small tools that do one specific thing

view this post on Zulip Naseef (Dec 03 2017 at 18:00):

:relieved:

view this post on Zulip Sean (Dec 03 2017 at 18:02):

there are only 4 larger gui tools: mged, archer, adrt, and rtwizard

view this post on Zulip Naseef (Dec 03 2017 at 20:22):

Build takes pretty long as I expected.

view this post on Zulip Naseef (Dec 03 2017 at 20:25):

Is this okay?

/mnt/Files/Home/Dev/brlcad/src/librt/primitives/dsp/dsp.c: In function ‘get_obj_data’:
/mnt/Files/Home/Dev/brlcad/src/librt/primitives/dsp/dsp.c:4087:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
  bu_log("ERROR: Binary object '%s' has invalid data (expected type %d, f
         ^

I've seen similar warnings a few times now, Hope there is no problems.

view this post on Zulip Naseef (Dec 03 2017 at 20:26):

Well, It's a conversion, Won't harm right?

view this post on Zulip Sean (Dec 03 2017 at 20:31):

it's fine -- we fix those types of things just to keep things clean, but they aren't problems. we turn on a LOT of things the compiler can warn about, way more than most.

view this post on Zulip Sean (Dec 03 2017 at 20:31):

helps us keep code quality higher than would naturally happen across a 1M line codebase

view this post on Zulip Sean (Dec 03 2017 at 20:32):

if you want, you could work on fixing all the warnings you encounter -- can make a gci task out of it if there's enough work

view this post on Zulip Sean (Dec 03 2017 at 20:33):

let me know how many warnings or post a full log and I can take a look if it's worth it

view this post on Zulip Naseef (Dec 03 2017 at 20:33):

I think there is more thank enough warnings :joy:

view this post on Zulip Sean (Dec 03 2017 at 20:34):

unlikely they amount to more than a few minutes of work

view this post on Zulip Naseef (Dec 03 2017 at 20:34):

I can see more about 50-100 warnings

view this post on Zulip Sean (Dec 03 2017 at 20:35):

it might seem like a lot if you've not worked with large codebases before ;)

view this post on Zulip Sean (Dec 03 2017 at 20:35):

that's probably about an hour's worth of work

view this post on Zulip Naseef (Dec 03 2017 at 20:35):

Of course!

view this post on Zulip Sean (Dec 03 2017 at 20:36):

that's borderline, but if you want to learn and give them a try, let me know and we can create the task for you

view this post on Zulip Naseef (Dec 03 2017 at 20:36):

I've compiled large codebases with visual studio.

view this post on Zulip Sean (Dec 03 2017 at 20:36):

how big? :)

view this post on Zulip Naseef (Dec 03 2017 at 20:36):

Torque3D

view this post on Zulip Sean (Dec 03 2017 at 20:36):

and studio turns nearly everything off by default

view this post on Zulip Naseef (Dec 03 2017 at 20:37):

I've seen a lot of warnings there too!

view this post on Zulip Sean (Dec 03 2017 at 20:37):

i'm not familiar with how big torque is these days

view this post on Zulip Sean (Dec 03 2017 at 20:37):

last used it nearly 10years ago

view this post on Zulip Naseef (Dec 03 2017 at 20:37):

At least, You've used it.

view this post on Zulip Naseef (Dec 03 2017 at 20:38):

Torque3D is what made me learn C++ :D

view this post on Zulip Sean (Dec 03 2017 at 20:40):

if you know c++, then that dsp.c warning should've made sense, no?

view this post on Zulip Naseef (Dec 03 2017 at 20:41):

What?

view this post on Zulip Naseef (Dec 03 2017 at 20:41):

I haven't really coded much C

view this post on Zulip Sean (Dec 03 2017 at 20:41):

it's good to not ignore warnings from compilers, and is something we do as a matter of standard practice (we tell GCI students to turn strict compilation off because most haven't learned how to read or address warnings)

view this post on Zulip Sean (Dec 03 2017 at 20:41):

that warning was not specific to C

view this post on Zulip Sean (Dec 03 2017 at 20:41):

same in C++

view this post on Zulip Naseef (Dec 03 2017 at 20:42):

I can understand what that warning means

view this post on Zulip Naseef (Dec 03 2017 at 20:43):

long long unsigned int a;
unsigned int a;
b = a;

view this post on Zulip Naseef (Dec 03 2017 at 20:43):

something similar is happening there I assume.

view this post on Zulip Sean (Dec 03 2017 at 20:44):

not exactly, the warning is partially about types, but more about format specifiers

view this post on Zulip Sean (Dec 03 2017 at 20:45):

it's more like you have some function:(unsigned long long a);

view this post on Zulip Sean (Dec 03 2017 at 20:46):

function(unsigned long long a); unsigned int b; function(b);

view this post on Zulip Sean (Dec 03 2017 at 20:47):

except instead of function(), it's a format specifier (%llu) being passed a size_t (unsigned long)

view this post on Zulip Sean (Dec 03 2017 at 20:48):

upconversion from a smaller size to a larger size isn't generally a problem, so the warning is lame -- but valid - do you know what the fix should be?

view this post on Zulip Naseef (Dec 03 2017 at 20:50):

the variable passed to the function should be long long unsigned int

view this post on Zulip Naseef (Dec 03 2017 at 20:51):

Or like this :

view this post on Zulip Naseef (Dec 03 2017 at 20:53):

function((unsigned long long)b);    // casting b as unsigned long long

view this post on Zulip Sean (Dec 03 2017 at 20:58):

casting is one solution, think of any others?

view this post on Zulip Sean (Dec 03 2017 at 20:58):

casting might be appropriate if the %llu was significant for some reason

view this post on Zulip Naseef (Dec 03 2017 at 21:00):

Oh well, I kinda understand I think

view this post on Zulip Sean (Dec 03 2017 at 21:01):

in this case, the warning said the type is uint32_t ... which isn't completely accurate

view this post on Zulip Sean (Dec 03 2017 at 21:01):

it's a size_t

view this post on Zulip Naseef (Dec 03 2017 at 21:01):

printf("Here is my long long unsigned number : %llu",longnum);

view this post on Zulip Naseef (Dec 03 2017 at 21:02):

this how %llu is used right?

view this post on Zulip Sean (Dec 03 2017 at 21:02):

yes

view this post on Zulip Sean (Dec 03 2017 at 21:02):

now make longnum a size_t

view this post on Zulip Sean (Dec 03 2017 at 21:02):

if you compile with -Wformat, you should get the warning

view this post on Zulip Sean (Dec 03 2017 at 21:03):

gotta run, but play with that and see if you can find a better fix than casting ;)

view this post on Zulip Naseef (Dec 03 2017 at 21:03):

I'm on it!

view this post on Zulip Sean (Dec 03 2017 at 21:07):

clue, run "svn annotate" on that file and run "svn diff -cREV" on the last change to that line

view this post on Zulip Naseef (Dec 03 2017 at 21:18):

Build successful!

view this post on Zulip Naseef (Dec 03 2017 at 21:18):

pasted image

view this post on Zulip Naseef (Dec 03 2017 at 21:27):

svn: E155007: '/mnt/Files/Home/Dev/src/librt/primitives/dsp/dsp.c' is not a working copy

view this post on Zulip Naseef (Dec 03 2017 at 21:27):

Looks like there's something wrong.

view this post on Zulip Naseef (Dec 03 2017 at 22:08):

Finally, Completed the task and submitted for review!
Time for a real coding task now, The PDF file had a funny warning, It's really funny.
Hope I won't need an Electro-Shock therapy to complete this task!

view this post on Zulip Naseef (Dec 03 2017 at 22:40):

Hey! What do we do with brlcad/.build/doc/?

view this post on Zulip Sean (Dec 04 2017 at 03:16):

svn: E155007: '/mnt/Files/Home/Dev/src/librt/primitives/dsp/dsp.c' is not a working copy

That's because you apparently downloaded the 7.26.4 sources instead of pulling a checkout from SVN. You'll need to redo the build with 7.27.0 sources checked out from SVN at some point.

view this post on Zulip Naseef (Dec 04 2017 at 10:45):

Oops.. Yea. ASAP

view this post on Zulip Naseef (Dec 04 2017 at 17:36):

Do I have to re download everything? Or just the ones modified?

view this post on Zulip Sean (Dec 04 2017 at 18:17):

you'll have to re-download everything (using svn checkout, not a file download)

view this post on Zulip Naseef (Dec 04 2017 at 18:52):

well, I mean...

view this post on Zulip Naseef (Dec 04 2017 at 18:52):

I have brlcad in dev folder.
I checkout BRL-CAD from svn to brlcad from dev.
Most of the BRL-CAD source files are already in the brlcad folder.

view this post on Zulip Naseef (Dec 04 2017 at 18:55):

Now, Will it download all files and overwrite everything or download only the modified files and new files?

view this post on Zulip Naseef (Dec 04 2017 at 19:07):

CMake Warning (dev) at CMakeLists.txt:22 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.4 is not supported by CMake >= 3.0.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could not locate 'brlcad-config' - no BRL-CAD version available
-- Found BRL-CAD at /mnt/Files/Home/Dev/brlcad/
--  Configuration for 'ge'...  Omitted.
--  Configuration for 'coreInterface'...  Omitted.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BRLCAD_OPENNURBS_HEADERS_DIR
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
TCL_INCLUDE_PATH
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/coreInterface
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge
   used as include directory in directory /mnt/Files/Home/Dev/rt^3/tests/libge

-- Configuring incomplete, errors occurred!
See also "/mnt/Files/Home/Dev/rt^3/build/CMakeFiles/CMakeOutput.log".

view this post on Zulip Naseef (Dec 04 2017 at 19:08):

WhereOPENNURBS_HEADERS_DIR and TCL_INCLUDE_PATH are located.

view this post on Zulip Naseef (Dec 04 2017 at 19:12):

YOU SHOULD INSTALL BRL-CAD BEFORE COMPILING AND INSTALLING RT^3
How?

view this post on Zulip Daniel Rossberg (Dec 04 2017 at 19:55):

make install in the brlcad build directory

view this post on Zulip Daniel Rossberg (Dec 04 2017 at 19:57):

in rt^3 configuration set BRLCAD_BASE_DIR to the installation path

view this post on Zulip Naseef (Dec 04 2017 at 23:46):

Could not locate 'brlcad-config' - no BRL-CAD version available

view this post on Zulip Naseef (Dec 04 2017 at 23:50):

/usr/bin/ld: cannot find -lcoreinterface
collect2: error: ld returned 1 exit status
tests/coreInterface/CMakeFiles/printTitle.dir/build.make:94: recipe for target 'tests-bin/printTitle' failed
make[2]: *** [tests-bin/printTitle] Error 1
CMakeFiles/Makefile2:165: recipe for target 'tests/coreInterface/CMakeFiles/printTitle.dir/all' failed
make[1]: *** [tests/coreInterface/CMakeFiles/printTitle.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

view this post on Zulip Daniel Rossberg (Dec 05 2017 at 08:10):

@Naseef I've just tested the coreinterface build from scatch, i.e. starting from an empty build directory. And surprisingly enough, it worked without any additional interaction, setting CMake variables, etc.. All I did before was to install BRL-CAD and adding the BRL-CAD installation bin directory to my path environment variable.

view this post on Zulip Naseef (Dec 05 2017 at 19:03):

PATH=$PATH: [BRLCAD_BUILD_BIN]
cd rt^3/build
cmake ...

view this post on Zulip Naseef (Dec 05 2017 at 19:04):

Output is too long...

view this post on Zulip Naseef (Dec 05 2017 at 19:05):

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BRLCAD_HEADERS_DIR
BRLCAD_OPENNURBS_HEADERS_DIR
TCL_INCLUDE_PATH

view this post on Zulip Naseef (Dec 05 2017 at 19:19):

Where is the TCL_INCLUDE_PATH?

view this post on Zulip Naseef (Dec 06 2017 at 16:16):

@Naseef I've just tested the coreinterface build from scatch, i.e. starting from an empty build directory. And surprisingly enough, it worked without any additional interaction, setting CMake variables, etc.. All I did before was to install BRL-CAD and adding the BRL-CAD installation bin directory to my path environment variable.

I am on linux, so, I have some problems.

view this post on Zulip Naseef (Dec 06 2017 at 16:17):

I have only 1 day remaining to complete this task, Any help would be really helpful.

view this post on Zulip Daniel Rossberg (Dec 06 2017 at 16:57):

I did my test on Linux too. (I need to test it on Windows some day.)
Did you installed BRL-CAD with make install?

view this post on Zulip Naseef (Dec 06 2017 at 17:23):

Yea

view this post on Zulip Naseef (Dec 06 2017 at 17:23):

Should I install again?

view this post on Zulip Naseef (Dec 06 2017 at 17:23):

(deleted)

view this post on Zulip Naseef (Dec 06 2017 at 17:26):

ran make install

view this post on Zulip Naseef (Dec 06 2017 at 17:32):

[100%] Built target buildtimedelta
Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:36 (file):
  file cannot create directory: /usr/brlcad/rel-7.26.4/include.  Maybe need
  administrative privileges.


Makefile:126: recipe for target 'install' failed
make: *** [install] Error 1

should I install as root?

view this post on Zulip Naseef (Dec 06 2017 at 17:43):

ran make install as with sudo, did I just do something wrong? it worked tho.

view this post on Zulip Naseef (Dec 06 2017 at 18:28):

I still can't build rt^3.

view this post on Zulip Naseef (Dec 06 2017 at 18:29):

same errors as before.

view this post on Zulip Daniel Rossberg (Dec 06 2017 at 19:57):

@Naseef You can set the installation directory in CMake with CMAKE_INSTALL_PATH. I'm usually using a folder in my home directory.
Now, that you did the first thing of what I wrote in bold letters, have you done the second to?

view this post on Zulip Naseef (Dec 06 2017 at 20:40):

Ooh yeah! It compiles now!

view this post on Zulip Naseef (Dec 06 2017 at 20:40):

Thanks a LOT!

view this post on Zulip Naseef (Dec 07 2017 at 18:26):

How do I compile rt_shootray example? Does it have to be compiled alongside BRL-CAD?

view this post on Zulip Sean (Dec 08 2017 at 08:28):

How do I compile rt_shootray example? Does it have to be compiled alongside BRL-CAD?

there's a comment in the example that may help for manually compiling it on linux, and it's build as part of compiling brl-cad via cmake

view this post on Zulip Jeff Sieu (Dec 08 2017 at 08:29):

Is there a guide as to how to export the raytrace into PPM or other image formats?

view this post on Zulip Sean (Dec 08 2017 at 08:54):

jeff, ppm is a crazy simple format that can be written out using printf/cout

view this post on Zulip Sean (Dec 08 2017 at 08:56):

@Jeff Sieu check out this discussion thread: https://cboard.cprogramming.com/c-programming/160019-need-help-printing-circle-ppm-image.html

view this post on Zulip Sean (Dec 08 2017 at 08:57):

basically, you print a simple text header (P6 on one line, width height 255 on another) and then your bytes in rgbrgbrgb... form

view this post on Zulip Jeff Sieu (Dec 08 2017 at 09:03):

Okay, I'll have a look at it. I presume that the output image has to be produced from the coordinates given by the points of the raytrace?

view this post on Zulip Sean (Dec 08 2017 at 09:04):

which task are you working?

view this post on Zulip Jeff Sieu (Dec 08 2017 at 09:04):

Trying Appleseed #2

view this post on Zulip Sean (Dec 08 2017 at 09:06):

ah, yes -- the image should reflect rays that hit or miss

view this post on Zulip Sean (Dec 08 2017 at 09:08):

rtexample shows how to set up a hit/miss callback, the task is to make sure you understand the basics of how that works and to get a grid of rays set up

view this post on Zulip Jeff Sieu (Dec 08 2017 at 09:11):

Oh I see, so just to clarify -- a grid of rays refers to multiple individual rays right?

view this post on Zulip Sean (Dec 08 2017 at 09:18):

yes

view this post on Zulip Sean (Dec 08 2017 at 09:22):

lots of examples throughout the code like this one: src/libanalyze/inside.c

view this post on Zulip Sean (Dec 08 2017 at 09:23):

look for rt_shootray or rt_pattern or rt_gen_ for starters

view this post on Zulip Sean (Dec 08 2017 at 09:24):

(for more examples)

view this post on Zulip Jeff Sieu (Dec 08 2017 at 09:30):

Oh cool, I'll check them out thanks

view this post on Zulip Mahdi (Dec 26 2017 at 11:00):

Has anyone here actually compiled the sources using the MSVC compiler?

view this post on Zulip Mahdi (Dec 26 2017 at 11:37):

I was wondering how long build+compilation would take

view this post on Zulip Mahdi (Dec 26 2017 at 15:16):

I've followed the installation instructions and can't seem to compile (successfully) more than 400 or so projects -- among which include mged and archer. I've heard that other people have had similar issues so is there a resolution that hasn't been included in the installation txt file?

view this post on Zulip Jeff Sieu (Dec 26 2017 at 15:36):

Yup this was precisely my problem

view this post on Zulip Jeff Sieu (Dec 26 2017 at 15:36):

Are you doing the compilation task

view this post on Zulip Jeff Sieu (Dec 26 2017 at 15:38):

I think this is an actual problem -- may be something to do with the compiler version im not too sure but @Daniel Rossberg said that it worked on visual c++ 2010 or smth

view this post on Zulip Daniel Rossberg (Dec 26 2017 at 16:27):

The build with Visual Studio 2017 seems to be broken. The declaration of lrint() doesn't get detected during the configuration which leads to an error for most of the source code files.

view this post on Zulip Lucas Prieels (Dec 26 2017 at 16:29):

For the compilation tasks, we just have to download the compiler and run cmake with -gcc or -clang or so right?

view this post on Zulip Daniel Rossberg (Dec 26 2017 at 16:29):

Beside this there is an issue with src/libbu/parallel.c. Renaming every WIN32 to _WIN32 there should solve it.

view this post on Zulip Daniel Rossberg (Dec 26 2017 at 16:30):

On MS Windows only Visual Studio is known to work.

view this post on Zulip Lucas Prieels (Dec 26 2017 at 16:32):

But I have macOS. Actually I've succeeded to run mged -gcc and mged -clang but I'm just wondering if it's enough

view this post on Zulip Lucas Prieels (Dec 26 2017 at 16:33):

with the flags of course

view this post on Zulip Daniel Rossberg (Dec 26 2017 at 16:35):

If you where able to run a self compiled mged it's enough. Submit a screen shot whit the output of the rt command and you are done.

view this post on Zulip Lucas Prieels (Dec 26 2017 at 16:36):

Alright thanks! I'll do it as soon as my current task is approved

view this post on Zulip Mahdi (Dec 27 2017 at 01:46):

Hm, I'll try investigating some more.

view this post on Zulip Mahdi (Dec 27 2017 at 01:50):

@Sean @Daniel Rossberg
Having to work with CMake really motivated me to start using it to build some of my own side projects. Recently I've been trying to use a command line parser for cmake and was wondering if you guys could guide me on the right path. If I wanted to just take simple commands / flags from the compiler and store them in a variable for cmake to use (like set folder directory -> x) how would I go about doing that? Would I need to define some sort of macro or function?

view this post on Zulip Sean (Dec 27 2017 at 06:06):

Please create a new subject for different topics, but the brief answer is that you don't need to do anything. You just set a variable and it'll be available to you (cmake -DMY_SPECIAL_VAR=/some/folder/here ...).

view this post on Zulip Mitesh (Dec 28 2017 at 15:35):

The build with Visual Studio 2017 seems to be broken. The declaration of lrint() doesn't get detected during the configuration which leads to an error for most of the source code files.

even it is not recognised in visual studio community 2015

view this post on Zulip Mitesh (Dec 28 2017 at 15:37):

In my case i first build the whole project and then build only "install"...which gave me mged

view this post on Zulip Mahdi (Dec 29 2017 at 02:41):

Any thoughts as to why it might have been broken with VS 2017?

view this post on Zulip Mahdi (Dec 29 2017 at 04:44):

Would defining LRINT in the common.h for MSVC version > 1900 (2015) help? Has anyone else tried this?

view this post on Zulip Mitesh (Dec 29 2017 at 04:46):

Sorry...I haven't tried that..

view this post on Zulip Sean (Dec 29 2017 at 16:36):

@Mahdi it's because msvc (finally) added support for lrint() very recently

view this post on Zulip Sean (Dec 29 2017 at 16:38):

we did recently add macros and improved the testing, so something may be wrong in the cmake logic -- someone has to look at the CMakeError.log to see why it's thinking that lrint() isn't available or doesn't work. the lrint test happens in the top-level CMakeLists.txt file around line 2698

view this post on Zulip Sean (Dec 29 2017 at 16:38):

if someone wants to debug and fix that, we can add a task for it ;)

view this post on Zulip Mahdi (Dec 29 2017 at 20:40):

I wouldn't mind trying to fix it. It's weird because CMake finds lrint and defines it in the header but still can't seem to compile it. My guess is that it's related to the ucrt libraries since those are the errors that keep popping up.

view this post on Zulip Mahdi (Dec 29 2017 at 20:42):

I found this on the official CMake documentation notes:
The InstallRequiredSystemLibraries module learned a new CMAKE_INSTALL_UCRT_LIBRARIES option to enable app-local deployment of the Windows Universal CRT libraries with Visual Studio 2015.
I don't think it's a coincidence that version above 2015 aren't compiling. There's definitely some issue with the UCRT and CMake.

view this post on Zulip Mahdi (Dec 29 2017 at 21:36):

That's probably more to do with the dlls though

view this post on Zulip Mahdi (Dec 29 2017 at 22:01):

10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20074): error C2059: syntax error: '}'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20075): error C2059: syntax error: '}'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20076): error C2143: syntax error: missing '{' before '*'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20084): error C2061: syntax error: identifier 'IMAGE_POLICY_ENTRY'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20085): error C2059: syntax error: '}'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h(20086): error C2143: syntax error: missing '{' before '*'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\processthreadsapi.h(1126): error C2059: syntax error: 'constant'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\processthreadsapi.h(1128): error C2059: syntax error: '}'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\processthreadsapi.h(1250): error C2059: syntax error: 'constant'
10>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\processthreadsapi.h(1252): error C2059: syntax error: '}'

Anyone know what these errors could mean?

view this post on Zulip Naseef (Dec 31 2017 at 13:58):

Where do I find the cmake build log?

view this post on Zulip Mitesh (Dec 31 2017 at 14:08):

in gui?

view this post on Zulip Naseef (Dec 31 2017 at 14:09):

linux terminal

view this post on Zulip Mitesh (Dec 31 2017 at 14:12):

if in gui cmake build log are found in a space under the generate button..Capture3.PNG

view this post on Zulip Mitesh (Dec 31 2017 at 14:12):

sorry no idea for linux terminal...

view this post on Zulip Mitesh (Dec 31 2017 at 14:13):

i think it shhould be same as that of cmd in windows. Check the build folder..

view this post on Zulip Armin (LordOfBikes) (Dec 31 2017 at 14:53):

@Naseef have a look into CMakeFiles folder which is in your build folder, there you should find CMakeOutput.log or CMakeError.log

view this post on Zulip Naseef (Dec 31 2017 at 17:36):

Is it Ok if I built it without GUI? I reinstalled Ubuntu so it built without a GUI. Will rebuild with GUI soon

view this post on Zulip Armin (LordOfBikes) (Dec 31 2017 at 17:41):

Sure, building witout GUI is fine. I've commented on your task how to get the build log.

view this post on Zulip Daniel Rossberg (Dec 31 2017 at 17:45):

See https://brlcad.org/wiki/Compiling for the additional packages needed to build with GUI on Linux.

view this post on Zulip Siddharth (Dec 31 2017 at 18:00):

Hey @Naseef As far as Ik there will be a txt file named build log in the source folder

view this post on Zulip Naseef (Jan 01 2018 at 12:12):

Yeah, Found that. I'll rebuild it with GUI and send the logs. Thanks.

view this post on Zulip Naseef (Jan 02 2018 at 20:53):

Makefile:162: recipe for target 'all' failed
after a half hour build

view this post on Zulip Naseef (Jan 02 2018 at 20:53):

make again with VERBOSE=1

view this post on Zulip Naseef (Jan 02 2018 at 20:54):

Which version of Qt is required for BRL-CAD?

view this post on Zulip Naseef (Jan 02 2018 at 20:54):

well, I know it was optional.

view this post on Zulip Naseef (Jan 02 2018 at 21:09):

/home/naseef/Code/brlcad/src/libdm/dm-ogl.c /home/naseef/Code/brlcad/src/libdm/dm-ogl.c:44:10: fatal error: X11/extensions/XInput.h: No such file or directory #include <X11/extensions/XInput.h> I failed to install something?

view this post on Zulip Naseef (Jan 03 2018 at 18:45):

I have to rebuild everything again because I reinstalled Ubuntu.

view this post on Zulip Naseef (Jan 03 2018 at 18:46):

xinput is already the newest version (1.6.2-1build1).

view this post on Zulip Mahdi (Jan 03 2018 at 21:19):

Would it be reasonable to put fmax and lrint into a namespace? I really don't know how else we can resolve the ms build without renaming them. I tried to include cmath but it seems cmake is building the files using a c compiler so it can't work.

view this post on Zulip Mahdi (Jan 03 2018 at 21:38):

the cmath thing was a little silly I'll admit

view this post on Zulip Naseef (Jan 03 2018 at 21:41):

I think you don't have to change source files to get it compile

view this post on Zulip Naseef (Jan 03 2018 at 21:42):

Maybe change cmakelists?

view this post on Zulip Naseef (Jan 03 2018 at 21:42):

include the source dirs

view this post on Zulip Mahdi (Jan 03 2018 at 21:45):

Well, the issue originated because there are multiple definitions of lrint and without the definition of lrint the solution doesn't compile

view this post on Zulip Mahdi (Jan 03 2018 at 21:48):

If I make it only define lrint for msvc less than 2015 then it just bombards me with a bunch of syntax errors

view this post on Zulip Sean (Jan 04 2018 at 17:31):

@Naseef xinput "should" have been optional if you're using a source checkout. if you're not, you maybe needed to rerun cmake ... if you are using a checkout and ran cmake fresh, then I'd love to see your log files since something didn't test right.

view this post on Zulip Sean (Jan 04 2018 at 17:32):

Would it be reasonable to put fmax and lrint into a namespace? I really don't know how else we can resolve the ms build without renaming them. I tried to include cmath but it seems cmake is building the files using a c compiler so it can't work.

it depends ... there's already testing and wrapping going on for them so we must first make sure that those tests are passing/failing correctly and that the problem isn't something more simple like a cmake test that failed when it should have passed

view this post on Zulip Sean (Jan 04 2018 at 17:34):

Well, the issue originated because there are multiple definitions of lrint and without the definition of lrint the solution doesn't compile

this would be because of the other wrapping going on. you can't just define or not define them -- you have to know, for example, if it's already defined to something and what happened during testing

view this post on Zulip Sean (Jan 04 2018 at 17:34):

if it doesn't build for either of you, please post a log of the entire output from cmake on a fresh checkout

view this post on Zulip Mahdi (Jan 05 2018 at 00:11):

@Sean What could cause the CMake test to fail?

view this post on Zulip Daniel Rossberg (Jan 05 2018 at 00:25):

The problem is in the detection of the lrint() declaration (see the main CMakeLists.txt line 2698ff). Interestingly, lrint() seams to be the only function where the DECL_TEST_SRCS is used. And, somehow the test in line 148 of misc/CMake/BRLCAD_CheckFunctions.cmake fails.
If you want to rerun the test you have to remove the lines with LRINT from CMakeCache.txt. Then you'll see that the configuration finds the lrint() function but not its declaration. The test source in lrint_decl_test alone can be compiled with Visual Studio 2017. The next step would be to debug check_c_source_compiles() to find out why it fails.

However, I'm possibly on the way to find a simple work around.

view this post on Zulip Daniel Rossberg (Jan 05 2018 at 15:21):

Compiling BRL-CAD with Visual Studio doesn't work because of https://core.tcl.tk/tk/info/3d34589aa0ae079039e2e2a60a5ed67c0056836d

view this post on Zulip Daniel Rossberg (Jan 05 2018 at 16:27):

The work around for the lrint() issue is:

view this post on Zulip Sean (Jan 05 2018 at 17:47):

what if you install tcl/tk manually (from a binary distribution) before running cmake?

view this post on Zulip Mahdi (Jan 06 2018 at 00:07):

Is the declaration issue associated with the tcl/tk bug? Why would all the "have decl" fail?

view this post on Zulip Mahdi (Jan 06 2018 at 00:08):

One would suppose those two to be unrelated, no?

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 10:45):

what if you install tcl/tk manually (from a binary distribution) before running cmake?

@Sean It depends on if both sides have to use the same C-runtime or not. I'm afraid they have to use the same what means they need to use the same compiler.

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 10:47):

One would suppose those two to be unrelated, no?

@Mahdi Right, the lrint() declaration and the Tk issues are unrelated. I found a work around for the first one and run into the second then.

view this post on Zulip Sean (Jan 06 2018 at 15:25):

@Daniel Rossberg not sure I follow -- you mean there's some C-runtime incompatibility if we install a system tcl/tk (say compiled with msvc2012) and compile our C code with a newer C-runtime (say msvc2017)? I'm aware of issues with the C++ STL runtime across DLL boundaries, but never heard of a C-runtime incompatibility. And even then, it would have to be across a DLL boundary ... where is that happening?

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 15:38):

@Sean I you malloc() memory on the one side of a DLL boundary and free() it on the other side you have to make sure to use the same ledger. This can be done by using the same C-runtime DLL on both sides, e.g. malloc() and free() will always be calls to this mscrt~.dll. But, if they are using different versions of mscrt ...

view this post on Zulip Sean (Jan 06 2018 at 15:41):

I'm still incredibly surprised that A) there's an incompatible call somewhere in the C runtime (rarely changes, much more surprised the malloc/free would be one they made incompatible) and B) that we so that somewhere, e.g., getting memory from Tcl_Alloc without calling Tcl_Free

view this post on Zulip Sean (Jan 06 2018 at 15:41):

I'd think B is worth fixing if we do that anywhere regardless

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 15:48):

That's not an "incompatibility" but a consequence of the global static memory ledger in the C library. In principle it's the same on Linux, but there everybody is using the same libc and that's way it's fine.
Using something like Tcl_Alloc() and Tcl_Free() is the usual work-around.

view this post on Zulip Sean (Jan 06 2018 at 15:53):

I know that in theory it's possible (on Linux or on Windows), I'm just not aware of this being an issue ever for the C runtime in practice, at least not anywhere in the brl-cad code -- have you seen a failure or is this hypothetical? because I recall (years ago) having installed system tcl/tk on windows, compiled against it with what had to be a different msvc .. maybe with all the c11 changes stuff happened?

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 16:21):

It's an old issue, especially of MS Windows programming, not connected to C11. The cause is simple: There is a global structure which keeps record about the memory retrieved from the OS and the peaces of the given to the application logic. If you use one structure in malloc() and another one for free() the second one doesn't know about this part of memory and may panic. And, whenever somebody doesn't look at this a crash is likely. It isn't a hypothetical issue. That's why e.g. the Object class in the C++ core interface has a Destroy() method.

Curiously, I couldn't find a way to not use libc on Linux. Even llvm uses it. (But I hav't tried the Intel compiler there.) BTW, if you try to start on a new system compiled software on an old one, it'll complain about the libc version even if it's only a "Hello World!". (Can one set the libc compatibility as a compiler option?)

BRL-CAD in general is fully compiled with the same compiler, and on Windows the parts (DLLs, EXEs) are using a/the same C-runtime DLL.

In case of TCL/Tk it looks like if Tcl_Alloc() and Tcl_Free() are used the right way than it could work.

view this post on Zulip Sean (Jan 06 2018 at 16:36):

I meant hypothetical in the sense that you've observed it crash brl-cad code somewhere because of this issue -- I know the problem "can" happen. I'm just surprised that it's actually happening because that's usually bad code. You should always be alloc/free'ing on the same side; you should always open/close on the same side, etc. For there to be an incompatibility, it suggests somewhere that is being violated.

view this post on Zulip Sean (Jan 06 2018 at 16:38):

The libc compatibility on linux is related, but usually triggered by the linker's version checking. Even if there's not an issue, it will abort/complain about the version. You can get past it, but it's a little tricky. Had to do that for some HPC assets a while back compiled against old RHEL, running on newer.

view this post on Zulip Daniel Rossberg (Jan 06 2018 at 20:45):

Speaking about BRL-CAD, I hadn't observed such a memory management issue (or I can't remember).

I had a similar appointment of writing a small program for an old Red Hat. I ended up installing an old Fedora Linux in a VM.

view this post on Zulip Naseef (Jan 08 2018 at 06:39):

CMakeOutput.log Is there something wrong with my CMake output? It doesn't compile

view this post on Zulip Naseef (Jan 08 2018 at 07:55):

here is my build.log

view this post on Zulip Naseef (Jan 08 2018 at 13:33):

Can someone help me? Please

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:34):

Yes, i'll try

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:35):

even i have a doubt in Compilation of BRL-Cad source, after the cmake step many things show - failed , so is that ok ?

view this post on Zulip Mahdi (Jan 08 2018 at 13:39):

Yeah, you don't need to see 'success' on each line

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:40):

yea, not even 'found'

view this post on Zulip Mahdi (Jan 08 2018 at 13:43):

If you didn't do anything strange you should be fine

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:43):

So the build is ready , now to compile the documentation says 'make ' command while that is an unrecognizable to cmd

view this post on Zulip Mahdi (Jan 08 2018 at 13:44):

are you in the build directory?

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:44):

yea BRLCAD/brlcad-svn-trunk/.build/

view this post on Zulip Mahdi (Jan 08 2018 at 13:44):

Wait, you're using Windows

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:44):

Yea , :smiley_cat:

view this post on Zulip Mahdi (Jan 08 2018 at 13:44):

Which generator did you use cmake with

view this post on Zulip Mitesh (Jan 08 2018 at 13:44):

Instead of make we can use MS vS studio in Windows

view this post on Zulip Mahdi (Jan 08 2018 at 13:45):

If you used the 15 generator you're out of luck mate

view this post on Zulip Jeff Sieu (Jan 08 2018 at 13:45):

I think you'll have to open the .sln

view this post on Zulip Jeff Sieu (Jan 08 2018 at 13:45):

^ Oh yeah that too

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:46):

I opened the BRLCAD.sln

view this post on Zulip Mitesh (Jan 08 2018 at 13:47):

Run the BRLCAD-SLN>> "INSTALL" in visual studio...and make sure that in cmake you have changed the installation folder to som place other than C: or C:>>program files....

view this post on Zulip Mitesh (Jan 08 2018 at 13:47):

what is 15 generator? @Mahdi

view this post on Zulip Mahdi (Jan 08 2018 at 13:48):

I was assuming he was using the latest visual studio (2017)

view this post on Zulip Mitesh (Jan 08 2018 at 13:48):

Ohk...

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:48):

cmakepredefinedtargets\INSTALL

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:49):

You assumed right . @Mahdi

view this post on Zulip Mitesh (Jan 08 2018 at 13:49):

I did it in visual studio 2015

view this post on Zulip Mitesh (Jan 08 2018 at 13:49):

got some positive results..(it wasn't 100 % successfull)

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:51):

Run the BRLCAD-SLN>> "INSTALL" in visual studio...and make sure that in cmake you have changed the installation folder to som place other than C: or C:>>program files....

Run or Build ?. ALso i have kept nothing in the C:\ drive

view this post on Zulip Mitesh (Jan 08 2018 at 13:54):

Build

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:55):

btw, i can reclaim a task which i ran out of time to complete , right ?

view this post on Zulip Jeff Sieu (Jan 08 2018 at 13:55):

As long as it's still there when you search for it

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:55):

Yea,, it is there :)

view this post on Zulip Rahil Malik (Jan 08 2018 at 13:56):

by the way i already have BRL-CAD (ReadyMade) installed, that would that create any problem ?

view this post on Zulip Mahdi (Jan 08 2018 at 14:02):

No, that wouldn't be the issue

view this post on Zulip Mahdi (Jan 08 2018 at 14:02):

The build is broken for the latest version of visual studio

view this post on Zulip Mahdi (Jan 08 2018 at 14:03):

Daniel is currently trying to find a workaround

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:05):

so,I would have to revert back to my old version ?

view this post on Zulip Mahdi (Jan 08 2018 at 14:05):

I would personally recommend using linux

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:06):

in VMware station would be fine, right ?

view this post on Zulip Jeff Sieu (Jan 08 2018 at 14:07):

Should be fine, but why not just dual-boot

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:08):

Yes, but wouldn't that take more time ?

view this post on Zulip Mahdi (Jan 08 2018 at 14:08):

If you have enough ram for the vm you should be fine

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:10):

Ubuntu is best of all ?

view this post on Zulip Mahdi (Jan 08 2018 at 14:11):

I don't like ubuntu

view this post on Zulip Mahdi (Jan 08 2018 at 14:11):

Have you ever used linux?

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:12):

Nope, once i installed ubuntu but i don't remember when

view this post on Zulip Mahdi (Jan 08 2018 at 14:14):

Yeah Ubuntu would be the best then

view this post on Zulip Jeff Sieu (Jan 08 2018 at 14:14):

Somehow once I went Ubuntu, I've not gone back to Windows

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:15):

Cool

view this post on Zulip Mahdi (Jan 08 2018 at 14:16):

Once u-bunt, u-want.

view this post on Zulip Mahdi (Jan 08 2018 at 14:16):

Okay that was bad but the effort is what counts

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:17):

i didn'teven get the joke but A for Effort. :laughing:

view this post on Zulip Jeff Sieu (Jan 08 2018 at 14:17):

That was so bad

view this post on Zulip Mahdi (Jan 08 2018 at 14:17):

I want a mod to delete that please

view this post on Zulip Mahdi (Jan 08 2018 at 14:17):

I am ashamed.

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:18):

HAha :rolling_on_the_floor_laughing: :rolling_on_the_floor_laughing:

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:28):

my compilation in visual studio 2017 is done

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:29):

2924 errors 638 warnings

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:29):

build Install.vxcproj - failed

view this post on Zulip Sean (Jan 08 2018 at 14:31):

2924 errors 638 warnings

count of errors in visual studio is practically meaningless

view this post on Zulip Sean (Jan 08 2018 at 14:32):

there can be exactly 1 thing wrong, 1 character, in 1 file .. and it will result in thousands of errors (basically everything fails)

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:32):

no, waiti am attaching the error log

view this post on Zulip Sean (Jan 08 2018 at 14:33):

all that matters when compiling is the command that was run and the first error that resulted

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:33):

ErrorLog.txt

view this post on Zulip Sean (Jan 08 2018 at 14:34):

so did you read it?

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:34):

Yes, kinda

view this post on Zulip Sean (Jan 08 2018 at 14:34):

it's basically 1 error ... printed thousands of times

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:34):

I can't figure out most of it

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:35):

Yes,

view this post on Zulip Sean (Jan 08 2018 at 14:35):

there may be two errors in there, but again all that matters is the first error

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:35):

it's basically 1 error ... printed thousands of times

btw @Mahdi told that Visual Studio 2017 has problems in building the Code for BRLCAD

view this post on Zulip Sean (Jan 08 2018 at 14:36):

more specifically, Visual Studio 2017 has problems building Tcl/Tk

view this post on Zulip Sean (Jan 08 2018 at 14:36):

which is bundled and being compiled

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:37):

So, what should i do now ?

view this post on Zulip Sean (Jan 08 2018 at 14:37):

Rahil, if you're up for a test, try installing tcl/tk from a binary distribution

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:37):

Rahil, if you're up for a test, try installing tcl/tk from a binary distribution

I'll check it up

view this post on Zulip Sean (Jan 08 2018 at 14:38):

https://www.activestate.com/activetcl/downloads

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:39):

This will resolve the issue ?

view this post on Zulip Sean (Jan 08 2018 at 14:39):

I'd try the 8.5.18.0 installer

view this post on Zulip Sean (Jan 08 2018 at 14:40):

uhm ... "Rahil, if you're up for a test, ..."

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:40):

OHHH, ok i am up :up:

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:43):

Done, i installed the Tcl/tk . now should i build the INSTALL again ??

view this post on Zulip Sean (Jan 08 2018 at 14:44):

yes, but you'll need to pay attention CLOSE attention when you run cmake

view this post on Zulip Sean (Jan 08 2018 at 14:44):

you need to tell it where tcl/tk is installed

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:44):

i have to run cmake again. ? or just from Visual Studio

view this post on Zulip Sean (Jan 08 2018 at 14:44):

and the summary needs to indicate that it will be using that version

view this post on Zulip Sean (Jan 08 2018 at 14:44):

you have to run cmake again

view this post on Zulip Sean (Jan 08 2018 at 14:44):

it's not going to magically find it :P

view this post on Zulip Sean (Jan 08 2018 at 14:45):

you should delete your build directory

view this post on Zulip Sean (Jan 08 2018 at 14:45):

start fresh

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:45):

OK

view this post on Zulip Rahil Malik (Jan 08 2018 at 14:48):

so i run cmake from command prompt so how can i tell cmake to look for the directory ?

view this post on Zulip Sean (Jan 08 2018 at 14:50):

doesn't matter -- you can use cmake gui

view this post on Zulip Sean (Jan 08 2018 at 14:50):

I'd probably use cmake gui, but just running generate probably won't work -- you have to run configure and then it'll display a list of variables

view this post on Zulip Sean (Jan 08 2018 at 14:51):

then you have to find the variables related to tcl/tk and set them, pointing them at where you installed activetcl

view this post on Zulip Naseef (Jan 09 2018 at 01:18):

td;dr can someone tell me what are the dependencies missing? Have anyone successfully compiled brlcad on 17.10?

view this post on Zulip Sean (Jan 09 2018 at 01:18):

what error are you seeing?

view this post on Zulip Sean (Jan 09 2018 at 01:19):

or conversely, what's the cmake summary?

view this post on Zulip Naseef (Jan 09 2018 at 01:19):

I posted the log above, I've been stuck there for about a week now

view this post on Zulip Naseef (Jan 09 2018 at 01:19):

https://brlcad.zulipchat.com/user_uploads/1549/NX9OArlnnQT1_s1c1rTruplU/build.log
https://brlcad.zulipchat.com/user_uploads/1549/8Li6FaPDcxg-5UfgMr9GXe6a/CMakeOutput.log

view this post on Zulip Sean (Jan 09 2018 at 01:20):

brb, looking

view this post on Zulip Naseef (Jan 09 2018 at 01:20):

"Qt support (optional) .................: OFF" - I need GUI

view this post on Zulip Naseef (Jan 09 2018 at 01:21):

okay, thanks...

view this post on Zulip Sean (Jan 09 2018 at 01:47):

@Naseef you don't need qt support for BRL-CAD -- that's an experimental interface

view this post on Zulip Sean (Jan 09 2018 at 01:48):

cmake summary looks good

view this post on Zulip Sean (Jan 09 2018 at 01:49):

@Naseef aha, so did you read the build log? what's the first error you see?

view this post on Zulip Sean (Jan 09 2018 at 02:00):

@Naseef after answering that -- I just applied an update that should get your further. run "svn up" then make again

view this post on Zulip Sean (Jan 09 2018 at 02:10):

@Naseef that was a build system bug, so feel free to claim the bug report task and I'll give you credit for finding and reporting it well -- just upload those two log files again

view this post on Zulip Naseef (Jan 09 2018 at 02:25):

Well, Was it a bug? I'll find it.

view this post on Zulip Sean (Jan 09 2018 at 03:04):

@Naseef what was the error you saw in that log?

view this post on Zulip Sean (Jan 09 2018 at 03:09):

reading compilation logs is a rather valuable skill

view this post on Zulip Sean (Jan 09 2018 at 03:10):

as is reading all the messages written to you -- I answered your question but you didn't answer mine ;)

view this post on Zulip Naseef (Jan 09 2018 at 03:14):

Well, I was trying to fix the bug while watching cat videos on youtube.

view this post on Zulip Naseef (Jan 09 2018 at 03:14):

XInput?

view this post on Zulip Sean (Jan 09 2018 at 03:15):

is that a question or an answer? :) what about XInput?

view this post on Zulip Naseef (Jan 09 2018 at 03:16):

/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:44:10: fatal error: X11/extensions/XInput.h: No such file or directory
#include <X11/extensions/XInput.h>

view this post on Zulip Naseef (Jan 09 2018 at 03:16):

It's missing

view this post on Zulip Naseef (Jan 09 2018 at 03:17):

xinput is already the newest version (1.6.2-1build1).

view this post on Zulip Sean (Jan 09 2018 at 03:17):

so you have xinput (the library) installed

view this post on Zulip Naseef (Jan 09 2018 at 03:18):

yes

view this post on Zulip Sean (Jan 09 2018 at 03:18):

that does not mean you had the headers installed

view this post on Zulip Sean (Jan 09 2018 at 03:18):

which are a separate package

view this post on Zulip Sean (Jan 09 2018 at 03:18):

so you could have installed them and it would have succeeded

view this post on Zulip Naseef (Jan 09 2018 at 03:18):

like xinput-dev?

view this post on Zulip Sean (Jan 09 2018 at 03:18):

something like that BUT I just changed the code so it should just work for you

view this post on Zulip Sean (Jan 09 2018 at 03:18):

try "svn up" then retry your build (make)

view this post on Zulip Naseef (Jan 09 2018 at 03:18):

should I svn update?

view this post on Zulip Naseef (Jan 09 2018 at 03:18):

up = update?

view this post on Zulip Sean (Jan 09 2018 at 03:19):

yep

view this post on Zulip Naseef (Jan 09 2018 at 03:19):

how do I see the changes?

view this post on Zulip Naseef (Jan 09 2018 at 03:19):

changed lines?

view this post on Zulip Sean (Jan 09 2018 at 03:19):

i also went ahead and fixed all those silly warnings

view this post on Zulip Naseef (Jan 09 2018 at 03:19):

That's great!

view this post on Zulip Naseef (Jan 09 2018 at 03:20):

now I'm deleting everything in build directory and starting again

view this post on Zulip Sean (Jan 09 2018 at 03:20):

I cleaned up some other things at the same time, but you can see what changed with: svn diff -c70572

view this post on Zulip Sean (Jan 09 2018 at 03:20):

you don't need to

view this post on Zulip Naseef (Jan 09 2018 at 03:21):

Oops, I just did!

view this post on Zulip Sean (Jan 09 2018 at 03:21):

helps to learn what each step actually does when compiling so you don't waste time :)

view this post on Zulip Sean (Jan 09 2018 at 03:22):

if you'd installed or uninstalled something, you'd need to delete your build or re-run configuration (cmake) without any cached results

view this post on Zulip Sean (Jan 09 2018 at 03:22):

you were past that, you were compiling

view this post on Zulip Sean (Jan 09 2018 at 03:22):

the error was a compile error, the compile error was fixed, so there's nothing needed -- you just compile again

view this post on Zulip Naseef (Jan 09 2018 at 03:23):

Well, I understand. But deleting it won't harm right?

view this post on Zulip Sean (Jan 09 2018 at 03:23):

if you'd finished compiling and were looking at a link error, then you "might" need to "make clean", but even then usually just make again will work fine

view this post on Zulip Sean (Jan 09 2018 at 03:23):

it harms YOU if you get in a habit of just doing that or not doing that without learning when you NEED to do that :)

view this post on Zulip Naseef (Jan 09 2018 at 03:24):

;)

view this post on Zulip Naseef (Jan 09 2018 at 03:24):

I see a lot of 'failed' in tests

view this post on Zulip Naseef (Jan 09 2018 at 03:26):

and some 'not found'

view this post on Zulip Sean (Jan 09 2018 at 03:27):

yes?

view this post on Zulip Sean (Jan 09 2018 at 03:28):

cmake is called a configuration step because it probes your system, to figure out what you have and do not have

view this post on Zulip Sean (Jan 09 2018 at 03:28):

so it knows how to configure the compilation, what features to turn on or off

view this post on Zulip Naseef (Jan 09 2018 at 03:31):

well, when someone is compiling for distribution, which will be running on different systems, how the configurations works there?

view this post on Zulip Sean (Jan 09 2018 at 04:06):

pretty much the same, because you build for a given configuration

view this post on Zulip Sean (Jan 09 2018 at 04:08):

it's testing to figure out whether it's linux, windows, mac, bsd, etc, and what types of each

view this post on Zulip Naseef (Jan 09 2018 at 04:58):

[ 43%] Built target libged-obj Makefile:162: recipe for target 'all' failed make: *** [all] Error 2
I think I should run a verbose build

view this post on Zulip Sean (Jan 09 2018 at 05:18):

As stated in an earlier thread, pasting the end of a log or the last error message is rarely informative. Don’t do that. Post the FIRST error and if not simply make or cmake, the command that preceded it.

view this post on Zulip Sean (Jan 09 2018 at 05:22):

The full log or verbose log are the step after, usually a request when someone fails at reading their log or something exceptional has happened and we want to know how it happened.

view this post on Zulip Sean (Jan 09 2018 at 05:24):

Don’t jump to that step. Read your log and find the first error first, then read it, then google it and ask for help understanding it (usually in that order).

view this post on Zulip Naseef (Jan 09 2018 at 05:34):

A few warnings at 34%

view this post on Zulip Naseef (Jan 09 2018 at 05:35):

more warnings here and there starting at 34%

view this post on Zulip Naseef (Jan 09 2018 at 05:35):

first error at /home/naseef/Code/brlcad/src/libdm/dm-ogl.c:650:5
[ 36% ]

view this post on Zulip Naseef (Jan 09 2018 at 05:36):

In function ‘ogl_open’

view this post on Zulip Naseef (Jan 09 2018 at 05:36):

/home/naseef/Code/brlcad/src/libdm/dm-ogl.c: In function ‘ogl_open’:
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:650:5: error: unknown type name ‘XDeviceInfoPtr’
XDeviceInfoPtr olist = NULL, list = NULL;
^~~~~~~~~~~~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:650:28: error: initialization makes integer from pointer without a cast [-Wint-conversion]
XDeviceInfoPtr olist = NULL, list = NULL;
^~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:650:41: error: initialization makes integer from pointer without a cast [-Wint-conversion]
XDeviceInfoPtr olist = NULL, list = NULL;
^~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:651:5: error: unknown type name ‘XDevice’
XDevice *dev = NULL;
^~~~~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:652:5: error: unknown type name ‘XEventClass’; did you mean ‘XEvent’?
XEventClass e_class[15];
^~~~~~~~~~~
XEvent
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:653:5: error: unknown type name ‘XInputClassInfo’
XInputClassInfo *cip;
^~~~~~~~~~~~~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:891:18: error: ‘XDeviceInfoPtr’ undeclared (first use in this function)
if (list == (XDeviceInfoPtr)NULL ||
^~~~~~~~~~~~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:891:18: note: each undeclared identifier is reported only once for each function it appears in
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:892:26: error: expected ‘)’ before numeric constant
list == (XDeviceInfoPtr)1) goto Done;
^
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:895:10: error: invalid type argument of ‘->’ (have ‘int’)
if (list->use == IsXExtensionDevice) {
^~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:895:19: error: ‘IsXExtensionDevice’ undeclared (first use in this function); did you mean ‘LastExtensionError’?
if (list->use == IsXExtensionDevice) {
^~~~~~~~~~~~~~~~~~
LastExtensionError
In file included from /home/naseef/Code/brlcad/include/raytrace.h:58:0,
from /home/naseef/Code/brlcad/include/dm.h:33,
from /home/naseef/Code/brlcad/src/libdm/dm-ogl.c:78:
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:896:27: error: invalid type argument of ‘->’ (have ‘int’)
if (BU_STR_EQUAL(list->name, "dial+buttons")) {
^
/home/naseef/Code/brlcad/include/bu/str.h:123:42: note: in definition of macro ‘BU_STR_EQUAL’
#define BU_STR_EQUAL(s1, s2) (bu_strcmp((s1), (s2)) == 0)
^~
[ 36%] Building C object src/libged/CMakeFiles/libged-obj.dir/brep.c.o
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:897:14: error: implicit declaration of function ‘XOpenDevice’ [-Wimplicit-function-declaration]
if ((dev = XOpenDevice(pubvars->dpy,
^~~~~~~~~~~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:898:16: error: invalid type argument of ‘->’ (have ‘int’)
list->id)) == (XDevice *)NULL) {
^~
[ 36%] Building C object src/librt/CMakeFiles/librt-obj.dir/primitives/eto/eto.c.o
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:898:27: error: ‘XDevice’ undeclared (first use in this function); did you mean ‘ndevices’?
list->id)) == (XDevice *)NULL) {
^~~~~~~
ndevices
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:898:36: error: expected expression before ‘)’ token
list->id)) == (XDevice *)NULL) {
^
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:903:17: error: request for member ‘classes’ in something not a structure or union
for (cip = dev->classes, k = 0; k < dev->num_classes;
^~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:903:26: warning: left-hand operand of comma expression has no effect [-Wunused-value]
for (cip = dev->classes, k = 0; k < dev->num_classes;
^
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:903:42: error: request for member ‘num_classes’ in something not a structure or union
for (cip = dev->classes, k = 0; k < dev->num_classes;
^~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:905:18: error: request for member ‘input_class’ in something not a structure or union
switch (cip->input_class) {
^~
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:928:3: error: implicit declaration of function ‘XSelectExtensionEvent’; did you mean ‘XFreeExtensionList’? [-Wimplicit-function-declaration]
XSelectExtensionEvent(pubvars->dpy, pubvars->win, e_class, nclass);
^~~~~~~~~~~~~~~~~~~~~
XFreeExtensionList
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:934:5: error: implicit declaration of function ‘XFreeDeviceList’; did you mean ‘XFreeStringList’? [-Wimplicit-function-declaration]
XFreeDeviceList(olist);
^~~~~~~~~~~~~~~
XFreeStringList
/home/naseef/Code/brlcad/src/libdm/dm-ogl.c:649:9: warning: unused variable ‘unused’ [-Wunused-variable]
int unused;
^~~~~~
src/libdm/CMakeFiles/libdm-obj.dir/build.make:86: recipe for target 'src/libdm/CMakeFiles/libdm-obj.dir/dm-ogl.c.o' failed
make[2]: [src/libdm/CMakeFiles/libdm-obj.dir/dm-ogl.c.o] Error 1
CMakeFiles/Makefile2:18871: recipe for target 'src/libdm/CMakeFiles/libdm-obj.dir/all' failed
make[1]:
[src/libdm/CMakeFiles/libdm-obj.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

view this post on Zulip Sean (Jan 09 2018 at 05:36):

ah, there we go

view this post on Zulip Sean (Jan 09 2018 at 05:37):

need one more protection

view this post on Zulip Naseef (Jan 09 2018 at 05:38):

what do you mean?

view this post on Zulip Sean (Jan 09 2018 at 05:39):

so the underlying problem is that the code was written to use the XInput API in just a couple places

view this post on Zulip Sean (Jan 09 2018 at 05:39):

to use an API, you need libs and you need headers

view this post on Zulip Naseef (Jan 09 2018 at 05:39):

So I failed to follow the build instructions on wiki?

view this post on Zulip Sean (Jan 09 2018 at 05:39):

it detected that you do not have the headers, so the code needs to disable the XInput code

view this post on Zulip Sean (Jan 09 2018 at 05:39):

no....

view this post on Zulip Sean (Jan 09 2018 at 05:40):

code is constantly changing, you are on the latest code which we change throughout the day nearly every day

view this post on Zulip Naseef (Jan 09 2018 at 05:40):

I updated just a few hours ago.

view this post on Zulip Sean (Jan 09 2018 at 05:41):

yes

view this post on Zulip Sean (Jan 09 2018 at 05:41):

because I asked you to, I made a change

view this post on Zulip Sean (Jan 09 2018 at 05:41):

did you read the patch, you asked for it

view this post on Zulip Naseef (Jan 09 2018 at 05:41):

I did

view this post on Zulip Sean (Jan 09 2018 at 05:42):

I don't have your setup, I don't have your errors, so I made a change that turned off some XInput code that wasn't getting turned off -- entirely just by reading your error log

view this post on Zulip Sean (Jan 09 2018 at 05:42):

it's not something I could test. you're testing it now

view this post on Zulip Naseef (Jan 09 2018 at 05:42):

Well, How you would handle such error?

view this post on Zulip Sean (Jan 09 2018 at 05:43):

there's a different error now because while I turned off one bit of XInput code, there was another less obvious bit that was overlooked

view this post on Zulip Sean (Jan 09 2018 at 05:43):

so that bit needs to be turned off too

view this post on Zulip Naseef (Jan 09 2018 at 05:43):

is the XInput of X11 or DirectX?

view this post on Zulip Sean (Jan 09 2018 at 05:44):

i don't understand your question

view this post on Zulip Naseef (Jan 09 2018 at 05:44):

me neither

view this post on Zulip Sean (Jan 09 2018 at 05:44):

heh

view this post on Zulip Sean (Jan 09 2018 at 05:45):

I'm working on an additional change, which again I cannot test, but I can certainly make the code edits and we can see what happens

view this post on Zulip Naseef (Jan 09 2018 at 05:45):

I'll do the testing and reporting.

view this post on Zulip Sean (Jan 09 2018 at 05:45):

you can test it, maybe understand how it pertains to the first change

view this post on Zulip Naseef (Jan 09 2018 at 05:46):

Sure, I'll try to understand

view this post on Zulip Sean (Jan 09 2018 at 05:50):

none of this is mysterious magic.. computers just only do exactly what we tell them to do, so when programming it takes time to get things exact. this is how coding goes. (always)

view this post on Zulip Sean (Jan 09 2018 at 05:58):

okay, committed

view this post on Zulip Naseef (Jan 09 2018 at 05:58):

Yeah, We need A.I. powered chips.

view this post on Zulip Naseef (Jan 09 2018 at 05:58):

I'll update...

view this post on Zulip Sean (Jan 09 2018 at 05:58):

svn diff -c70576 to see the change

view this post on Zulip Sean (Jan 09 2018 at 05:59):

any plus lines are lines added, any minus lines are lines deleted.

view this post on Zulip Naseef (Jan 09 2018 at 05:59):

I see

view this post on Zulip Sean (Jan 09 2018 at 06:02):

so you'lll see some preprocessor blocks, which is a typical way to "turn off" code at compile-time -- the compiler won't compile code between the #ifdef and #endif blocks unless that HAVE_X11_EXTENSIONS_XINPUT_H symbol is declared, which is tested for and set during cmake

view this post on Zulip Naseef (Jan 09 2018 at 06:25):

It's compiled past 43%, Which means build succeeded.

view this post on Zulip Naseef (Jan 09 2018 at 06:52):

Elapsed compilation time: 1 hour 17 minutes 6 seconds
SUCCESS!

view this post on Zulip Naseef (Jan 09 2018 at 06:52):

Thanks @Sean

view this post on Zulip Naseef (Jan 09 2018 at 12:56):

(deleted)

view this post on Zulip Naseef (Jan 09 2018 at 12:57):

the *.g databases are generated by cmake? I want to check that out.

view this post on Zulip Naseef (Jan 09 2018 at 13:01):

what are the *.asc files?

view this post on Zulip Jeff Sieu (Jan 15 2018 at 15:19):

/home/jeff/Documents/brlcad/src/nirt/parse_fmt.c: In function ‘direct_output’:
/home/jeff/Documents/brlcad/src/nirt/parse_fmt.c:655:22: error: ‘popen’ undeclared (first use in this function)
         (openfunc == popen) ? "'| " : "'", dest_string);
                      ^

Getting this error when trying to build from latest source checkout.

view this post on Zulip Sean (Jan 16 2018 at 07:30):

Getting this error when trying to build from latest source checkout.

@Jeff Sieu do you still get this error? it should have been fixed yesterday. one of the devs has been working on strictness compilation, which is tricky cross platform

view this post on Zulip Jeff Sieu (Jan 16 2018 at 09:33):

@Jeff Sieu do you still get this error? it should have been fixed yesterday. one of the devs has been working on strictness compilation, which is tricky cross platform
Yep, I still do.

view this post on Zulip Sean (Jan 17 2018 at 15:17):

@Jeff Sieu just applied a few fixes that should fix that one -- would you test again?

view this post on Zulip Jeff Sieu (Jan 17 2018 at 15:40):

@Jeff Sieu just applied a few fixes that should fix that one -- would you test again?

@Sean yup, works now

view this post on Zulip Sean (Jan 17 2018 at 15:41):

woo hoo! thanks jeff


Last updated: Oct 09 2024 at 00:44 UTC