Notes |
|
(0027879)
|
Brad King
|
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
|
2011-12-01 20:34
|
|
|
|
(0027884)
|
Brad King
|
2011-12-02 09:12
|
|
|
|
(0027885)
|
Brad King
|
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
|
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
|
2011-12-02 10:42
|
|
|
|
(0027892)
|
Brad King
|
2011-12-02 10:46
|
|
|
|
(0027900)
|
Hong Xu
|
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
|
2011-12-02 22:41
|
|
The new CMakeFiles.zip has been also uploaded here. |
|
|
(0027905)
|
elec
|
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
|
2011-12-05 06:42
|
|
Unfortunately, the result is the same: same output. It does not work with it. |
|
|
(0027908)
|
Brad King
|
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
|
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
|
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
|
2011-12-05 09:31
|
|
|
|
(0027913)
|
Hong Xu
|
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
|
2011-12-05 10:13
|
|
|
|
(0027915)
|
Brad King
|
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
|
2011-12-05 10:26
|
|
|
|
(0027917)
|
elec
|
2011-12-05 11:34
|
|
|
|
(0027932)
|
Oliver Weinheimer
|
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
|
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
|
2011-12-12 06:16
|
|
May I ask that when will this feature be available?
Thanks. |
|
|
(0027947)
|
Brad King
|
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
|
2011-12-13 00:13
|
|
What a pity! I am looking forward to it in 2.8.8. |
|
|
(0028645)
|
Brad King
|
2012-02-20 10:16
|
|
|
|
(0028673)
|
Hong Xu
|
2012-02-21 08:28
|
|
|
|
(0028674)
|
Hong Xu
|
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
|
2012-02-21 09:48
|
|
The CMakeFiles directory is uploaded as CMakeFiles-2.zip |
|
|
(0028676)
|
Brad King
|
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
|
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
|
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
|
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
|
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
|
2012-02-21 11:55
|
|
|
|
(0028697)
|
Hong Xu
|
2012-02-21 21:53
|
|
This works well now. Thanks! |
|
|
(0028700)
|
Brad King
|
2012-02-22 07:07
|
|
Wonderful, thanks for testing! |
|
|
(0030863)
|
David Cole
|
2012-09-03 16:01
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|