Problem compiling profiled build.

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Stinky
Posts: 2
Joined: Sat Dec 06, 2008 11:54 am

Problem compiling profiled build.

Postby Stinky » Sat Dec 06, 2008 12:11 pm

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!

jesterKing
Site Admin
Posts: 1848
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Postby jesterKing » Mon Dec 08, 2008 1:20 am

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.

/Nathan

Stinky
Posts: 2
Joined: Sat Dec 06, 2008 11:54 am

Postby Stinky » Mon Dec 08, 2008 8:39 am

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 :)


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 0 guests