Author Topic: CB 13.12: Build log not accessable when compiling in an external terminal window  (Read 9851 times)

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
[CB 13.12 on Ubuntu 13.10]
EDIT  I've changed the title to reflect what the actual issue is.

I've rephrased my question, now that I understand the actual problem, in my post further below.  I resorted to using an external terminal window since I run a Pre-Build script that interacts with me.

In a nut-shell, my question is whether there is a 'console' tab plugin (terminal in the tab)?

======================

When I use a custom makefile, I don't get click-able error messages in my 'Build Log'.  My makefile system is quite complex but I'm still using GNU Make 3.81 and Clang 3.4.

Is there something wrong with how I've set-up my project, do I need to set up something I missed, or is this just not possible with a custom makefile?

Cheers,
Nap
« Last Edit: April 21, 2014, 08:08:02 pm by Napoleon »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #1 on: April 20, 2014, 05:28:27 pm »
Post you "build log" NOT the "Build Messages".
NOTE: The "Build Messages" is based on the "build log".
The "build log" is NOT clickable.
The "Build Messages" is clickable.

I have no memory of what is in the build log of a custom makefile.
If the info is there (in "build log"), I would try editing the advanced compiler settings to see if the "Build Messages" can be made more usable.
I do NOT know if it will work or not.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #2 on: April 20, 2014, 06:06:13 pm »
Tim, Thanks for the info.
My "Build messages" tab says:
Code
||=== Build: Debug in subscribeAndCallBackClassMessages (compiler: LLVM Clang Compiler) ===|
||=== Build finished: 0 error(s), 0 warning(s) (0 minute(s), 9 second(s)) ===|

However I know there is an error because I've intentionally left out a ';'.

Tim, are you saying there is a log file somewhere that CB looks at?  Maybe my makefile isn't outputting it, or putting it in a different place?

Cheers,
Nap

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #3 on: April 20, 2014, 06:11:20 pm »
You NEED to read the names of the tabs; find the one called "Build Log".

Edit1: If you do NOT see it right click on a existing tab and enable "Build Log".

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #4 on: April 20, 2014, 06:24:56 pm »
I have a feeling this post might have the answer to my question.

I might be able to redirect, copy, or symlink to it somehow.  How would I get the build log out of Make or Clang?

@Tim, my "Build Log" also says there are no errors:
Code
Running project pre-build steps
/home/nap/src/cbMiPal/backupfiles.sh /home/nap/src/MiPal/GUNao/posix/tutorials/subscribeAndCallBackClassMessages/ /home/nap/src/cbMiPal/GUNao/posix/tutorials/subscribeAndCallBackClassMessages/

-------------- Build: Debug in subscribeAndCallBackClassMessages (compiler: LLVM Clang Compiler)---------------

Running command: make
Process terminated with status 0 (0 minute(s), 9 second(s))
0 error(s), 0 warning(s) (0 minute(s), 9 second(s))
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #5 on: April 20, 2014, 06:33:11 pm »
If the "build log" has no info in it; I have no idea how CB can fix this issue.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #6 on: April 20, 2014, 06:34:39 pm »
Make sure you have turned on full commandline logging (see: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F).
You can check the make commands in "Project -> Build options -> Make commands" to be sure the make output is not redirected to a file or null-device.

To make errors clickable, you also need a proper makefile execution directory in "Project -> Properties -> Project settings".

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #7 on: April 21, 2014, 07:14:40 pm »
EDITI have deleted the ~/.codeblocks folder and ran CB again.  It has reset the settings, and now it's detecting the error.  Hopefully my individual project settings will be honoured.


I have a feeling this problem doesn't have anything to with my custom make.  Somehow I've broken my set up while trying to get it the way I want it.
I suspect this because a project I was working on last week is now also not showing compile errors. Both the 'Build log' and 'Build messages' tabs, are saying there are no errors, when I've intentionally removed a semi-colon.

"Build log"
Code
-------------- Build: all in a1 (compiler: LLVM Clang Compiler)---------------

clang -Wall -g      -c /home/user/Documents/assignments/a1/a1/bashed.c -o obj/Release/bashed.o
clang++  -o bin/Release/a1 obj/Release/bashed.o   -lreadline
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
(No output produced in the /bin/Release folder!!)

"Build messages"
Code
||=== Build: all in a1 (compiler: LLVM Clang Compiler) ===|
||=== Build finished: 0 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I also don't understand why CLANG++ is being used to compile, since I haven't set any variables to indicate I want it.  Besides, the source file has a .c extension.

And another couple things I've noticed;
  • my terminal settings in Settings -> Environment -> General Settings are wrong.  Both are set to use gnome-terminal, where I had xterm for the Terminal to launch console programs:,  and
  • code completion for declared variables is not working, my variables are not showing in the list.


Cheers,
Nap
« Last Edit: April 21, 2014, 07:19:26 pm by Napoleon »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #8 on: April 21, 2014, 07:23:27 pm »
Is there a way of resetting back to default settings? Or do I need purge CB and reinstall?
This will not help, because user-settings are not cleared.
The easiest way to reset all to defaults (with losing all settings), is to delete the "default.conf" in "$HOME/.codeblocks".

To try if it works, you can also start C::B with another personality ("codeblocks --help" on the commandline for details).

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: CB 13.12: How to rpt compile errors when using a custom Makefile
« Reply #9 on: April 21, 2014, 07:58:49 pm »
@Jens, thnx.  I did that and it's back to normal.

And, I've also understood what the original problem was.

I am running an interactive script in my Pre-Build steps.  I pause in this script to let me decide if I want to make a backup of my files.  Since my version of CB doesn't have a built in 'console' tab, like I've seen in other IDE's, I made it run in a separate terminal.   This is not ideal, but quite OK.

The problem, and the basis of this whole thread, was caused because I decided to run the custom make system in a separate terminal as well, thus CB wasn't able to access the output to determine the result.  I've changed this script to not open a new terminal, and CB is picking up the output just as it should.  :)

Is there a 'console' plugin for CB 13.12 (compiled from source) which provides a terminal?

Cheers,
Nap
« Last Edit: April 21, 2014, 08:10:24 pm by Napoleon »