Single Letter Omissions From File Path In Linker

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Single Letter Omissions From File Path In Linker

Randy Turner
Hello! I've been running into a frustrating issue on and off for the past year. The project will build the source files correctly but when it comes to linking the executables, I always get the same error. The specific file varies, but the failure mode is always the same. For example:

<Linking>
"C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>", line xxx: error #10008-D: cannot find file
"C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"

As you can see, the file path is missing a "t" in the first occurrence of the word "iterator" and so that file definitely does not exist. A file exists in the location with correct spelling, but somehow that hardcoded path in that temporary file has dropped a letter. The specific letter that gets dropped varies along with which file is allegedly missing. We noticed that requiring people to store the repository in their root directory greatly cut down on the occurrence of this issue but it is returning with more frequency as of late. Once it occurs once, CMake builds are never successful again and the only way that I have been able to completely clear the problem has been to reinstall Windows and set up the build environment again. 

Has anyone else seen this issue? Is there a way to change the directory for those linker files so that they're not in the Temp folder?


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Andrew Bell
On Fri, Oct 14, 2016 at 9:04 AM, Randy Turner <[hidden email]> wrote:
Hello! I've been running into a frustrating issue on and off for the past year. The project will build the source files correctly but when it comes to linking the executables, I always get the same error. The specific file varies, but the failure mode is always the same. For example:

<Linking>
"C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>", line xxx: error #10008-D: cannot find file
"C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"

As you can see, the file path is missing a "t" in the first occurrence of the word "iterator" and so that file definitely does not exist. A file exists in the location with correct spelling, but somehow that hardcoded path in that temporary file has dropped a letter. The specific letter that gets dropped varies along with which file is allegedly missing. We noticed that requiring people to store the repository in their root directory greatly cut down on the occurrence of this issue but it is returning with more frequency as of late. Once it occurs once, CMake builds are never successful again and the only way that I have been able to completely clear the problem has been to reinstall Windows and set up the build environment again.

This seems really, really strange.  Have to reinstall Windows?  What about just using another build directory?  It sure *seems* like there's some problem in your CMakeFiles.txt where the way the filepath is being constructed is incorrect.  But I don't think you've really provided enough information to determine the problem.  Where does the name of the object file come from?

--
Andrew Bell
[hidden email]

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Bill Hoffman
In reply to this post by Randy Turner
On 10/14/2016 10:04 AM, Randy Turner wrote:

> Hello! I've been running into a frustrating issue on and off for the
> past year. The project will build the source files correctly but when it
> comes to linking the executables, I always get the same error. The
> specific file varies, but the failure mode is always the same. For example:
>
> <Linking>
> "C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>", line
> xxx: error #10008-D: cannot find file
> "C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"
>
> As you can see, the file path is missing a "t" in the first occurrence
> of the word "iterator" and so that file definitely does not exist. A
> file exists in the location with correct spelling, but somehow that
> hardcoded path in that temporary file has dropped a letter. The specific
> letter that gets dropped varies along with which file is allegedly
> missing. We noticed that requiring people to store the repository in
> their root directory greatly cut down on the occurrence of this issue
> but it is returning with more frequency as of late. Once it occurs once,
> CMake builds are never successful again and the only way that I have
> been able to completely clear the problem has been to reinstall Windows
> and set up the build environment again.
>
> Has anyone else seen this issue? Is there a way to change the directory
> for those linker files so that they're not in the Temp folder?
What generator are you using?  What version of CMake?

-Bill

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Zan Lynx
In reply to this post by Randy Turner
On 10/14/2016 08:04 AM, Randy Turner wrote:
> As you can see, the file path is missing a "t" in the first occurrence
> of the word "iterator" and so that file definitely does not exist. A
> file exists in the location with correct spelling, but somehow that
> hardcoded path in that temporary file has dropped a letter. The specific
> letter that gets dropped varies along with which file is allegedly missing.

If this was all happening on the same computer I would suspect a
hardware error in the RAM and I'd recommend running a night-long memory
test.

If this is happening on several different machines, then I don't know.
It could be something that is manipulating the path name with a regular
expression, or otherwise editing it.

If the missing letters were immediately after a back-slash (\) then I'd
suspect improper escape handling. But that doesn't seem to be it either.
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Randy Turner
In reply to this post by Andrew Bell
Thanks, Andrew, Bill, and Zan! I'm not completely certain that reinstalling Windows is the only or even the best solution, but once we all moved our repositories into our root directories I have not found another solution, even temporary. Of our six dev machines, it is a recurring problem on two and has occurred once on a third. The other three have never seen this problem.

I did some digging on Friday and found that the problem seems to be connected to this call below to add all of our code files to a library to be used an item in the add_executable() command for each of our targets.

foreach (code ${code_files})
    get_filename_component (codeName ${code} NAME_WE)
    add_library (${codeName} OBJECT
     ${code}
  )
  list(APPEND codelib $<TARGET_OBJECTS:${codeName}>)
endforeach()

If I remove that loop and add code_files instead of codelib to the executables then the problem disappears, but this breaks most of the functionality of my implementation of CMake, so this isn't a long-term solution. Using the library call above I followed the file paths around the script and printed them out at every step through the makefile generation and never saw any incorrect paths, but then I called the compiler and saw it error out. 

The project uses "Unix Makefiles" to run on TI's gmake compiler 7.4.14. I'm have been using CMake 3.5.2. I upgraded to 3.6.2 and continue to see the same problem. I will move forward with looking into this library issue but I'm sure what I expect to find.

On Fri, Oct 14, 2016 at 10:16 AM, Andrew Bell <[hidden email]> wrote:
On Fri, Oct 14, 2016 at 9:04 AM, Randy Turner <[hidden email]> wrote:
Hello! I've been running into a frustrating issue on and off for the past year. The project will build the source files correctly but when it comes to linking the executables, I always get the same error. The specific file varies, but the failure mode is always the same. For example:

<Linking>
"C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>", line xxx: error #10008-D: cannot find file
"C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"

As you can see, the file path is missing a "t" in the first occurrence of the word "iterator" and so that file definitely does not exist. A file exists in the location with correct spelling, but somehow that hardcoded path in that temporary file has dropped a letter. The specific letter that gets dropped varies along with which file is allegedly missing. We noticed that requiring people to store the repository in their root directory greatly cut down on the occurrence of this issue but it is returning with more frequency as of late. Once it occurs once, CMake builds are never successful again and the only way that I have been able to completely clear the problem has been to reinstall Windows and set up the build environment again.

This seems really, really strange.  Have to reinstall Windows?  What about just using another build directory?  It sure *seems* like there's some problem in your CMakeFiles.txt where the way the filepath is being constructed is incorrect.  But I don't think you've really provided enough information to determine the problem.  Where does the name of the object file come from?

--
Andrew Bell
[hidden email]


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Bill Hoffman
Can you create a small example that shows the problem?  Even a small
full example with the code you have below so I can better understand it.

-Bill


On 10/17/2016 10:59 AM, Randy Turner wrote:

> Thanks, Andrew, Bill, and Zan! I'm not completely certain that
> reinstalling Windows is the only or even the best solution, but once we
> all moved our repositories into our root directories I have not found
> another solution, even temporary. Of our six dev machines, it is a
> recurring problem on two and has occurred once on a third. The other
> three have never seen this problem.
>
> I did some digging on Friday and found that the problem seems to be
> connected to this call below to add all of our code files to a library
> to be used an item in the add_executable() command for each of our targets.
>
> foreach (code ${code_files})
>     get_filename_component (codeName ${code} NAME_WE)
>     add_library (${codeName} OBJECT
>      ${code}
>   )
>   list(APPEND codelib $<TARGET_OBJECTS:${codeName}>)
> endforeach()
>
> If I remove that loop and add code_files instead of codelib to the
> executables then the problem disappears, but this breaks most of the
> functionality of my implementation of CMake, so this isn't a long-term
> solution. Using the library call above I followed the file paths around
> the script and printed them out at every step through the makefile
> generation and never saw any incorrect paths, but then I called the
> compiler and saw it error out.
>
> The project uses "Unix Makefiles" to run on TI's gmake compiler 7.4.14.
> I'm have been using CMake 3.5.2. I upgraded to 3.6.2 and continue to see
> the same problem. I will move forward with looking into this library
> issue but I'm sure what I expect to find.
>
> On Fri, Oct 14, 2016 at 10:16 AM, Andrew Bell <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On Fri, Oct 14, 2016 at 9:04 AM, Randy Turner
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Hello! I've been running into a frustrating issue on and off for
>         the past year. The project will build the source files correctly
>         but when it comes to linking the executables, I always get the
>         same error. The specific file varies, but the failure mode is
>         always the same. For example:
>
>         <Linking>
>         "C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>",
>         line xxx: error #10008-D: cannot find file
>         "C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"
>
>         As you can see, the file path is missing a "t" in the first
>         occurrence of the word "iterator" and so that file definitely
>         does not exist. A file exists in the location with correct
>         spelling, but somehow that hardcoded path in that temporary file
>         has dropped a letter. The specific letter that gets dropped
>         varies along with which file is allegedly missing. We noticed
>         that requiring people to store the repository in their root
>         directory greatly cut down on the occurrence of this issue but
>         it is returning with more frequency as of late. Once it occurs
>         once, CMake builds are never successful again and the only way
>         that I have been able to completely clear the problem has been
>         to reinstall Windows and set up the build environment again.
>
>
>     This seems really, really strange.  Have to reinstall Windows?  What
>     about just using another build directory?  It sure *seems* like
>     there's some problem in your CMakeFiles.txt where the way the
>     filepath is being constructed is incorrect.  But I don't think
>     you've really provided enough information to determine the problem.
>     Where does the name of the object file come from?
>
>     --
>     Andrew Bell
>     [hidden email] <mailto:[hidden email]>
>
>
>
>


--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
[hidden email]
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Single Letter Omissions From File Path In Linker

Max Smolens
In reply to this post by Randy Turner
Hi Randy,

The missing character issue is likely due to some stage of your build process hitting a command line length limit on Windows. Similar problems have been described in 3D Slicer builds [1] [2], although in that case the problems were related to (a) many include directories and (b) explicitly passing a long command line to add_custom_command().

Your project may be different, because the error occurs while linking, but hopefully these references help.

Thanks,
Max



On Mon, Oct 17, 2016 at 10:59 AM, Randy Turner <[hidden email]> wrote:
Thanks, Andrew, Bill, and Zan! I'm not completely certain that reinstalling Windows is the only or even the best solution, but once we all moved our repositories into our root directories I have not found another solution, even temporary. Of our six dev machines, it is a recurring problem on two and has occurred once on a third. The other three have never seen this problem.

I did some digging on Friday and found that the problem seems to be connected to this call below to add all of our code files to a library to be used an item in the add_executable() command for each of our targets.

foreach (code ${code_files})
    get_filename_component (codeName ${code} NAME_WE)
    add_library (${codeName} OBJECT
     ${code}
  )
  list(APPEND codelib $<TARGET_OBJECTS:${codeName}>)
endforeach()

If I remove that loop and add code_files instead of codelib to the executables then the problem disappears, but this breaks most of the functionality of my implementation of CMake, so this isn't a long-term solution. Using the library call above I followed the file paths around the script and printed them out at every step through the makefile generation and never saw any incorrect paths, but then I called the compiler and saw it error out. 

The project uses "Unix Makefiles" to run on TI's gmake compiler 7.4.14. I'm have been using CMake 3.5.2. I upgraded to 3.6.2 and continue to see the same problem. I will move forward with looking into this library issue but I'm sure what I expect to find.

On Fri, Oct 14, 2016 at 10:16 AM, Andrew Bell <[hidden email]> wrote:
On Fri, Oct 14, 2016 at 9:04 AM, Randy Turner <[hidden email]> wrote:
Hello! I've been running into a frustrating issue on and off for the past year. The project will build the source files correctly but when it comes to linking the executables, I always get the same error. The specific file varies, but the failure mode is always the same. For example:

<Linking>
"C:\\Users\\User\\AppData\\Local\\Temp\\<six digit temp file>", line xxx: error #10008-D: cannot find file
"C:/Repos/operatingsystem/CMakeFiles/nvm_validate_ierator.dir/os/nvm/nvm_validate_iterator.c.obj"

As you can see, the file path is missing a "t" in the first occurrence of the word "iterator" and so that file definitely does not exist. A file exists in the location with correct spelling, but somehow that hardcoded path in that temporary file has dropped a letter. The specific letter that gets dropped varies along with which file is allegedly missing. We noticed that requiring people to store the repository in their root directory greatly cut down on the occurrence of this issue but it is returning with more frequency as of late. Once it occurs once, CMake builds are never successful again and the only way that I have been able to completely clear the problem has been to reinstall Windows and set up the build environment again.

This seems really, really strange.  Have to reinstall Windows?  What about just using another build directory?  It sure *seems* like there's some problem in your CMakeFiles.txt where the way the filepath is being constructed is incorrect.  But I don't think you've really provided enough information to determine the problem.  Where does the name of the object file come from?

--
Andrew Bell
[hidden email]


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake