[SERVER-10164] Long variant directory names break Windows builds Created: 10/Jul/13  Updated: 14/Jul/15  Resolved: 14/Jul/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: build-needs-definition, build-planning
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Related
is related to SERVER-17789 Remove options influenced variant dir... Closed
Operating System: ALL
Participants:

 Description   

Really long variant directories seem to break the build:

C:\cygwin\home\andrew\Documents\10gen\dev\src\mongodb\src\mongo\base\make_string_vector.cpp : fatal error C1083: Cannot open compiler generated file: 'build\win32\64\cpppath_C_cygwin_home_andrew_Documents_10gen_dev_opt_include_boost-1_53\libpath_C_cygwin_home_andrew_Documents_10gen_dev_opt\release\use-system-all\client_build\mongo\base\make_string_vector.obj': No such file or directory

I don't entirely understand this, since this is not as long as the windows path maximum, but editing the SConstruct and hacking get_variant_dir to return a shorter path does fix the problem.



 Comments   
Comment by Andrew Morrow (Inactive) [ 13/Jul/15 ]

Yes, should no longer be an issue.

Comment by Ernie Hershey [ 13/Jul/15 ]

acm is this still an issue? Did your recent scons work in SERVER-17789 fix this?

Comment by Andrew Morrow (Inactive) [ 10/Jul/13 ]

Yes, the absolute pathname is too long. Part of the problem is the encoding of the include path and lib path into the variant directory.

However, SUBST isn't great since customers trying to build the driver won't know to do it: the build will just break.

One possibility might be to use 'extended' path syntax: '\\?\'. However, there is no way to specify a relative path (how did they miss that?). But perhaps we can 'realpath' the variant directory and add the extended path prefix to it? I wonder if python will honor that?

Comment by Eric Milkie [ 10/Jul/13 ]

it's probably the absolute pathname that's too long? It prepends your exceptionally long current directory to that long relative path to the obj file.
You can use SUBST to help this. Hooray for MS-DOS!

Generated at Thu Feb 08 03:22:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.