Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

log filename including compiler, version, linker and debug or release ?

<< < (6/7) > >>

pabristow:
If i remove the copy script line from the post-build script, I get this in the Code::blocks log

Rebuild project:4
Log prebuild clang 900 debug
Log clang pre copy 900 debug
Log clang post copy 900 debug

and this in the build log

Output file is bin\Debug\hello_exceptions.exe with size 231.00 KB
Running target post-build steps

but NO log file(s).

If I remove the two log statements so that the postbuild box is empty,

I get I:\Cpp\hello_boost\hello_exceptions\hello_exceptions_build_log.html 

and this in the Build log

Build log saved as:
file://I:/Cpp/hello_boost/hello_exceptions/hello_exceptions_build_log.html

Code::Blocks log contains Rebuild project:4
Log prebuild clang 900 debug

So that seems to show that any post-build stops the production of a .html log file.
That surely should not happen?  Is this a key clue?

I'm using the current website release 17.12.

Perhaps I should use a nightly build

But since I have once had a html file and copy including the compiler, etc, this doesn't seem likely to be the cause or cure.

I tried on the other machine using gcc81 with the same result.

I sense that I have altered something else, that makes it behave like this, but I have no idea what.

Yet more thanks. Any other suggestions? 






BlueHazzard:
I would try to update codeblocks...

But this for sure looks suspicious...

[edit]
I can reproduce this.... There is no log generated.... I will look into it. Thank you for reporting...

What i did:
1) add post build steps to all targets
2) Change compiler to other name
3) Rebuild:
3.1) A build log is generated, the scripts are called and the log is copied
3.2) Make a second rebuild. The scripts are executed, but no build log is generated....

pabristow:
Thank you for your patience in dealing with this mysterious issue.

Would editing the default.conf XML might be better way of dealing with new compilers/versions?

Will an upgrade to a nightly overwrite all my changes to new compilers?

I am particularly keen to use Clang-9.0.0 with important progress in using constexpr to provide compile-time computation, even with Boost.Multiprecision at 128-bit up to hundreds of decimal digits precision.

(I'd also like to use gcc 9 but there is no binary available for mingw-w64 on Windows 10 yet).

But I await your further investigation.

BlueHazzard:
small update:
I have found out, that only a script in the post build steps triggers the bug... I can run a script in the pre build step and all works, i can run normal commands in the post build step and it works, only a script triggers the bug...
The bug is, that no build log is generated...

Beside this, there it could also be a problem that the build log is not fulushed at the point the post build step runs... So it could be possible that you copy a old build log, but this is a second problem i try to solve. First lets find out, why the build log is not saved if a script is run in the post build step....

BlueHazzard:
Ok i have found out, what the problem is, and i found a hack to circumvent it...

The problem is that the build log is saved in the "after process closed" (=OnJobEnd()) handler, only if the command queue is empty. If the queue is not empty a new "build process" (=DoRunQueue())  is started and no build log is saved. The problem is, that running a script, does not start a new process, and for this the "after process closed" is not called (because no process is started). And for this no build log is saved....

So to trigger the OnJobEnd function you can add a command that creates a process. For example:

--- Code: ---[[IO.CopyFile(_("$(PROJECTNAME)_build_log.html"), _("$(PROJECTNAME)_build_log_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetTitle() + _("_$(NOW)_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetCompilerID() + _(".html"), true );]]
CMD /C

--- End code ---
This will create a process and for this call the OnJobEnd() function and then generate a log file...

The second question is, what build log gets copied...

For the devs: The relevant code is in compiler.gcc:3958

--- Code: ---                BuildStateManagement();
                if (m_CommandQueue.GetCount())
                {
                    DoRunQueue();
                    return;
                }

--- End code ---
m_CommandQueue.GetCount() is not empty, because script commands are there, but OnJobEnd() is not called because the scipts do not trigger it...
I think this could be a quite common workflow... Any ideas how to solve this...

[edit:] I think it would also be quite handy to be able to add text from scripting to the build log...

[edit2:] As expected... you copy the log of the previous build...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version