Hi there, I have recently started building blender and I've encountered a snag. I've built several non-profiled builds without any problems, but when I did a profiled build I ran into some path trouble.
My environment is Mingw + MSys and building using scons. Anyway, the first stage with '-fprofile-generate' compiles fine. However, after I run and exit the profiled build to generate the gcda files, 'c:\blender\blender/' gets prefixed to the absolute path, with an error saying 'profiling:c:\blender\blender/C:\blender\build\win32-mingw\intern\opennl... xxx.gcda:Cannot open'. (Note I shortened the path description here) and thus the .gcda files can't be written.
Anyway, the path is correct apart from the prefixed 'c:\blender\blender/', so I'm wondering how would I go about to remove it? Also, I've done some other profiled builds on other source code and it has worked fine (nothing prefixed to the absolute path).
If anyone can shed some light on this it would be greatly appreciated!
When you build with scons/mingw you don't need the msys environment - Try running in normal cmd.exe box and see if the problem persists.
| Letwory Interactive
Thanks for the tip jesterKing, unfortunately it gave the exact same result as with msys.
HOWEVER, after looking through the gcc cross profiling documentation I came across two environment variables that solved it for me.
By using GCOV_PREFIX=C: and GCOV_PREFIX_STRIP=4, I was able to remove the 'c:\blender\blender/' prefix and have the .gcda files written correctly.
If I wasn't too lazy to actually read the documentation this would never have been a problem, have I learned something from this lesson? Most likely not