This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Objects not find for static library compilation

Hi,

We have a big project consisting of a number of dependent projects. We keep all the relevant project files and source code in CVS. The only project files we check into CVS are:

.ccsproject

.cproject

.project

The depedent projects are all static libraries that are linked into the main executable project. Upon check out from CVS I noticed something quite annoying happening to the large static libraries. I would compile a large static library (containing more than 30 source files and takes more than 20 minutes to compile), but at the end of the compilation, the archiver indicates that it could not find one or two of the *.obj files. The static library was then built, but presumeably without the functions/objects from the particular *.obj files since it would give a linking error of the final main executable project.

Upon further inspection, I found that the particular *.obj files was in fact created from their respective source files (i.e. they were successfully compiled), so I'm not sure why the archiver could not find them. When I did a project clean and a full recompile of the static library, the archiver would from thereon find the *.obj files and everything then works fine.

I found that some of the other large static libraries did the same thing. By looking at the particular source files, there is no obvious reason why this should happen. I also played around with the linking order of the particular *.obj, but it made no difference. I guess this is more of a linking problem than compiler problem.

My setup:

- CCS 5.2.0.00069

- Compiler version: 7.3.4

- DSP/BIOS 5.41.13.42

- Windows 7 64-bit

Does anyone have an idea what could cause this??

Regards

  Reinier

  • Reinier Coetzer said:
    I would compile a large static library (containing more than 30 source files and takes more than 20 minutes to compile), but at the end of the compilation, the archiver indicates that it could not find one or two of the *.obj files.



    Can you please copy and paste the full output of the CCS build console that shows the errors from the archiver to a text file and attach it here?

    Reinier Coetzer said:
    Upon further inspection, I found that the particular *.obj files was in fact created from their respective source files (i.e. they were successfully compiled), so I'm not sure why the archiver could not find them

    Is there anything different about the .obj files that were not being found - like them being a different directory or having different permissions?

  • Hi AartiG,

    Sorry for only replying now.

    I have attached a text file with the compiler ouput you requested. The r9k6_rde.obj that the archiver is complaining about at the end, is in fact successfully compiled earlier and this object also exsists.5633.compiler_output.txt

    As for any differences, I cannot see any obvious differences such as having different permissions of odd directory locations.

    As I said before, if I then clean the particular project and recompile it, this error goes away.

    Any ideas?

  • Hi Reinier,

    I saw something odd in the output log. The path in the error:
       -->  error: 'D:/Rapid_Mobile/projects/client-raidm/tc4_lp/make/tc4_lp_rev01_ccs5/mod-rm_s4539_lib/obj/Release_Complete/r9k6_rde.obj' not found
    says client-raidm while the actual directory in the path should be client-rapidm.

    The path in the list of objs being passed to the archiver seems to be correct so I'm not quite sure why or how this is getting changed, but that seems to be reason for the error.
    We may need a full or cutdown version of the project so see if this is reproducible at our end before we can investigate further, unless you are ok with moving on with the workaround of cleaning and rebuilding the project.

  • Hi AartiG,

    Thank you for your quick reply.

    That is interesting, I somehow did not notice it! However, it would unfortunately not be possible to provide you with the project. I can only tell you that it happens consistently with a clean checkout and compile from CVS, and it only happens to large projects (25+ source files). I would appreciate a possible solution, since the workaround takes about an extra 20 - 30 minutes of compilation time. But I also understand that it will be difficult to reproduce the problem without the actual project.

  • Reinier,

    I'm not sure how to move ahead with analyzing this further without a reproducible test case. One thing I could suggest is to take a look at the makefiles generated by CCS on the first build after checkout, specifically the makefile and subdir_vars.mk, and see if/how these files differ from subsequent clean and rebuilds of the project. 

    Check if the object file directories are as expected or have the incorrect directory as mentioned in my previous post. The makefile should contain the invocation for the archiver, so you could also check the list of objs being passed to the linker and if the path to r9k6_rde.obj is correct. Not sure if this will give further clues but might be worth looking into.