It's me again plus some issues

All development related issues welcome

Moderator: Moderator Team

Post Reply
CodeVisio
Posts: 22
Joined: Sun Feb 19, 2012 10:36 am

It's me again plus some issues

Post by CodeVisio »

Hi all,

I've been away for a while, I hope to give my contribution again.
I've seen you changed the BugTracker system.
I checked out ROS source and followed the new instruction to build it, but I failed.
In particular I used the ninja instruction but after starting the building process I got some compiling/linking errors.
1) Is the ninja building supposed to work? Or is it a working progress?
2) Are you moving from the traditional building approach (make) to ninja's?

So I came back and tried the traditional make building and it worked. I successfully built ROS and created the iso image.
I ran it inside VirtualBox.
3) Is there a way from RosBE to perform a make without rebuilding all ROS? That is, if I make a little code change and execute make ,
does it perform a rebuild all? Or does it compile and link only the modified code?

I created also a Visual Studio solution from the configure command and successfully loaded ROS projects from Visual Studio 2012 express.
4) I've read from the ROS instruction that you can create Visual Studio 2010/2012 solutions, but I remember there was something
similar to VS2008 in the past. Now it seems unsupported anymore. Am I wrong? Is there a technical reason for this? Or is it just a choice?

I tried to compile ROS from VS2012 express without success. A 10%/20% of projects weren't linked/compiled.
At first sight it seems those problems have a common source, that is a library didn't exported functions and so the linker wasn't able
to resolve the imported functions from the other projects.
5) Does the Visual Studio compilation/linking supposed to work? Or is it a working progress?
6) From a first inspection it seems that some problems come from the compilation of 'oldnames' library. oldnames compiles fine, without
errors or warnings but not lib library file was created. Obviously, other projects that depends on 'oldnames' exported functions didn't don't compile at all.
7) In any case, I need to launch 'make bootcd' from RosBE even if I use VS, don't I?

I wasn't able to understand the issue above since VS projects depend heavily from CMake-way-of-doing-things and I don't know CMake.

Almost an year ago I believed I fixed a bug from Notepad. It was what is now called as CORE-4045 bug ID from jira list.
In my opinion the problem came from the comdlg32\finddlg.c and I suggested a solution with a patch. I sent the patch to wine developers as the readme instruction suggested to do since this piece of code was part of Wine project.
However, I'm still seeing the bug present in the jira list of bugs and indeed the finddlg.c code wasn't changed.
7) Is this because ROS wasn't updated with the last Wine source code? Or because the patch didn't work?
8) Do I wrong remember or was there some interests to separate Wine code from ROS and create ROS common controls (comctl32, comdlg32) end user controls( edit, etc) ?

Thanks

EDIT: fixed some English errors. :)
Last edited by CodeVisio on Mon Feb 25, 2013 1:03 am, edited 1 time in total.

BlackRabbit
Posts: 128
Joined: Sat Dec 22, 2012 7:36 am

Re: It's me again plus some issues

Post by BlackRabbit »

It would extraordinarily helpful if someone could do a one-page summary of the steps that a virgin developer would take to build ReactOS using Visual Studio and post it on the ReactOS website, so that everyone can see. It doesn't have to be Amine, as he is very busy these days, and we do not want to overload that work-horse. :) It simply needs to be someone who knows the steps.

It does not matter if the steps are broken, as they can be modified over and over until they are correct. If the generation of the Visual Studio files using cmake is broken, then that can be fixed. What is more important is that the steps be written down so that a developer can following them successfully and independently of having to speak to someone who is familiar with the process.

As I have said many times already, I think that this feature is an order-of-magnitude more important than some of the other activities that are occurring within ReactOS. It is blocking potential developers whose comfort-zone is Visual Studio.

So to be clear, what I would very much like to be able to do is:
  • Come to the ReactOS website.
  • See a web page that shows me how to build using Visual Studio.
  • Do a build of ReactOS by following those instructions.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: It's me again plus some issues

Post by Z98 »

VS build doesn't completely work yet. If you want a fully/mostly working ROS image, you need to build using the bundled mingw toolchain. Everything you need to know for what to do to build is here: http://www.reactos.org/development/build-environment

I'll take a look at the ninja build later, but if it does work for me, you'll need to detail what you did for anyone to help.

BlackRabbit
Posts: 128
Joined: Sat Dec 22, 2012 7:36 am

Re: It's me again plus some issues

Post by BlackRabbit »

VS build doesn't completely work yet. If you want a fully/mostly working ROS image, you need to build using the bundled mingw toolchain. Everything you need to know for what to do to build is here: http://www.reactos.org/development/build-environment
Thanks. This is very helpful.
I created also a Visual Studio solution from the configure command and successfully loaded ROS projects from Visual Studio 2012 express.
4) I've read from the ROS instruction that you can create Visual Studio 2010/2012 solutions, but I remember there was something
similar to VS2008 in the past. Now it seems unsupported anymore. Am I wrong? Is there a technical reason for this? Or is it just a choice?
When I first joined ReactOS in December, 2012, I was going to provide a "one-click" mechanism to build all of ReactOS from within Visual Studio without having to use the command-line. At first, I started converting each ReactOS project to Visual Studio 2008, manually, one by one. I did 70 projects (notepad.exe is one project), which is roughly 10% of ReactOS proper, meaning the part of ReactOS that is the operating system, not things like test programs, etc. Then I learned that there was already an existing effort to provide Visual Studio integration. Several of those involved in the Visual Studio integration, as well as Aleksey, convinced me to forego Visual Studio 2008 and target either Visual Studio 2010 or Visual Studio 2012 instead, since, for reasons which I will describe below, VS2010 or VS2012 made more sense. I am summarizing my thoughts and experiences here for anyone else who is interested in Visual Studio integration.
  • Indeed, it makes more sense to target Visual Studio 2010 or Visual Studio 2012. As many of you know, when a programmer upgrades from an older version of Visual Studio to a newer version of Visual Studio, Visual Studio will convert the the .sln/.vcproj files that govern the solution from the older version to the newer version. Just before the conversion, a pop-up dialog box will ask the programmer if s/he wants to retain the old .sln/.vcproj files, just in case. The problems is that, once the programmer starts using the newer .sln/.vcproj files, it is not possible for a programmer using an older version of Visual Studio to load the newer .sln/.vcproj files. Beginning with Visual Studio 2010, Microsoft decided to solve this no-forward-compatibility problem with Visual Studio: The solution files that are used by VS2012 are entirely loadable by VS2010. In other words, no conversion is necessary when moving in either direction, forward or backward, between VS2010 and VS2012.
  • It has always been the case that Visual Studio can compile for multiple CPU's simply by using a drop-down box inside the IDE. For example, during my ReactOS-on-VS2008 effort, I made it so that VS2008 could generate ReactOS binaries for x8-32, x86-64, and ARM.
  • The ARM compiler that comes with non-free versions of VS2008 is not readily accessible. It comes with VS2008, but you have to do a trick to get it into the IDE and make it look pretty.
  • VS2012 (Express/etc.), however, comes with a bona-fide ARM compiler that is capable, in theory, of compiling all of ReactOS to an ARM CPU. This means that it it is possible, right now, to compile ReactOS for Raspberry Pi. *** THIS IS VERY IMPORTANT, IN MY OPINION ***
  • VS2010, strangely, does not come with an ARM compiler.
  • If a programmer attempts to load a solution that has support for targeting an ARM compiler into VS2010, VS2010 will issue warnings saying that it has no idea of how to generate code for an ARM CPU. The programmer can simply ignore the warnings and proceed to compile for x86-32 and x86-64.
  • Given the compatibility between VS2010 and VS2012, there is no reason that we cannot have generation for all three CPU families from a single IDE solution using either VS2010 Express or VS2012 Express:
    • x86-32
    • x86-64
    • ARM
  • Anyone who has ever used an IDE has undoubtedly wondered: How flexible is this IDE, really, compared to make files and the command-line? They might wonder if it is able to handle all of the strange cases. For example, they might wonder if it is possible to target the Raspberri Pi, but generate ReactOS tools on an x86-64 host, only the Debug+Symbols version, auf Deutsch, but only on Saturdays, yada yada...The answer is: YES. :mrgreen: The IDE can handle any situation that can be can conceived, but more importantly, the way it is done will make conceptual sense and not cause the programmer to become frustrated. After all, that is the point of an IDE - to allow a single programmer to handle a 1-million-line project without too much mental effort. [Trust me on this.]
That said, one might wonder why I aborted my effort to build all of ReactOS inside Visual Studio with one-click. One reason was that I did not want to create redundancy-of-effort with the work that was already being done using the cmake technique. The other reason has to do with what CodeVisio said: I am concerned that, once I get everything set-up, the solution will still not compile because some weird compiler/linker/#define/#include/etc. is broken, something that has nothing to do with my ability to apply Visual Studio. At that point, I would be heavily dependent upon those who are familiar with the current build process to tell me what I need to know to get past the build-break (quickly).

That said, this is something that needs to be done, so if you are a ReactOS newbie, or an oldie who has been waiting for Visual Studio support, or coming from Linux Land, and would like to get a very useful skill under your belt [being able to control Visual Studio as you see fit, including what all those weird options mean (pre-compiled headers/COMDAT folding], I think this is a good opportunity for you. I will integrate you into a small team to get this done. There would be some coding involved in C/C++, and the work would be a lot of fun. When done, you would help a lot of people be able to:
  • Pull ReactOS from SVN repository into Visual Studio 2012.
  • Hit Build.
  • Go get a Coke or other favorite drink.
  • Come back and see a ReactOS .ISO image waiting for you...or..if they like, several .ISO images.
Send me a private message or reply here if you are interested or have any questions.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: It's me again plus some issues

Post by Z98 »

Just did a build of the latest trunk using ninja and it worked fine.

Also a clarification. When I say the VS build does not entirely work, that is a blanket reference to the builds using Microsoft's toolchain. There are a few specific C++ components that are not yet buildable and thus ROS ends up missing a few pieces. The current VS solution is capable of building everything that Microsoft's toolchain is capable of building. Any further fixes will most likely need to be done in code.

Navigating the source code and debugging user mode components is already possible using Visual Studio.

CodeVisio
Posts: 22
Joined: Sun Feb 19, 2012 10:36 am

Re: It's me again plus some issues

Post by CodeVisio »

@Z98
VS build doesn't completely work yet.
This answer question #5.
If you want a fully/mostly working ROS image, you need to build using the bundled mingw toolchain. Everything you need to know for what to do to build is here: http://www.reactos.org/development/build-environment
This what I did in order to get the iso the other day.
This http://www.reactos.org/wiki/index.php/W ... pment_Wiki is also another web place where the building process is explained, under the Building section.
Just did a build of the latest trunk using ninja and it worked fine.
\configure ninja
http://picpaste.com/configure_ninja-wFRSKEBb.png

\hosttools\ ninja
http://picpaste.com/hosttools_ninja-PxdOeoBt.png

I've just checked out the ROS source and run the gnu toolchain (tradional 'make') but it didn't work either.
The other day I was able to compile, link, and create the iso image with the traditional gnu toolchain (make)...nevermind.
Also a clarification. When I say the VS build does not entirely work, that is a blanket reference to the builds using Microsoft's toolchain. There are a few specific C++ components that are not yet buildable and thus ROS ends up missing a few pieces. The current VS solution is capable of building everything that Microsoft's toolchain is capable of building. Any further fixes will most likely need to be done in code.
Navigating the source code and debugging user mode components is already possible using Visual Studio.
This answer questions #5 and #6.
My impression is that CMake operates as a meta-make utility. Some VS projects are configured so CMake gets invoked by a custom build from VS, CMake then call VC++ compiler by itself. This is not a completely integration with VS. But I'm not sure, I could be wrong.


Basically, I agree with BlackRabbit.

The other day I compiled ROS with the gnu toolchain and it took an hour and forty on my Win7 64 bit + 4gb ram. I hope changing a little bit of code doesn't need to recompiled all the system...
I don't know if it is possible but if we could have different VS solutions for different parts of the system then it would be more easily and fast to compile just that part and test it. Just an idea.
Actually, all projects loaded with reactos.sln are 801 and occupy, with VS, about 500 MB of ram.

Thanks

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: It's me again plus some issues

Post by Z98 »

CMake is a build configuration system. It is used to generate the actual build files such as VS projects, ninja files, or plain old make files and is invoked by the configure script. The moment that is done, nothing more happens with cmake. The actual compilation is done using whatever cmake generated. The solution file as generated by cmake is perfectly serviceable when it comes to browsing the code or even building ReactOS. So for all practical purposes we already support developing ReactOS using Visual Studio.

Do you have another version of mingw installed on your system.

CodeVisio
Posts: 22
Joined: Sun Feb 19, 2012 10:36 am

Re: It's me again plus some issues

Post by CodeVisio »

Do you have another version of mingw installed on your system.
I didn't remember I had a previous installation.
After removed it, ninja worked as expected.

Thanks

UPDATE:
Good news.
I was able to compile ROS with VS2012e without errors. Projects compiled 797/801, skipped 4. One of the four projects skipped was bootcd. I built it and an iso image was created.
The iso from VS was about 47MB while ninja's was about 67MB.

Bad news.
I ran the iso from VS into VBOX without success (because I compiled it in debug mode?) while the ninja's worked well.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests