Author Topic: SVN 2343 doesn't compile under linux  (Read 9391 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
SVN 2343 doesn't compile under linux
« on: April 13, 2006, 10:48:50 pm »
SVN 2343 get the following errors attempting to compile
(with Codeblocks 2316) under Ubuntu 510

Code
Compiling: sdk/uservarmanager.cpp
Compiling: sdk/workspaceloader.cpp
Compiling: sdk/xtra_classes.cpp
Compiling: sdk/xtra_res.cpp
Linking dynamic library: devel/libcodeblocks.so
g++: .objs/sdk/base64.o: No such file or directory
g++: .objs/sdk/configurationpanel.o: No such file or directory
g++: .objs/sdk/crc32.o: No such file or directory
Process terminated with status 1 (64 minutes, 26 seconds)
0 errors, 0 warnings

« Last Edit: April 13, 2006, 10:50:31 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: SVN 2343 doesn't compile under linux
« Reply #1 on: April 14, 2006, 03:06:55 am »
SVN 2343 get the following errors attempting to compile
(with Codeblocks 2316) under Ubuntu 510

I did a Rebuild/Clean, then another Rebuild on SVN 2343 and got the
following:
Code
Compiling: src/prefix.cpp
Compiling: src/printdlg.cpp
Compiling: src/splashscreen.cpp
Compiling: src/startherepage.cpp
Linking executable: devel/codeblocks
.objs/src/app.o: In function `__tcf_0':
src/app.cpp:340: undefined reference to `CrashHandler::~CrashHandler()'
.objs/src/app.o: In function `CodeBlocksApp::OnInit()':
src/app.cpp:340: undefined reference to `CrashHandler::CrashHandler()'
collect2: ld returned 1 exit status

I then reverted to 2342 and all compiled ok on Ubuntu 510

thanks
pecan

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #2 on: April 14, 2006, 10:46:07 am »
Hello,

I have no problem with rev2343 on Ubuntu 5.10. I have just build yesterday the .deb package for rev2343 and all went as usually.

Sorry for the stupid question, but you did not use in Linux the #define WINVER=0x0501 used to build the Crash Handler on Windows XP (see Thomas's post)?

Best wishes,
Michael

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: SVN 2343 doesn't compile under linux
« Reply #3 on: April 14, 2006, 02:16:07 pm »
Hello,

I have no problem with rev2343 on Ubuntu 5.10. I have just build yesterday the .deb package for rev2343 and all went as usually.

Sorry for the stupid question, but you did not use in Linux the #define WINVER=0x0501 used to build the Crash Handler on Windows XP (see Thomas's post)?

Best wishes,
Michael



I simply did a SVN update on 2316 and tried to compile using CodeBlocks.
I got the errors reported. If anything new is defined in 2343,
I didn't define it.

I then did an "svn update -r 2342", recompiled, and the error were gone.
« Last Edit: April 14, 2006, 02:20:42 pm by Pecan »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #4 on: April 14, 2006, 02:25:32 pm »
I simply did a SVN update on 2316 and tried to compile using CodeBlocks.
I got the errors reported. If anything new is defined in 2343,
I didn't define it.

I then did an "svn update -r 2342", recompiled, and the error were gone.


The main difference between rev 2343 and 2342 is the Crash Handler. Anyway, it is not compiled by default and should not make troubles in Linux. I will check if I can build C::B with cbp.

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #5 on: April 14, 2006, 03:38:17 pm »
Hello,

I have updated C::B to the latest revision (2346) and tried to build it with cbp.

I have got the Crash Handler errors. Strange because I could build .deb package of rev2343 yesterday... :?

The errors are:

Quote
src/app.cpp:340: undefined reference to `CrashHandler::~CrashHandler()'
src/app.cpp:340: undefined reference to `CrashHandler::CrashHandler()'

May be it would be useful to add a #ifdef to avoid errors on Linux.

Best wishes,
Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SVN 2343 doesn't compile under linux
« Reply #6 on: April 14, 2006, 03:59:19 pm »
It seems Thomas didn't add these files in non-windows builds.
The files themselves are #ifdef'd so they won't actually be compiled, but they need to be added to the build.
I will do it later today.
For the time being do it yourselves, locally.

For autotools, edit src/src/Makefile.am and add crashhandler.cpp in the codeblocks_SOURCES list of files.
For the .cbp builds, add src/crashhandler.cpp|h in the codeblocks-unix.cbp.
Be patient!
This bug will be fixed soon...

Offline TheTuxKeeper

  • Regular
  • ***
  • Posts: 293
  • daniel2000
Re: SVN 2343 doesn't compile under linux
« Reply #7 on: April 14, 2006, 05:15:14 pm »
It seems Thomas didn't add these files in non-windows builds.
The files themselves are #ifdef'd so they won't actually be compiled, but they need to be added to the build.
I will do it later today.
For the time being do it yourselves, locally.

For autotools, edit src/src/Makefile.am and add crashhandler.cpp in the codeblocks_SOURCES list of files.
For the .cbp builds, add src/crashhandler.cpp|h in the codeblocks-unix.cbp.
In rev 2346 crashhandler.cpp is in the codeblocks_SOURCES list. app.cpp builds without any warnings/errors on fedora core 4.
I build it with autotools/make. Seems only building with .cbp is affected.
Nightly builds for openSUSE

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: SVN 2343 doesn't compile under linux
« Reply #8 on: April 14, 2006, 05:46:40 pm »
It seems Thomas didn't add these files in non-windows builds.
Yes, he did (to the best of his knowledge).

He added them to
a) CodeBlocks.cbp
b) CodeBlocks-unix.cbp
c) Makefile.am inside src

He believes you have to run bootstrap again for new files to be honoured, but he isn't entirely sure about this, being an autotools noob :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #9 on: April 14, 2006, 07:26:43 pm »
It seems Thomas didn't add these files in non-windows builds.
The files themselves are #ifdef'd so they won't actually be compiled, but they need to be added to the build.
I will do it later today.
For the time being do it yourselves, locally.

For autotools, edit src/src/Makefile.am and add crashhandler.cpp in the codeblocks_SOURCES list of files.
For the .cbp builds, add src/crashhandler.cpp|h in the codeblocks-unix.cbp.
In rev 2346 crashhandler.cpp is in the codeblocks_SOURCES list. app.cpp builds without any warnings/errors on fedora core 4.
I build it with autotools/make. Seems only building with .cbp is affected.

If I am not wrong, Pecan was using autotools to build C::B rev2343. I got it built with autotools, but not with cbp.

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #10 on: April 14, 2006, 07:29:49 pm »
It seems Thomas didn't add these files in non-windows builds.
The files themselves are #ifdef'd so they won't actually be compiled, but they need to be added to the build.
I will do it later today.
For the time being do it yourselves, locally.

For autotools, edit src/src/Makefile.am and add crashhandler.cpp in the codeblocks_SOURCES list of files.
For the .cbp builds, add src/crashhandler.cpp|h in the codeblocks-unix.cbp.

Ok, I will do it :).

Thank you for your help.

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #11 on: April 14, 2006, 07:39:46 pm »
It seems Thomas didn't add these files in non-windows builds.
Yes, he did (to the best of his knowledge).

He added them to
a) CodeBlocks.cbp
b) CodeBlocks-unix.cbp
c) Makefile.am inside src

He believes you have to run bootstrap again for new files to be honoured, but he isn't entirely sure about this, being an autotools noob :)

Hello,

I have checked and found as you said that the files were added to the src/src/makefile.am. This should explains why I could build the .deb package (but not why Pecan could not build rev2343). Anyway, in the CodeBlocks-unix.cbp I have not found them. I have added them and I will try now a re-build to know if it works. [EDIT]: I have just built successfully rev2349 :).

Best wishes,
Michael
« Last Edit: April 14, 2006, 08:27:22 pm by Michael »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: SVN 2343 doesn't compile under linux
« Reply #12 on: April 14, 2006, 11:33:02 pm »
Quote
From Michael
I have checked and found as you said that the files were added to the src/src/makefile.am. This should explains why I could build the .deb package (but not why Pecan could not build rev2343).

Pecan was using Codeblocks 2316 to compile
Codeblocks 2343. And it didnt work.

But... As long as it's fixed...Pecan is happy

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SVN 2343 doesn't compile under linux
« Reply #13 on: April 14, 2006, 11:34:37 pm »
Quote
From Michael
I have checked and found as you said that the files were added to the src/src/makefile.am. This should explains why I could build the .deb package (but not why Pecan could not build rev2343).

Pecan was using Codeblocks 2316 to compile
Codeblocks 2343. And it didnt work.

But... As long as it's fixed...Pecan is happy


Ok, sorry for the misunderstanding :oops:.

Best wishes,
Michael