View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012604 | CMake | CMake | public | 2011-12-01 09:16 | 2012-09-03 16:01 | ||||
Reporter | Hong Xu | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Embarcadero C++ 6.42 | OS | Windows | OS Version | Vista | ||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||||||
Summary | 0012604: Add support for Embarcadero C++ 6.42 | ||||||||
Description | When using cmake .. with "Borland Makefiles", it is not able to compile a simple test program, while I could use "bcc32 test.c" to build the source and run the compiled binary successfully. | ||||||||
Steps To Reproduce | mkdir build cd build cmake .. -G "Borland Makefiles" | ||||||||
Additional Information | Output is: -- The C compiler identification is Borland -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin /bcc32.exe -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin /bcc32.exe -- broken CMake Error at C:/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MES SAGE): The C compiler "C:/Program Files/Embarcadero/RAD Studio/9.0/bin/bcc32.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/Users/user/Documents/proj/build/CMakeFiles/CMakeTmp | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeFiles.tar.gz [^] (3,396 bytes) 2011-12-01 20:33 CMakeFiles.zip [^] (48,875 bytes) 2011-12-02 22:40 Windows-Borland.cmake [^] (4,999 bytes) 2011-12-05 09:04 CMakeFiles-2.zip [^] (49,817 bytes) 2012-02-21 09:48 | ||||||||
Relationships | |
Relationships |
Notes | |
(0027879) Brad King (manager) 2011-12-01 09:41 |
We have nightly testing with bcc 5.5, 5.6, and 5.8. However, we are not aware of anyone that has tried a newer version from Embarcadero before. Please zip up the entire build directory and attach it here. The CMakeFiles subdirectory should contain some verbose logs of what happened. |
(0027881) Hong Xu (reporter) 2011-12-01 20:34 |
CMakeFiles tarball uploaded. Source tree could be downloaded here: https://github.com/editorconfig/editorconfig/tarball/master [^] |
(0027884) Brad King (manager) 2011-12-02 09:12 |
The CMakeFiles/CMakeError.log contains this:bcc32.exe -tWR -tW- -ecmTryCompileExec.exe ... Error: Unresolved external 'WinMain' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\RELEASE\C0W32.OBJ It is trying to create a Windows application instead of a Console application despite the "-tW-" option. We document information about Borland compiler options in the CMake source code here: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Windows-Borland.cmake;hb=v2.8.6#l23 [^] However, it looks like the Embarcadero version may have changed the options. I found some documentation here: http://docwiki.embarcadero.com/RADStudio/en/BCC32,_the_C%2B%2B_Command-Line_Compiler [^] |
(0027885) Brad King (manager) 2011-12-02 09:31 |
It looks like -tW has been an alias for -W for a while:>bcc32 -h -t Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland ... -t An alternate name for the -Wxxx switches; there is no difference ... >bcc32 -h -t Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland ... -t An alternate name for the -Wxxx switches; there is no difference ... Let's try updating the options. Edit your Modules/Platform/Windows-Borland.cmake file and replace all occurrences of "-tW" with "-W". Then try creating a fresh build tree. |
(0027886) Brad King (manager) 2011-12-02 09:38 |
Even the old Borland C++ 5.5:>bcc32 Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland documents the options as the same: -tW Target is a Windows application (same as -W) -tWC Target is a console application (same as -WC) -tWD Generate a .DLL executable (same as -WD) -tWM Generate a 32-bit multi-threaded target (same as -WM) -tWR Target uses the dynamic RTL (same as -WR) -tWV Target uses the VCL -W Target is a Windows application (same as -tW) -WC Target is a console application (same as -tWC) -WD Generate a .DLL executable (same as -tWD) -WM Generate a 32-bit multi-threaded target (same as -tWM) -WR Target uses the dynamic RTL (same as -tWR) -WU Generates Unicode application Interestingly however the detailed documentation for the options claims that -tW is preferred and -W is for compatibility: "The command-line option -WM is supported for backward compatibility only; it has the same functionality as -tWM." Perhaps they changed their mind. |
(0027891) Brad King (manager) 2011-12-02 10:42 |
Actually after reading the Embarcadero documentation more carefully: http://docwiki.embarcadero.com/RADStudio/en/BCC32,_the_C%2B%2B_Command-Line_Compiler [^] it looks like they split -t and -W options up: -W Target is a Windows application -tM Generate a multithreaded target. -tR Target uses the Dynamic RTL. -tV Target uses the VCL GUI framework. -tD Target is a shared library. |
(0027892) Brad King (manager) 2011-12-02 10:46 |
More useful documentation of this compiler: http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros [^] |
(0027900) Hong Xu (reporter) 2011-12-02 22:40 |
I've replaced all occurrences of "-tW" with "-W" and the modified file is uploaded here. However, the output is still: -- The C compiler identification is Borland -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin /bcc32.exe -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin /bcc32.exe -- broken CMake Error at C:/CMake/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MES SAGE): The C compiler "C:/Program Files/Embarcadero/RAD Studio/9.0/bin/bcc32.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/Users/xuhong/Documents/xusrc/editorconfig/build-bcc/CMakeFiles /CMakeTmp |
(0027901) Hong Xu (reporter) 2011-12-02 22:41 |
The new CMakeFiles.zip has been also uploaded here. |
(0027905) elec (reporter) 2011-12-04 15:24 |
Please in Windows-Borland.cmake check set(CMAKE_${lang}_LINK_EXECUTABLE section probably it will link to some windows libraries It you remove "<LINK_LIBRARIES>" it will run By the way I don't know why -tW is always used for example -tWD is used to create a shared lib while -tD should be used -tWC is used to create a console app while -tC should be used embarcadero XE2 bcc32 target flag are C:\>bcc32 -h -t Embarcadero C++ 6.42 for Win32 Copyright (c) 1993-2011 Embarcadero Technologies, Inc. Available options (* = default setting, xxx = has sub-options: use -h -X): (Note: -X- or -w-XXX will usually undo whatever was set or unset by -X or -wXXX. If two options conflict, the last one specified will be used.) -t Specify target executable -tC Target is a console application -tW Target is a Windows application -tV Target uses the VCL GUI framework -tR Target uses the dynamic RTL -tD Generate a shared library -tJ Target uses Delphi -tP Generate a package -tM Target is multi-threaded -tU Generate a Unicode application Note: sub-options for '-t' can be combined into a single option (-XA -XB => -XAB). |
(0027907) Hong Xu (reporter) 2011-12-05 06:42 |
Unfortunately, the result is the same: same output. It does not work with it. |
(0027908) Brad King (manager) 2011-12-05 08:51 |
Re 0012604:0027905: > By the way I don't know why -tW is always used for example > -tWD is used to create a shared lib while -tD should be used > -tWC is used to create a console app while -tC should be used Follow the link I provide to the CMake source in 0012604:0027884. There are comments that explain why each flag is used. The source is written for Borland C++ Builder version 5.8 and lower. No one has tried to add support for Embarcadero versions of the compiler prior to this issue. All supported platforms have nightly testing on our dashboard: http://www.cdash.org/CDash/index.php?project=CMake [^] We are happy to add support for this compiler but once it works in return we'd appreciate someone running a nightly dashboard build. |
(0027909) Brad King (manager) 2011-12-05 08:57 |
I think the best way to make progress on this issue is for someone with access to the compiler to edit the flags in Modules/Platform/Windows-Borland.cmake to make it work locally. Then please submit the updated file here. From there I can construct updated platform files that handle both the old and new versions. |
(0027911) elec (reporter) 2011-12-05 09:05 edited on: 2011-12-05 09:12 |
OOPS: Brad is reply while I'm writing, by the way I've access to Embarcadero XE2 CBulder and I'm available to perform additional tests with cmake. As I write in advance, my with my modification, cmake compiles correctly simple application, but I'm not sure that all possible option are corrects. Really, I modified all of compiler switch in Windows-Borland.cmake (see new attached) and I can configure OpenCV for Borland Cbuilder XE2 using CMake, correctly. This because all switches was -tW<something> while I think it should be -t<something> please may some expert confirm this ? PS: (out of context) note that OCV doesn't compile with bcc32 due to the well know atan2 issue |
(0027912) Brad King (manager) 2011-12-05 09:31 |
Re 0012604:0027911: Excellent, thanks! Of the versions listed here: http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros#C.2B.2B_Compiler_Versions_in_Predefined_Macros [^] does anyone know when bcc32 switched its options from the -W/-tW set to the new set? |
(0027913) Hong Xu (reporter) 2011-12-05 09:40 |
I can confirm that the new Windows-Borland.cmake works for version 6.42. However, this new file doesn't work with version 5.5.1. Thanks for your care on this problem. |
(0027914) elec (reporter) 2011-12-05 10:13 |
I think this may help on switch changing http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE [^] Borland compilers is a nice memory. Why you don't switch to Windows-Embarcadero.cmake filename ? PS: (Out of context) you can correct OCV atan2 issue with bcc32, including fastmath in std namespace (for more info see: https://forums.embarcadero.com/message.jspa?messageID=363384 [^]). Some other issues are there but it isn't right place here. bye ;) |
(0027915) Brad King (manager) 2011-12-05 10:17 |
Re 0012604:0027914: > Why you don't switch to Windows-Embarcadero.cmake filename ? I plan to include that in the changes. What was the first version that was officially released by either CodeGear or Embarcadero? |
(0027916) Brad King (manager) 2011-12-05 10:26 |
Re 0012604:0027914: > http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE [^] Okay, so perhaps 0x0630 for C++Builder XE is the first version to have the new options? |
(0027917) elec (reporter) 2011-12-05 11:34 |
I think that the new options starts from 0x0630 for C++Builder XE but I can't guarantee. From http://en.wikipedia.org/wiki/C%2B%2BBuilder#History [^] In 2006 Borland's Developer Tools Group, developers of C++Builder, was transferred to a wholly owned subsidiary, CodeGear. In 2008 CodeGear was purchased by Embarcadero Technologies, who continued development. From http://delphi.wikia.com/wiki/Borland_Compiler_Release_Dates [^] Borland Developer Studio 2006 ver(10) CodeGear C++ Builder 2007 for Win32 ver(11) |
(0027932) Oliver Weinheimer (reporter) 2011-12-07 07:16 |
Hello, I'm a VTK user and I did the same changes in Windows-Borland.cmake (-tW<something> to -t<something>) in order to compile vtk 5.8.0 (with some changes in the vtk-code, see vtk forum) with bcc32 6.31. I recognized 1 problem. Line 35 in Windows-Borland.cmake says: set(_RTLDLL "-tR") and Line 76-78 say: set(CMAKE_${lang}_COMPILE_OBJECT "<CMAKE_${lang}_COMPILER> ${_RTLDLL} <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 -o<OBJECT> <FLAGS> ${_COMPILE_${lang}} <SOURCE>${CMAKE_END_TEMP_FILE}" ) -> so all obj-files are linked with dynamic RTL. Because I need a real static vtk-build i am now using set(_RTLDLL "-tR-") in Line 35. Is it possible to bring an option for RTL usage to the Cmake-GUI? Thx Oliver |
(0027933) Brad King (manager) 2011-12-07 10:17 |
Re 0012604:0027932: That is a separate issue from the one under discussion here. CMake doesn't have first-class support for requesting fully static linking and a static runtime library on any platform. |
(0027946) Hong Xu (reporter) 2011-12-12 06:16 |
May I ask that when will this feature be available? Thanks. |
(0027947) Brad King (manager) 2011-12-12 09:23 |
Re 0012604:0027946: The issue came up too late in the release cycle to make it into 2.8.7 so it will have to wait until after that. Sorry. This is the first time we've ever needed to know the version of a compiler in order to know what flags can be passed to it. That makes it non-trivial to fix properly. |
(0027954) Hong Xu (reporter) 2011-12-13 00:13 |
What a pity! I am looking forward to it in 2.8.8. |
(0028645) Brad King (manager) 2012-02-20 10:16 |
I've committed changes to add support for the Embarcadero C/C++ compilers. First a preparation change: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f78ced7 [^] Then the real change: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdbbf763 [^] The changes depend on other changes in CMake since 2.8.7 so will not work if applied to the release. Please get CMake from our Git 'next' branch to test it: http://www.cmake.org/Wiki/CMake/Git [^] As I said in 0012604:0027908 we'd like someone who has this compiler to run a nightly dashboard submission so we can keep it working. Otherwise it will not be officially supported. |
(0028673) Hong Xu (reporter) 2012-02-21 08:28 |
OK. I'll test it soon. |
(0028674) Hong Xu (reporter) 2012-02-21 09:46 edited on: 2012-02-21 09:50 |
Source tree is: https://github.com/editorconfig/editorconfig/zipball/aa2c3c3f7ce36645ca9145dbe2e0ed21058015dd [^] Generate by: cmake .. -G "Borland Makefiles" Still doesn't work: -- The C compiler identification is Borland 6.42 -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin/bcc32.exe -- Check for working C compiler: C:/Program Files/Embarcadero/RAD Studio/9.0/bin/bcc32.exe -- broken CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "C:/Program Files/Embarcadero/RAD Studio/9.0/bin/bcc32.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/Users/xxx/Documents/src/editorconfig/build-bcc/CMakeFiles/CMakeTmp Run Build Command:make "cmTryCompileExec\fast" MAKE Version 5.4 Copyright (c) 1987, 2010 Embarcadero Technologies, Inc. make -f CMakeFiles\cmTryCompileExec.dir\build.make -l -o CMakeFiles\cmTryCompileExec.dir\build MAKE Version 5.4 Copyright (c) 1987, 2010 Embarcadero Technologies, Inc. "C:\Program Files\CMake 2.8\bin\cmake.exe" -E cmake_progress_report D:\Users\xxx\Documents\src\editorconfig\build-bcc\CMakeFiles\CMakeTmp\CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj C:\PROGRA~1\EMBARC~1\RADSTU~1\9.0\bin\bcc32.exe -tWR -tW- @MAKE0000.@@@ Embarcadero C++ 6.42 for Win32 Copyright (c) 1993-2011 Embarcadero Technologies, Inc. D:\Users\xxx\Documents\src\editorconfig\build-bcc\CMakeFiles\CMakeTmp\testCCompiler.c: Linking C executable cmTryCompileExec.exe C:\PROGRA~1\EMBARC~1\RADSTU~1\9.0\bin\bcc32.exe -tWR -tW- -ecmTryCompileExec.exe @MAKE0002.@@@ Embarcadero C++ 6.42 for Win32 Copyright (c) 1993-2011 Embarcadero Technologies, Inc. Turbo Incremental Link 6.21 Copyright (c) 1997-2011 Embarcadero Technologies, Inc. Error: Unresolved external 'WinMain' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\9.0\LIB\WIN32\RELEASE\C0W32.OBJ Error: Unable to perform link ** error 1 ** deleting cmTryCompileExec.exe ** error 1 ** deleting cmTryCompileExec\fast CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:33 (project) -- Configuring incomplete, errors occurred! |
(0028675) Hong Xu (reporter) 2012-02-21 09:48 |
The CMakeFiles directory is uploaded as CMakeFiles-2.zip |
(0028676) Brad King (manager) 2012-02-21 09:50 |
You can't use a current CMake that doesn't already support Embarcadero to build the new CMake from source. Normally we provide a nightly build of the 'next' branch for testing purposes but the machine that hosts that build happens to be having trouble right now. Do you have any other compilers? |
(0028677) Hong Xu (reporter) 2012-02-21 09:57 |
I have already installed the nightly build version and that's the result. I have also installed Visual Studio 2010 and 2008. Also OpenWatcom, but not in PATH. |
(0028678) Brad King (manager) 2012-02-21 10:00 |
The nightly build has not completed successfully since this change was merged, so you have a version prior to support being added. You can use it to build CMake from source using -G "Visual Studio 10" and then test with that one. |
(0028679) Hong Xu (reporter) 2012-02-21 10:08 |
I don't quite understand: nightly build was against the latest source, if I build the source, am I getting the equivalent binary with the nightly build? Or I have to switch to a special branch? Thanks. |
(0028680) Brad King (manager) 2012-02-21 10:10 |
The machine running our nightly build for Windows is broken. Therefore the nightly binaries have not kept up with the nightly source. You can use CMake 2.8.7 with VS 10 to build the latest 'next' branch from source. The result should be a CMake which supports Embarcadero. Then you can run that one to build CMake from source again and run the test suite. |
(0028682) Brad King (manager) 2012-02-21 11:55 |
We got the nightly build fixed. Please try the 20120220 build from here: http://www.cmake.org/files/dev/?C=M;O=D [^] Thanks. |
(0028697) Hong Xu (reporter) 2012-02-21 21:53 |
This works well now. Thanks! |
(0028700) Brad King (manager) 2012-02-22 07:07 |
Wonderful, thanks for testing! |
(0030863) David Cole (manager) 2012-09-03 16:01 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-12-01 09:16 | Hong Xu | New Issue | |
2011-12-01 09:41 | Brad King | Note Added: 0027879 | |
2011-12-01 09:41 | Brad King | Summary | Always fail to check for bcc32.exe => Embarcadero C++ 6.42: Always fail to check for bcc32.exe |
2011-12-01 20:33 | Hong Xu | File Added: CMakeFiles.tar.gz | |
2011-12-01 20:34 | Hong Xu | Note Added: 0027881 | |
2011-12-02 09:12 | Brad King | Note Added: 0027884 | |
2011-12-02 09:31 | Brad King | Note Added: 0027885 | |
2011-12-02 09:38 | Brad King | Note Added: 0027886 | |
2011-12-02 10:42 | Brad King | Note Added: 0027891 | |
2011-12-02 10:46 | Brad King | Note Added: 0027892 | |
2011-12-02 11:02 | Brad King | Severity | major => feature |
2011-12-02 11:02 | Brad King | Status | new => acknowledged |
2011-12-02 11:02 | Brad King | Summary | Embarcadero C++ 6.42: Always fail to check for bcc32.exe => Add support for Embarcadero C++ 6.42 |
2011-12-02 22:38 | Hong Xu | File Added: Windows-Borland.cmake | |
2011-12-02 22:40 | Hong Xu | Note Added: 0027900 | |
2011-12-02 22:40 | Hong Xu | File Added: CMakeFiles.zip | |
2011-12-02 22:41 | Hong Xu | Note Added: 0027901 | |
2011-12-04 15:24 | elec | Note Added: 0027905 | |
2011-12-05 06:42 | Hong Xu | Note Added: 0027907 | |
2011-12-05 08:51 | Brad King | Note Added: 0027908 | |
2011-12-05 08:56 | Brad King | File Deleted: Windows-Borland.cmake | |
2011-12-05 08:57 | Brad King | Note Added: 0027909 | |
2011-12-05 09:04 | elec | File Added: Windows-Borland.cmake | |
2011-12-05 09:05 | elec | Note Added: 0027911 | |
2011-12-05 09:12 | elec | Note Edited: 0027911 | |
2011-12-05 09:31 | Brad King | Note Added: 0027912 | |
2011-12-05 09:40 | Hong Xu | Note Added: 0027913 | |
2011-12-05 10:13 | elec | Note Added: 0027914 | |
2011-12-05 10:17 | Brad King | Note Added: 0027915 | |
2011-12-05 10:26 | Brad King | Note Added: 0027916 | |
2011-12-05 11:34 | elec | Note Added: 0027917 | |
2011-12-07 07:16 | Oliver Weinheimer | Note Added: 0027932 | |
2011-12-07 10:17 | Brad King | Note Added: 0027933 | |
2011-12-12 06:16 | Hong Xu | Note Added: 0027946 | |
2011-12-12 09:23 | Brad King | Note Added: 0027947 | |
2011-12-13 00:13 | Hong Xu | Note Added: 0027954 | |
2012-02-20 10:16 | Brad King | Note Added: 0028645 | |
2012-02-20 10:16 | Brad King | Assigned To | => Brad King |
2012-02-20 10:16 | Brad King | Status | acknowledged => assigned |
2012-02-21 08:28 | Hong Xu | Note Added: 0028673 | |
2012-02-21 09:46 | Hong Xu | Note Added: 0028674 | |
2012-02-21 09:47 | Hong Xu | Note Edited: 0028674 | |
2012-02-21 09:48 | Hong Xu | File Added: CMakeFiles-2.zip | |
2012-02-21 09:48 | Hong Xu | Note Added: 0028675 | |
2012-02-21 09:50 | Hong Xu | Note Edited: 0028674 | |
2012-02-21 09:50 | Brad King | Note Added: 0028676 | |
2012-02-21 09:57 | Hong Xu | Note Added: 0028677 | |
2012-02-21 10:00 | Brad King | Note Added: 0028678 | |
2012-02-21 10:08 | Hong Xu | Note Added: 0028679 | |
2012-02-21 10:10 | Brad King | Note Added: 0028680 | |
2012-02-21 11:55 | Brad King | Note Added: 0028682 | |
2012-02-21 21:53 | Hong Xu | Note Added: 0028697 | |
2012-02-22 07:07 | Brad King | Note Added: 0028700 | |
2012-02-22 07:07 | Brad King | Status | assigned => resolved |
2012-02-22 07:07 | Brad King | Fixed in Version | => CMake 2.8.8 |
2012-02-22 07:07 | Brad King | Resolution | open => fixed |
2012-04-19 13:10 | David Cole | Target Version | => CMake 2.8.8 |
2012-09-03 16:01 | David Cole | Note Added: 0030863 | |
2012-09-03 16:01 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |