views:

90

answers:

1

Hello again, StackOverflow!

Today's issue is a bit odd, but please bear with me. Any advice / suggestions extremely appreciated!

I've inherited an old codebase on a project with some components that date back to 2002. There is no documentation at all for this project, and the original machine which had the build set up on no longer exists (the hard drive failed and there is no backup available...). The system interacts with, and controls, a robot arm. I have a full installation and the executable installed on a test machine with the appropriate hardware. The source is on a Subversion repository, but the logging messages are minimal and give no practical advice. It has been worked upon as recently as January but the developers left before I started. It was partially re-written with a new C#-based GUI. The project consists of C++, C++/CLI, and C#. It uses Boost and VTK. My problem, in a nutshell, is this: there is a client-critical bug in the control part of the software and I cannot build the project. There are no debugging symbols available and attaching the running exe doesn't work (probable reasons why below). Neither the pre-C# versions or the most up-to-date source build at all under any configuration I've tried.

To complicate matters further, it has been suggested - though I'm not sure about this - that the project used to be built via Borland C++ Builder V6, and has been since migrated across to Visual Studio. It still contains Borland-specific components, although most of these seem be conditional.

My manager swears that it will not build under VS, and must be compiled fully in Borland. The problem is that I can't get it to build in either without dozens of errors. There are definitely Borland-specific components (BPL files) but I don't know what they are or how they relate to the structure of the project.

I'm wondering if it needs to be built in Borland and then VS, or something like that. So, my question is: is there any way to try and deduce how to build this thing or is it just a question of trying every option until I hit the right one?

EDIT: error log follows. Please note: I'm well acquainted with VS but I've never used Borland until a couple of days ago. Noob alert!

  • Borland C++ Builder 6 requests several .bpi files, which are missing (the corresponding .bpl files are available from the installation on the test machine).

  • Executing the pre-build batch file seems to execute without errors.

  • I've downloaded a trial version of C++ Builder 2010, and have imported the project in. Executing 'Build All' on what seems to be the correct targer I get the following errors (after some prompts for missing files...I've tried to set the linker and compilation options to avoid these, though to be honest I don't know whether these are external dependencies or Borland components that haven't been installed)

    Checking project dependencies... Building LoggingDebug.cbproj (Debug configuration)

    [BCC32 Error] is_array.hpp(40): E2430 Number of template parameters does not match in redeclaration of 'is_array'

    [BCC32 Error] is_array.hpp(40): E2428 Templates must be classes or functions

    [BCC32 Error] is_array.hpp(41): E2430 Number of template parameters does not match in redeclaration of 'is_array'

    [BCC32 Error] is_array.hpp(41): E2428 Templates must be classes or functions

    [BCC32 Error] is_array.hpp(42): E2430 Number of template parameters does not match in redeclaration of 'is_array'

    [BCC32 Error] is_array.hpp(42): E2428 Templates must be classes or functions

    [BCC32 Error] is_array.hpp(43): E2430 Number of template parameters does not match in redeclaration of 'is_array'

    [BCC32 Error] is_array.hpp(43): E2428 Templates must be classes or functions

    [BCC32 Error] ct_if.hpp(31): E2238 Multiple declaration for 'ct_and::type'

    [BCC32 Error] ct_if.hpp(30): E2344 Earlier declaration of 'ct_and::type'

    [BCC32 Error] function_base.hpp(157): E2238 Multiple declaration for 'function_return_type::type'

    [BCC32 Error] function_base.hpp(152): E2344 Earlier declaration of 'function_return_type::type'

    [BCC32 Error] alignment_of.hpp(37): E2468 Value of type void is not allowed

    [BCC32 Error] alignment_of.hpp(56): E2450 Undefined structure 'alignment_of_hack'

    [BCC32 Error] alignment_of.hpp(56): E2109 Not an allowed type

    [BCC32 Error] alignment_of.hpp(37): E2468 Value of type void is not allowed

    [BCC32 Error] alignment_of.hpp(56): E2450 Undefined structure 'alignment_of_hack'

    [BCC32 Error] alignment_of.hpp(56): E2109 Not an allowed type

    [BCC32 Error] alignment_of.hpp(37): E2468 Value of type void is not allowed

    [BCC32 Error] alignment_of.hpp(56): E2450 Undefined structure 'alignment_of_hack'

    [BCC32 Error] alignment_of.hpp(56): E2109 Not an allowed type

    [BCC32 Error] alignment_of.hpp(37): E2468 Value of type void is not allowed

    [BCC32 Error] alignment_of.hpp(56): E2450 Undefined structure 'alignment_of_hack'

    [BCC32 Error] alignment_of.hpp(56): E2109 Not an allowed type

    [BCC32 Error] if.hpp(131): E2270 > expected

    [BCC32 Error] if.hpp(131): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] type_with_alignment.hpp(271): E2238 Multiple declaration for 'type_with_alignment<2>::type'

    [BCC32 Error] type_with_alignment.hpp(268): E2344 Earlier declaration of 'type_with_alignment<2>::type'

    [BCC32 Error] not.hpp(40): E2015 Ambiguity between 'aux' and 'mpl_::aux'

    [BCC32 Error] not.hpp(47): E2270 > expected

    [BCC32 Error] not.hpp(47): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] void.hpp(71): E2270 > expected

    [BCC32 Error] void.hpp(71): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] void.hpp(72): E2270 > expected

    [BCC32 Error] void.hpp(72): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] or.hpp(50): E2015 Ambiguity between 'aux' and 'mpl_::aux'

    [BCC32 Error] or.hpp(62): E2270 > expected

    [BCC32 Error] or.hpp(62): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] eval_if.hpp(67): E2270 > expected

    [BCC32 Error] eval_if.hpp(67): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] identity.hpp(40): E2270 > expected

    [BCC32 Error] identity.hpp(40): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] identity.hpp(41): E2270 > expected

    [BCC32 Error] identity.hpp(41): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] yes_no.hpp(35): E2238 Multiple declaration for 'yes_no_tag<1>::type'

    [BCC32 Error] yes_no.hpp(30): E2344 Earlier declaration of 'yes_no_tag<1>::type'

    [BCC32 Error] assert.hpp(79): E2270 > expected

    [BCC32 Error] assert.hpp(79): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] arg.hpp(21): E2270 > expected

    [BCC32 Error] arg.hpp(28): E2321 Declaration does not specify a tag or an identifier

    [BCC32 Error] arg.hpp(28): E2228 Too many error or warning messages

    Failed

    Elapsed time: 00:00:36.2

The precise errors vary depending upon which version of the source I pull from the repository, but considering this thing apparently builds perfectly 'under the right conditions' the large amount of errors definitely imply issues with external dependencies, project settings, etc.

+1  A: 

but the developers left before I started

the hard drive failed and there is no backup available

I can't get it to build in either without dozens of errors.

This has software project disaster written all over it. You were probably hired in a last ditch attempt to rescue the investment by throwing meat at the problem. You're the meat. The odds are very low you'll be able to rescue it when even the original devs have given up on it.

You'll need to get a commitment from the management team to have any chance at all to bring this to a good end. Insist on the following:

  • They should hire at least one of the original principal engineers for a ridiculously high consultancy fee, calibrated so that No! is not an option.
  • They should hire a data recovery company to get the info off the failed disk
  • They should purchase all the original tools used to build the product. If they are no longer available from the vendor then look at an auction site, like ebay. Do not waste your time with trial versions.

If you see any hesitation in them committing to these steps, get the hell out of there.

Hans Passant
Thanks for the sanity check, Hans. All of the projects here are similar: no documentation, developers given up and left, unfinished and riddled with bugs and bad practices. Even the repository is a garbled mess. Fortunately I'm off very soon too, but I did hope to try and sort things out (a bit) before I went. Anyway, glad to hear it wasn't just me wondering if I'd been making a mountain out of a molehill!
HypersonicNinja