Menu

#405 OWLNext build fails with C++Builder Starter Edition

OWLMaker
closed
1
2019-01-29
2018-04-17
No

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.

Related

Bugs: #416
Discussion: Building OWL with BCC101 free C++ compiler
Feature Requests: #131
Wiki: Installing_OWLNext_from_the_Code_Repository

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-21
    • summary: OWLNext does not build with 32-bit C++ Builder Clang compiler --> OWLNext does not build with BCC32C without Boost
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23
    • Group: 6.44 --> 7
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23

    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.

     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23
    • status: open --> pending
    • assigned_to: Vidar Hasfjord
     
    • Ognyan Chernokozhev

      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

       
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23

    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]

  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23

    I can confirm that the file exception_ptr.hpp is present in the boost folder, but I still get this error

    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":

    #pragma message("Hello!")
    #if defined(__BORLANDC__)
    #pragma message("I'm Borland!")
    #if defined(__clang__)
    #pragma message("And I'm Clang, as well!")
    #if defined(_WIN64)
    #pragma message("64-bit, in fact!")
    #else
    #pragma message("32-bit, actually!")
    #endif
    #endif
    #endif
    

    Then I built both 32-bit and 64-bit configurations and got:

    1> borlandc.h(28,9): warning W876: Hello!
    1> borlandc.h(32,9): warning W876: I'm Borland!
    1> borlandc.h(36,9): warning W876: And I'm Clang, as well!
    1> borlandc.h(44,9): warning W876: 32-bit, actually!
    
    2> borlandc.h(28,9): warning W876: Hello!
    2> borlandc.h(32,9): warning W876: I'm Borland!
    2> borlandc.h(36,9): warning W876: And I'm Clang, as well!
    2> borlandc.h(40,9): warning W876: 64-bit, in fact!
    
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23

    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: #100

    • Ognyan Chernokozhev

      I 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

       
  • Ognyan Chernokozhev

    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. Only CG_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.

     
    • Ognyan Chernokozhev

      P.S. The new OWLMaker is really great!

       
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-23

    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.

    P.S. The new OWLMaker is really great!

    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: #100
    Feature Requests: #70


    Last edit: Vidar Hasfjord 2018-04-23
    • Ognyan Chernokozhev

      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?

      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.

       
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24
    • summary: OWLNext does not build with BCC32C without Boost --> OWLNext build fails with C++Builder Starter edition
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,8 @@
    -Attempting to build OWLNext 6.44 with the free C++ Builder 10.1 or 10.2 CLang compilers results in an error:
    +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:
    +
    +~~~
    +:::text
     `..\..\..\include\owl/applicat.h(31,10): error F705: 'boost/exception_ptr.hpp' file not found`
    +~~~
    
    -The solution is to check for the `__clang__` instead of `_WIN64` for the `OWL_HAS_STD_EXCEPTION_PTR` flag in borlandc.h file.
    +Cause: The MSBuild "\*.cbproj" project files used to build OWLNext and the extension libraries do not specify the Boost include directory path, hence relies on global settings, which may be missing or incorrect.
    
    • status: pending --> open
    • Group: 7 --> 6.44
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24

    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.

     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24

    Yes, I am using the Starter edition.

    I installed it now too.

    [...] no other changes are needed.

    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:

    The Boost include paths are specified in the following environment variables in the IDE:

    • CG_BOOST_ROOT (BCC32, BCCOSX):
      "C:\Program Files (x86)\Embarcadero\Studio\19.0\include\boost_1_39"
    • CG_64_BOOST_ROOT (BCC32C, BCC64):
      "C:\Program Files (x86)\Embarcadero\Studio\19.0\include\boost_1_55"


    These variables are defined on the Tools > Options > Environment Options > Environment Variables dialog box.

    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
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,4 +5,4 @@
     `..\..\..\include\owl/applicat.h(31,10): error F705: 'boost/exception_ptr.hpp' file not found`
     ~~~
    
    -Cause: The MSBuild "\*.cbproj" project files used to build OWLNext and the extension libraries do not specify the Boost include directory path, hence relies on global settings, which may be missing or incorrect.
    +Cause: The global system path configuration and "rsvars.bat" in the Starter Edition omits the definition of CG_64_BOOST_ROOT, required for BCC64C.
    
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24
    • labels: Build --> Build, OWLMaker
    • summary: OWLNext build fails with C++Builder Starter edition --> OWLNext build fails with C++Builder Starter Edition
    • status: open --> pending
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24

    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: #131


    Last edit: Vidar Hasfjord 2018-04-24
  • Vidar Hasfjord

    Vidar Hasfjord - 2018-04-24
    • Group: 6.44 --> OWLMaker
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2019-01-29
    • status: pending --> closed
     

Log in to post a comment.