Opened 19 years ago

Closed 17 years ago

#258 closed Bugs (Fixed)

failure in boost jam unit tests on cygwin

Reported by: cakoose Owned by: René Rivera
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

Boost Jam Version 3.1.9

The unit tests seem to assume that the "/cygdrive"
mount exists.  I had changed mine to "/drive" and when
I tried to build, I got an assertion failure:

assertion "self->size < self->capacity" failed: file
"strings.c", line 16

self->size == -165761813
self->capacity == 64

backtrace:
   assert_invariants (strings.c:15)
   string_free (strings.c:44)
   var_expand (expand.c:410)
   var_expand_unit_test (expand.c:696)
   run_unit_tets (jam.c:197)
   main (jam.c:299)

Even if it's not worth it to accomodate non-standard
Cygwin setups such as mine, I wouldn't expect the
assertion failure to occur in strings.c.

I think this can be reproduced by changing the
"/cygdrive/c/foo/bar" string constants to invalid paths
(in expand.c on lines 682 and 702)

Change History (2)

comment:1 by ethouris327, 18 years ago

Logged In: YES 
user_id=1196273

The file 'expand.c' contains hardcoded path to the virtual 
drive directory '/cygdrive'. This is INVALID.

Please, regard that not all users have left this path as 
default. For example, I use "/drive". Now that I changed this 
path to start from /drive, Jam works. If you have already 
recognized the system as Cygwin, you can use various ways 
to read the Cygwin's drive path.

You can try to read from this file:

"/proc/registry/HKEY_LOCAL_MACHINE/software/Cygnus 
Solutions/Cygwin/mounts v2/cygdrive prefix"

Or the same for HKEY_CURRENT_USER.

Alternatively you can read this value by using 'regtool'.

Another, much simpler way is to read output of this command:

cygpath -u C:

Which should display /cygdrive/c, /drive/c or how the user 
configured his cygpath (mount -c). The C: need not be valid 
device to run this command.


comment:2 by René Rivera, 17 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.