Attempting to build OWLNext 6.44 (or 7) with the 32-bit Clang compiler (BCC32C) in the free C++Builder 10.1/10.2 32-bit Starter edition results in an error:
`..\..\..\include\owl/applicat.h(31,10): error F705: 'boost/exception_ptr.hpp' file not found`
Cause: The global system path configuration and "rsvars.bat" in the Starter Edition omits the definition of CG_64_BOOST_ROOT, required for BCC64C.
Bugs: #416
Discussion: Building OWL with BCC101 free C++ compiler
Feature Requests: #131
Wiki: Installing_OWLNext_from_the_Code_Repository
Hi Jogy, note that BCC32C builds 6.44 just fine now with Boost, using boost::exception_ptr instead of std::exception_ptr. I guess Boost can be downloaded and installed for the free BCC32C edition to make it work.
Since BCC32C is currently supported for 6.44 (using Boost for the supported toolsets, RAD Studio/C++ Builder 10.1/10.2), and since the proposed change is not binary compatible, we cannot implement the proposed change in 6.44.
That said, I think we should make the change on the trunk. For now, I've changed the milestone to 7.
Hmm, on two separate machines I cannot get OWLNext 6.44 to build with the free install of C++ Builder 10.1 or 10.2. Both have Boost 1.39 properly downloaded and installed, and I can confirm that the file exception_ptr.hpp is present in the boost folder, but I still get this error:
1> ..\..\..\include\owl/applicat.h(31,10): error F705: 'boost/exception_ptr.hpp' file not found
On the trunk (version 7), this issue was fixed in [r3439] "CHG: Removed OWL_HAS_STD_EXCEPTION_PTR; support for std::exception_ptr is now required."
Related
Commit: [r3439]
Strange. But it must be some quirk in the configuration of the compiler settings (include paths, probably), since it all works well with 6.44 and the toolset "Embarcadero RAD Studio/C++Builder 10.2 Tokyo (Clang)" in OWLMaker, which supports both 32-bit (BCC32C) and 64-bit (BCC64). I've confirmed that it really is the Clang compiler BCC32C performing the build when you select target platform "x86 (32-bit)" (which produces libs named "*-c730-x86-*").
I added the following to "include/owl/private/borlandc.h":
Then I built both 32-bit and 64-bit configurations and got:
By the way, how do you build? Have you made your own makefile? Do you use the makefile I created in my patch in [feature-requests:#100]? Or do you use MSBuild (OWLMaker) with a modified project-file ("source/owlcore/CBXE3/owl.cbproj")?
For reference, see "Support for the Embarcadero Free C++ Compiler" [feature-requests:#100] and "Building 6.35 with Embarcadero free C++ compiler" [discussion:c8946fcc].
Related
Discussion: c8946fcc
Feature Requests:
#100I am using OWLMaker, I tried also opening the owl.cbproj file in C++ Builder and building from there, with the same result.
Tried playing around with the include settings, but have not succeeded so far
OK, I found the problem: By default, in the CB global configuration, in include paths there was the variable
$(CG_64_BOOST_ROOT)
, but it was not defined in the Environment options. OnlyCG_BOOST_ROOT
is set. Replacing$(CG_64_BOOST_ROOT)
with$(CG_BOOST_ROOT)
in the CB global configuration solves the issue and allows me to build the CLang OWLNext libraries with OWLMaker.P.S. The new OWLMaker is really great!
Ah. Great that you found the source of the problem.
By the way, when I downloaded the Embarcadero Free C++ Compiler, it did not include MSBuild, hence my effort into creating a makefile for it. Do you use the C++Builder Starter edition for your testing? If so, does it work without modifying OWLMaker, i.e. by selecting the current "RAD Studio/C++Builder" toolset?
If that is the case, I guess we can close [feature-requests:#100] as "wont fix". No need to support the bare compiler, if the C++Builder Starter edition is free and contains the same compiler (BCC32C). Ideally, we should make a separate toolset in OWLMaker for the Starter edition, since it does not support 64-bit (I guess selecting that option now gives an error message in the build output).
My trial for RAD Studio 10.2 has run out. Although the compiler toolsets still work, the IDE wont open. I've downloaded the Starter edition, but have not installed it yet, as I guess I will lose the ability to do 64-bit build testing (Starter does not include BCC64, as far as I understand). I am thinking about making a backup of the 64-bit toolset before installing the Starter edition (which will remove the trial version), and then manually copy back the 64-bit toolset, but I am not sure it will work. Perhaps I should instead try to beg Embarcadero for a license again. However, last time I did, I didn't even get a reply. Or, perhaps, I better leave support for the Embarcadero toolsets to those who use them.
See [feature-requests:#70] and Sebastian's work on this, in particular his work on adding the full set of build configurations to the MSBuild project files (*.cbproj).
Perhaps we can go 100% MSBuild for version 7 and retire the makefiles.
Good to hear! Which build do you use? Please test the latest uploaded Debug Build 4295 if you can. It does away with the console, and updates the Build Output window during the build. It also has the new improved Diagnostic Window.
Related
Feature Requests:
#100Feature Requests: #70
Last edit: Vidar Hasfjord 2018-04-23
Yes, I am using the Starter edition. So, in order to build OWLNext with the starter edition the user needs to:
1) Download Boost from the package manager in the IDE;
2) Correct the global include path for the CLang compiler
Afterwards in OWLMaker selecting the toolset works, no other changes are needed.
Since the Starter edition does not include the 64-bit compiler, one option I see is to detect whether the bin folder of the C++Builder location contains the 64-bit compiler executable, and if not, to disable the 64-bit option for building OWLNext.
Another possibility is of course, to add separate tools for the Starter and for the Full editions.
Diff:
Hi Jogy, now that you have investigated and determined the cause of this issue, I have reopened and renamed this ticket. I will configure "owl.cbproj" to set the correct include path for Boost. Since this is a binary compatible change, I have retargeted the ticket for 6.44.
I installed it now too.
On second though, I agree. We should leave the project files alone and let the toolset configure the system paths for the respective platforms and compilers.
However, your step 2, correcting the path to CG_BOOST_ROOT, is incorrect for BCC32C. It will then use the wrong Boost version. The Embarcadero documentation says:
While using the wrong version works for 6.44, it fails on the trunk.
Aside: Note that the trunk again requires Boost for the Embarcadero toolset, since I now use the upcoming std::filesystem (in the refreshed Diagnostic Window), which is not yet supported by the Embarcadero toolsets, forcing me to switch to boost::filesystem for those toolsets (Microsoft provides std::experimental::filesystem).
So the correct fix is to add a definition of the CG_64_BOOST_ROOT environment variable to "rsvars.bat" (located in the "bin" directory for the toolset). Since BCC32C requires this variable to be set, I consider the failure to define it to be a bug in the Starter edition. Consider reporting it to Embarcadero.
With this fix I can build 6.44 and trunk with Starter just fine.
Regarding adding a separate option for the Starter toolset in OWLMaker, I vote for. Adding it is pretty easy, and makes things simple and clear for the user. We could then make OWLMaker patch "rsvars.bat" automatically (either correcting the original, if we can overcome the UAC restriction on modifying files in the "bin" folder, or use a corrected copy temporarily). Otherwise, we need to tell the user to fix this manually.
The installation guide already mentions the need to install Boost ( see Prepare your build tools).
Last edit: Vidar Hasfjord 2018-04-24
Diff:
This issue has now been circumvented in OWLMaker with the new explicit support for the Starter Edition [feature-requests:#131] [r4298].
Related
Commit: [r4298]
Feature Requests:
#131Last edit: Vidar Hasfjord 2018-04-24