Author Topic: Trouble rebuilding Code::Blocks from trunk.  (Read 16381 times)

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Trouble rebuilding Code::Blocks from trunk.
« on: March 01, 2013, 11:14:22 pm »
I attempted a full clean rebuild (manually deleted all output binaries and even object files) of a recent Code::Blocks through the CodeBlocks.workspace file.

Using TDM-GCC 4.7.1 on Windows, with which I built wxWidgets 2.8.12.

Early on, I got a linker error when building the autorevision target, and I can't see where it comes from.

The compiler output:

Quote
-------------- Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall C:\Users\Francisco\Dev\svn\codeblocks\src -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -w -Wfatal-errors -iquote.objs\include -I.objs\include -I. -IC:\Users\Francisco\Dev\libs\wx2812\include -IC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\tinyxml -c C:\Users\Francisco\Dev\svn\codeblocks\src\base\tinyxml\tinystr.cpp -o .objs\base\tinyxml\tinystr.o
mingw32-g++.exe: warning: C:\Users\Francisco\Dev\svn\codeblocks\src: linker input file unused because linking not done
mingw32-g++.exe -Wall C:\Users\Francisco\Dev\svn\codeblocks\src -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -w -Wfatal-errors -iquote.objs\include -I.objs\include -I. -IC:\Users\Francisco\Dev\libs\wx2812\include -IC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\tinyxml -c C:\Users\Francisco\Dev\svn\codeblocks\src\base\tinyxml\tinyxml.cpp -o .objs\base\tinyxml\tinyxml.o
mingw32-g++.exe: warning: C:\Users\Francisco\Dev\svn\codeblocks\src: linker input file unused because linking not done
mingw32-g++.exe -Wall C:\Users\Francisco\Dev\svn\codeblocks\src -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -w -Wfatal-errors -iquote.objs\include -I.objs\include -I. -IC:\Users\Francisco\Dev\libs\wx2812\include -IC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\tinyxml -c C:\Users\Francisco\Dev\svn\codeblocks\src\base\tinyxml\tinyxmlerror.cpp -o .objs\base\tinyxml\tinyxmlerror.o
mingw32-g++.exe: warning: C:\Users\Francisco\Dev\svn\codeblocks\src: linker input file unused because linking not done
mingw32-g++.exe -Wall C:\Users\Francisco\Dev\svn\codeblocks\src -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -w -Wfatal-errors -iquote.objs\include -I.objs\include -I. -IC:\Users\Francisco\Dev\libs\wx2812\include -IC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\tinyxml -c C:\Users\Francisco\Dev\svn\codeblocks\src\base\tinyxml\tinyxmlparser.cpp -o .objs\base\tinyxml\tinyxmlparser.o
mingw32-g++.exe: warning: C:\Users\Francisco\Dev\svn\codeblocks\src: linker input file unused because linking not done
cmd /c if exist base\tinyxml\libtxml.a del base\tinyxml\libtxml.a\nar.exe -r -s base\tinyxml\libtxml.a .objs\base\tinyxml\tinystr.o .objs\base\tinyxml\tinyxml.o .objs\base\tinyxml\tinyxmlerror.o .objs\base\tinyxml\tinyxmlparser.o

-------------- Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall C:\Users\Francisco\Dev\svn\codeblocks\src -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -w -Wfatal-errors -iquote.objs\include -I.objs\include -I. -IC:\Users\Francisco\Dev\libs\wx2812\include -IC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -c C:\Users\Francisco\Dev\svn\codeblocks\src\build_tools\autorevision\autorevision.cpp -o .objs\build_tools\autorevision\autorevision.o
mingw32-g++.exe: warning: C:\Users\Francisco\Dev\svn\codeblocks\src: linker input file unused because linking not done
mingw32-g++.exe -Lbase\tinyxml -LC:\Users\Francisco\Dev\libs\wx2812\lib\gcc_dll -Lbase\tinyxml -o build_tools\autorevision\autorevision.exe .objs\build_tools\autorevision\autorevision.o  -s  -ltxml
c:/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -ltxml
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 7 second(s))
1 error(s), 5 warning(s) (0 minute(s), 7 second(s))

The linker input warnings intrigue me as well.


Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #1 on: March 02, 2013, 12:05:19 am »
I think I found the problem. There is a generated command-line compiler command with a line break escape sequence in it for no good reason, when it should have been two separate commands.

Code
cmd /c if exist base\tinyxml\libtxml.a del base\tinyxml\libtxml.a\nar.exe -r -s base\tinyxml\libtxml.a .objs\base\tinyxml\tinystr.o .objs\base\tinyxml\tinyxml.o .objs\base\tinyxml\tinyxmlerror.o .objs\base\tinyxml\tinyxmlparser.o

Has anyone else reproduced this?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #2 on: March 02, 2013, 12:50:14 am »
Has anyone else reproduced this?
Alpha any ideas about this problem?

ptDev: What revision of CB are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #3 on: March 02, 2013, 12:57:55 am »
Was a build of revision 8834.

Using 8855, I don't reproduce it any more.

It is strange, because there is no change in options_gcc.xml in between those revisions.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #4 on: March 02, 2013, 03:54:46 am »
The fix was in rev. 8846, however, what is strange is that the command
Code
cmd /c if exist base\tinyxml\libtxml.a del base\tinyxml\libtxml.a\nar.exe -r -s base\tinyxml\libtxml.a .objs\base\tinyxml\tinystr.o .objs\base\tinyxml\tinyxml.o .objs\base\tinyxml\tinyxmlerror.o .objs\base\tinyxml\tinyxmlparser.o
was added in 8847...  Did your files get mixed?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #5 on: March 02, 2013, 06:37:16 am »
Has anyone else reproduced this?
Yes, me.
I removed the first line (the cmd.exe) thing in the advanced option, now it works again. I forgot to report though.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #6 on: March 02, 2013, 04:09:06 pm »
Has anyone else reproduced this?
Yes, me.
I removed the first line (the cmd.exe) thing in the advanced option, now it works again. I forgot to report though.

Mystery solved, then.

It is possible (though unlikely) that files got mixed, which would explain why the issue came and went.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #7 on: March 02, 2013, 04:15:03 pm »
Mystery solved, then.
I'm not sure.
Morten: Is trunk in working state or do we have to change something to make it working as expected?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #8 on: March 03, 2013, 06:21:54 am »
Morten: Is trunk in working state or do we have to change something to make it working as expected?
For me its not. Even if I have a linefeed between the two commands it does not work. (BTW: There was a linefeed before.)

I can try a fresh re-compile though...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #9 on: March 03, 2013, 09:57:48 am »
Was there any change in how the compiler plugin interpretes the linefeed?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Trouble rebuilding Code::Blocks from trunk.
« Reply #10 on: March 03, 2013, 05:43:31 pm »
I am not on Windows right now, but when I have access, I will explore this.  (Although it did work last time I checked...)

Was there any change in how the compiler plugin interpretes the linefeed?
No, the internal use has remained the same (the only change was a recent fix to correct loading from the XML files).