[CMake] mingw32 linker line exceeds win32 limitations
Dear CMake developer and users, I've encountered some probs with a an issue whitch already raised last year in the a post [1]. Mingw32-make (5.1.3) minds about a too long linker line. The project makes use of CMake for Makefile Generation, that's why I tend to ask here whether someone found a solution for the known problem. Searching the web didn't return any usefull results (beside the crappy behaviour of the win32 command.exe with line of more than 8xxx+ chars) The CMake version used, is the latest 2.4.7 precompiled win32 release. I'd like to prevent workarrounds like changing file or directory names or consolidating source file content... Any Ideas? Thanks for your response! Cheers, Felix [1] http://www.cmake.org/pipermail/cmake/2006-September/011286.html -- Dipl.-Inf.(FH) Felix Obenhuber OSB AG Ingenieur- und IT-Dienstleistungen Klenzestraße 38 80469 München Telefon: +49 (0)89/23 88 57-546 Telefax: +49 (0)89/23 88 57-40 http://www.osb-ag.de ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: Dear CMake developer and users, I've encountered some probs with a an issue whitch already raised last year in the a post [1]. Mingw32-make (5.1.3) minds about a too long linker line. The project makes use of CMake for Makefile Generation, that's why I tend to ask here whether someone found a solution for the known problem. Searching the web didn't return any usefull results (beside the crappy behaviour of the win32 command.exe with line of more than 8xxx+ chars) The CMake version used, is the latest 2.4.7 precompiled win32 release. I'd like to prevent workarrounds like changing file or directory names or consolidating source file content... Any Ideas? Thanks for your response! The MSVC compiler/linker solves this by using a sort-of "here" document: link32 @tmp_file_with_the_commands Check the CMake module for the MSVC compiler(s) to see how it is done in the context of CMake and apply that to the module used in the MingW32 case. (Well, this is a rough sketch only ;)) Regards, Arjen ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: > Dear CMake developer and users, > > I've encountered some probs with a an issue whitch already raised last > year in the a post [1]. > > Mingw32-make (5.1.3) minds about a too long linker line. The project > makes use of CMake for Makefile Generation, that's why I tend to ask > here whether someone found a solution for the known problem. Searching > the web didn't return any usefull results (beside the crappy behaviour > of the win32 command.exe with line of more than 8xxx+ chars) > > The CMake version used, is the latest 2.4.7 precompiled win32 release. > > I'd like to prevent workarrounds like changing file or directory names > or consolidating source file content... CMake uses a "link script" approach to avoid placing the entire link line in the makefile. It is enabled on certain generators (including MinGW) and used for linking libraries but has not been yet needed for executables. Is the target for which you're having problems a library or an executable target? -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Do, 2007-12-20 at 12:12 -0500, Brad King wrote: > Felix Obenhuber wrote: > CMake uses a "link script" approach to avoid placing the entire link > line in the makefile. It is enabled on certain generators (including > MinGW) and used for linking libraries but has not been yet needed for > executables. Is the target for which you're having problems a library > or an executable target? It's an executable target. I've solved the issue the way I've put almost all objects into a lib and linked the rest against. That's work. Thanks for your answer: Now I know why... Is there any reason, the link script is not used for binaries? We've got lots of files ;-)... Felix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: > On Do, 2007-12-20 at 12:12 -0500, Brad King wrote: >> Felix Obenhuber wrote: >> CMake uses a "link script" approach to avoid placing the entire link >> line in the makefile. It is enabled on certain generators (including >> MinGW) and used for linking libraries but has not been yet needed for >> executables. Is the target for which you're having problems a library >> or an executable target? > > It's an executable target. > > I've solved the issue the way I've put almost all objects into a lib and > linked the rest against. That's work. Thanks for your answer: Now I know > why... > > Is there any reason, the link script is not used for binaries? We've got > lots of files ;-)... There is not technical reason AFAIK. It was simply that lots of people hit the problem for static libraries and no one encountered (and reported) the problem for executables until now. Please submit an issue to the bug tracker and send me the bug number. Thanks, -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Do, 2007-12-20 at 12:41 -0500, Brad King wrote: > Please submit an issue > to the bug tracker and send me the bug number. Thanks a lot for your help. I'll do tmorrow! Wish you a nice time! Cheers, Felix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: Dear CMake developer and users, I've encountered some probs with a an issue whitch already raised last year in the a post [1]. Mingw32-make (5.1.3) minds about a too long linker line. To be picky, mingw32-make (i.e. GNU make) doesn't mind at all, but cmd.exe might. (Mingw32-make will happily use any bourne-shell it can get its hands on.) -- /Jesper ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Do, 2007-12-20 at 12:41 -0500, Brad King wrote: > There is not technical reason AFAIK. It was simply that lots of people > hit the problem for static libraries and no one encountered (and > reported) the problem for executables until now. Please submit an issue > to the bug tracker and send me the bug number. Done. The Id is: 6192 [1] Don't hestitate to contact me for further information/testing... Thanks, Felix [1] http://www.cmake.org/Bug/view.php?id=6192 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Do, 2007-12-20 at 21:02 +0100, Jesper Eskilson wrote: > To be picky, mingw32-make (i.e. GNU make) doesn't mind at all, but > cmd.exe might. (Mingw32-make will happily use any bourne-shell it can > get its hands on.) You're absolutely right. The problem is, that we're using mingw32 from Code::Blocks. So we would habe to change the default shell to something else than cmd.exe (or patch codeblocks). Think other probs will raise due our company workstation setup containins some bat scripts... Felix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: On Do, 2007-12-20 at 21:02 +0100, Jesper Eskilson wrote: To be picky, mingw32-make (i.e. GNU make) doesn't mind at all, but cmd.exe might. (Mingw32-make will happily use any bourne-shell it can get its hands on.) You're absolutely right. The problem is, that we're using mingw32 from Code::Blocks. So we would habe to change the default shell to something else than cmd.exe (or patch codeblocks). Unless Code::Blocks has a specially patched GNU make which is hardcoded to cmd.exe there shouldn't be any difficulty to get your make to use sh.exe (Cygwin's, for example). In fact, I've had trouble the other way around; forcing GNU make to use cmd.exe in the presence of Cygwin's sh.exe in PATH. Think other probs will raise due our company workstation setup containins some bat scripts... That is only a problem if you have cmd.exe-specific stuff in your makefile-invocations. -- /Jesper ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Fr, 2007-12-21 at 10:14 +0100, Jesper Eskilson wrote: > Unless Code::Blocks has a specially patched GNU make which is hardcoded > to cmd.exe there shouldn't be any difficulty to get your make to use > sh.exe (Cygwin's, for example). Ok. > > Think other probs will raise due our company workstation setup > > containins some bat scripts... > > That is only a problem if you have cmd.exe-specific stuff in your > makefile-invocations. I thought about (the quick and dirty way) replacing the default system shell - remember I did that some year ago when working with windos boxes. But if CodeBlocks has a hard coded setup to cmd.exe that wouldn't help either... Yesterday I've invoked mingw32-make from a cywin shell. Think I got the same error though - but maybe I missed something else. I'll give it another try next gregorian year. Cheers, Felix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Fr, 2007-12-21 at 10:41 +0100, Felix Obenhuber wrote: > Done. The Id is: 6192 [1] Thanks Brad for fixing! Works like a charm! Cheers, Felix ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Felix Obenhuber wrote: > On Fr, 2007-12-21 at 10:41 +0100, Felix Obenhuber wrote: >> Done. The Id is: 6192 [1] > > Thanks Brad for fixing! Works like a charm! No problem. It actually cleaned up the implementation used for library linking too. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Gonzalo Garramuño wrote: > Brad King wrote: >> >> CMake uses a "link script" approach to avoid placing the entire link >> line in the makefile. It is enabled on certain generators (including >> MinGW) and used for linking libraries but has not been yet needed for >> executables. Is the target for which you're having problems a library >> or an executable target? >> > > Is this the same as it is used with the NMake Generator? > > If so, please don't make this the default. It makes it impossible to > see what the link line is when "make VERBOSE=1". > > Or just have it turn on only when the line actually does exceed the limits. The fix is already in CMake HEAD in CVS. It is not the "response file" stuff used for NMake. The link line should be displayed in verbose mode. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
On Jan 3, 2008, at 7:43 AM, Gonzalo Garramuño wrote: Brad King wrote: CMake uses a "link script" approach to avoid placing the entire link line in the makefile. It is enabled on certain generators (including MinGW) and used for linking libraries but has not been yet needed for executables. Is the target for which you're having problems a library or an executable target? Is this the same as it is used with the NMake Generator? If so, please don't make this the default. It makes it impossible to see what the link line is when "make VERBOSE=1". Or just have it turn on only when the line actually does exceed the limits. Better yet, could we have "make VERBOSE=1" spit out the temporary file as well? I've been irratated by not being able to see the contents of the compilation command, because it's hidden inside a file. James___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] mingw32 linker line exceeds win32 limitations
Brad King wrote: CMake uses a "link script" approach to avoid placing the entire link line in the makefile. It is enabled on certain generators (including MinGW) and used for linking libraries but has not been yet needed for executables. Is the target for which you're having problems a library or an executable target? Is this the same as it is used with the NMake Generator? If so, please don't make this the default. It makes it impossible to see what the link line is when "make VERBOSE=1". Or just have it turn on only when the line actually does exceed the limits. -- Gonzalo Garramuño [EMAIL PROTECTED] AMD4400 - ASUS48N-E GeForce7300GT Xubuntu Gutsy ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake