[CMake] windows link error

2010-03-04 Thread Simmons, Aaron
I am trying to use cmake v2.8.0 on Windows XP to link a library.  On Mac OS X 
and Linux, it works.  But on Windows I get a very strange error:
C:\strawberry\c\bin\ld.exe: /lib: No such file: No such file or 
directory

The only thing I can think of is that this is some kind of reference to 
Strawberry Perl, which I don't even have installed.  My project, btw, has 
nothing to do with Pearl-- its C++.

Why isn't it using the path to the MSVC ld?  It does so for the cl tool.

Here is the full cmake/nmake output:


cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Documents and Settings/asimmons/My 
Documents/Development/sre/branches/cmake/build

nmake VERBOSE=1

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

C:\Program Files\CMake 2.8\bin\cmake.exe -HC:\Documents and 
Settings\asimmons\My Documents\Development\sre\branches\cmake -BC:\Documents 
and Settings\asimmons\My Documents\Development\sre\branches\cmake\build 
--check-build-system CMakeFiles\Makefile.cmake 0
C:\Program Files\CMake 2.8\bin\cmake.exe -E cmake_progress_start 
C:\Documents and Settings\asimmons\My 
Documents\Development\sre\branches\cmake\build\CMakeFiles C:\Documents and 
Settings\asimmons\My 
Documents\Development\sre\branches\cmake\build\CMakeFiles\progress.marks
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe -f 
CMakeFiles\Makefile2 /nologo -   all
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe -f 
CMakeFiles\sonic.dir\build.make /nologo -L  
CMakeFiles\sonic.dir\depend
C:\Program Files\CMake 2.8\bin\cmake.exe -E cmake_depends NMake 
Makefiles C:\Documents and Settings\asimmons\My 
Documents\Development\sre\branches\cmake C:\Documents and 
Settings\asimmons\My Documents\Development\sre\branches\cmake C:\Documents 
and Settings\asimmons\My Documents\Development\sre\branches\cmake\build 
C:\Documents and Settings\asimmons\My 
Documents\Development\sre\branches\cmake\build C:\Documents and 
Settings\asimmons\My Documents\Development\sre\branches\cmak
e\build\CMakeFiles\sonic.dir\DependInfo.cmake --color=
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe -f 
CMakeFiles\sonic.dir\build.make /nologo -L  
CMakeFiles\sonic.dir\build
Linking CXX static library sonic.lib
C:\Program Files\CMake 2.8\bin\cmake.exe -P 
CMakeFiles\sonic.dir\cmake_clean_target.cmake
C:\strawberry\c\bin\ld.exe /lib /nologo  /out:sonic.lib 
@CMakeFiles\sonic.dir\objects1.rsp
The system cannot find the path specified.
NMAKE : fatal error U1077: 'C:\strawberry\c\bin\ld.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 
9.0\VC\BIN\nmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 
9.0\VC\BIN\nmake.exe' : return code '0x2'
Stop.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] windows link error

2010-03-04 Thread Andreas Pakulat
On 04.03.10 17:08:32, Simmons, Aaron wrote:
 I am trying to use cmake v2.8.0 on Windows XP to link a library.  On Mac OS X 
 and Linux, it works.  But on Windows I get a very strange error:
   C:\strawberry\c\bin\ld.exe: /lib: No such file: No such file or 
 directory
 
 The only thing I can think of is that this is some kind of reference to 
 Strawberry Perl, which I don't even have installed.  My project, btw, has 
 nothing to do with Pearl-- its C++.
 
 Why isn't it using the path to the MSVC ld?  It does so for the cl tool.

MSVC has no ld, MSVC's compiler is cl.exe, the linker is called
link.exe. So it looks like your environment is somehow strange. Can
you post the output of set? 

Andreas

-- 
You will lose your present job and have to become a door to door mayonnaise
salesman.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] windows link error

2010-03-04 Thread Simmons, Aaron
You're right-- msvc uses link; I was thinking of gcc's ld.  I guess the 
question is why is it trying to use ld at all?  Cmake successfully detects 
that its using msvc/nmake, as it compiles all of the .c files with cl.  It's 
the lib-linking step that falls down.

Here is my set output:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\asimmons\Application Data
ARTISYNTH_HOME=C:\artisynth_2.2
ARTISYNTH_PATH=.;C:\artisynth_2.2

CLASSPATH=.;C:\artisynth_2.2\classes;C:\artisynth_2.2\lib\jogl.jar;C:\artisynth_2.2\lib\argparser.jar;C:\artisynth_2.2\lib\jass.jar;C:\artisynth_2.2\lib\quickhull3d.jar;C:\artisynth_2.2\lib\jmf.jar;C:\Program
 Files\Java\jre6\lib\ext\QTJava.zip
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=ASIMMONS-WIN
ComSpec=C:\WINDOWS\system32\cmd.exe
DevEnvDir=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
FP_NO_HOST_CHECK=NO
Framework35Version=v3.5
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
FrameworkVersion=v2.0.50727
FTP_PASSIVE=1
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\asimmons
INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program 
Files\Microsoft SDKs\Windows\v6.0A\include;
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10\
LIB=C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;C:\Program 
Files\Microsoft SDKs\Windows\v6.0A\lib;

LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program
 Files\Microsoft Visual Studio 9.0\VC\LIB;
LOGONSERVER=\\RSBLDRDC1
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program 
Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual 
Studio 
9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program
 Files\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft 
SDKs\Windows\v6.0A\bin;C:\Program Files\CollabNet Subversion;C:\Program 
Files\PHP\;c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\artisynth_2.2\lib\Windows;C:\Program
 Files\CollabNet Subversion;C:\Program Files\Notepad++\;C:\ant\bin\;C:\Program 
Files\lynx\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;\;C:\Program 
Files\PHP\;C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program 
Files\GnuWin32\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CollabNet 
Subversion;C:\ffmpeg\bin;C:\sox;C:\lame;C:\MinGW\bin;C:\Program 
Files\netcat;C:\Program Files\010 Editor v3;C:\Program 
Files\SWFTools;C:\Program Files\WinMerge;C:\Pr
 ogram Files\QuickTime\QTSystem\;C:\Program Files\CMake 2.8\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW;.PSC1
PHPRC=C:\Program Files\PHP\
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 4, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0604
ProgramFiles=C:\Program Files
PROMPT=$G
QTJAVA=C:\Program Files\Java\jre6\lib\ext\QTJava.zip
RUBYOPT=-rubygems
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\asimmons\LOCALS~1\Temp
TERM=dumb
TMP=C:\DOCUME~1\asimmons\LOCALS~1\Temp
USERDNSDOMAIN=ROSETTASTONE.LOCAL
USERDOMAIN=ROSETTASTONE
USERNAME=asimmons
USERPROFILE=C:\Documents and Settings\asimmons
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
windir=C:\WINDOWS
WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Andreas Pakulat
Sent: Thursday, March 04, 2010 15:23
To: cmake@cmake.org
Subject: Re: [CMake] windows link error

On 04.03.10 17:08:32, Simmons, Aaron wrote:
 I am trying to use cmake v2.8.0 on Windows XP to link a library.  On Mac OS X 
 and Linux, it works.  But on Windows I get a very strange error:
   C:\strawberry\c\bin\ld.exe: /lib: No such file: No such file or 
 directory
 
 The only thing I can think of is that this is some kind of reference to 
 Strawberry Perl, which I don't even have installed.  My project, btw, has 
 nothing to do with Pearl-- its C++.
 
 Why isn't it using the path to the MSVC ld?  It does so for the cl tool.

MSVC has no ld, MSVC's compiler is cl.exe, the linker is called
link.exe. So it looks like your environment is somehow strange. Can
you post the output of set? 

Andreas

-- 
You will lose your present job and have to become a door to door mayonnaise
salesman.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http

Re: [CMake] windows link error

2010-03-04 Thread Andreas Pakulat
On 04.03.10 17:27:56, Simmons, Aaron wrote:
 You're right-- msvc uses link; I was thinking of gcc's ld.  I guess the 
 question is why is it trying to use ld at all?  Cmake successfully detects 
 that its using msvc/nmake, as it compiles all of the .c files with cl.  
 It's the lib-linking step that falls down.
 
 Here is my set output:

Hmm, can't see anything suspicious. What's in the cmake cache? Is the
ld.exe mentioned there?

Andreas

-- 
Learn to pause -- or nothing worthwhile can catch up to you.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] windows link error

2010-03-04 Thread Mateusz Loskot
Andreas Pakulat wrote:
 On 04.03.10 17:27:56, Simmons, Aaron wrote:
 You're right-- msvc uses link; I was thinking of gcc's ld.  I guess
 the question is why is it trying to use ld at all?  Cmake successfully
 detects that its using msvc/nmake, as it compiles all of the .c files
 with cl.  It's the lib-linking step that falls down.

 Here is my set output:

 Hmm, can't see anything suspicious. What's in the cmake cache? Is the
 ld.exe mentioned there?

Perhaps, Aaron's problem is caused by some commands hardcoded
in CMake files. ld.exe looks to me as MinGW (or Cygwin) utility
And, perhaps, the CMake configuration assumes that Windows build
is done using MinGW.

Best regards,
-- 
Mateusz Loskot
http://mateusz.loskot.net

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] windows link error

2010-03-04 Thread Simmons, Aaron
Thanks-- the cmake cache is where the trouble is:
CMAKE_LINKER:FILEPATH=C:/strawberry/c/bin/ld.exe

I used to have strawberry perl installed a while ago, but it's now uninstalled. 
 I guess I ran cmake back then and it cached the wrong linker.  Rerunning cmake 
doesn't seem to overwrite the cache, so I clobbered the whole folder and reran 
cmake.  Now it's using msvc's link.

I'm not sure where the bug is (if there is one).  Should re-running cmake 
recreate the cache?  Why does the presence of strawberry perl confuse cmake?


-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Andreas Pakulat
Sent: Thursday, March 04, 2010 15:39
To: cmake@cmake.org
Subject: Re: [CMake] windows link error

On 04.03.10 17:27:56, Simmons, Aaron wrote:
 You're right-- msvc uses link; I was thinking of gcc's ld.  I guess the 
 question is why is it trying to use ld at all?  Cmake successfully detects 
 that its using msvc/nmake, as it compiles all of the .c files with cl.  
 It's the lib-linking step that falls down.
 
 Here is my set output:

Hmm, can't see anything suspicious. What's in the cmake cache? Is the
ld.exe mentioned there?

Andreas

-- 
Learn to pause -- or nothing worthwhile can catch up to you.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] windows link error

2010-03-04 Thread Tyler Roscoe
On Thu, Mar 04, 2010 at 06:19:03PM -0500, Simmons, Aaron wrote:
 Thanks-- the cmake cache is where the trouble is:
   CMAKE_LINKER:FILEPATH=C:/strawberry/c/bin/ld.exe

 I'm not sure where the bug is (if there is one).  Should re-running
 cmake recreate the cache?  Why does the presence of strawberry perl
 confuse cmake?

If CMake recreated the cache each time, it wouldn't be much of a cache
now would it :)?

Semi-educated guess: CMake was looking for things that looked like
linkers in your PATH. For whatever reason (running CMake from an
environment where that magic Visual Studio .bat file hadn't been sourced
and thus your environment was incomplete), it didn't find the VS linker
so it kept looking and found something called ld.exe in your PATH.

It's hard to say whether this is a bug because we don't know anything
about your environment. If you can reproduce this problem, I'm sure the
experts would like to see it. But if all you have a is a CMake binary
directory of unknown age and origin, that's not so helpful.

tyler
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake