Author Topic: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10  (Read 12280 times)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Hello,

I got an error when compiling the contr. plugins workspace. I am using C::B rev2185.

Quote
copystrings.cpp:10:17 error: calling fdopen: Bad file descriptor

The problem is located here:

Code: [Select]
#include "sdk.h"

C::B itself compiled fine.

I have also tried to get a new sdk.h from SVN, but got the same error.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #1 on: March 19, 2006, 10:26:52 pm »
damn damn, I think I might have screwed this one up. All the other plug-ins build ok ??

Last friday I changed sdk.h, but everything kept on building, yesterday I cleaned up copystrings, I have the feeling, something was wrong there.
« Last Edit: March 19, 2006, 10:29:08 pm by killerbot »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #2 on: March 19, 2006, 10:28:51 pm »
Hello,

I will give a try to the others and then post here. I have just stopped at the error.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #3 on: March 19, 2006, 10:36:17 pm »
although it should not have anything to do with it : try <sdk.h> ??

On windows everythings still builds ok, so that's one thing.
Another thing to try :
comment out the ifdef CB_PRECOMP, sdk.h the else and endif, just to see if copystrings compiles.

In the meantime I am rebooting and switching to linux

[EDIT] : in linux ... and building .....
« Last Edit: March 19, 2006, 10:48:14 pm by killerbot »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #4 on: March 19, 2006, 10:51:59 pm »
Woops : other problems,
I have error in the building of codestat :
Seems Zlika's commit does not work on linux.
codestatconfig.cpp -> will fix them once I am back in windows.

[EDIT] : FIX

just add in that cpp file :
#include "manager.h"
#include "configmanager.h"

There's more to adjust to have the includes "clean and correct", but I will adjust that later this week. Just by adding these 2 lines, we are up and running again.
« Last Edit: March 19, 2006, 10:54:57 pm by killerbot »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #5 on: March 19, 2006, 10:52:25 pm »
although it should not have anything to do with it : try <sdk.h> ??

Does not work.

comment out the ifdef CB_PRECOMP, sdk.h the else and endif, just to see if copystrings compiles.

This works. copystrings project builds fine.

I have also tried a clean and then a build, but does not solve the problem. Strange, because I have built without problems the .deb package for revision2215 :?.

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #6 on: March 19, 2006, 10:56:32 pm »
Woops : other problems,
I have error in the building of codestat :
Seems Zlika's commit does not work on linux.
codestatconfig.cpp -> will fix them once I am back in windows.

codestat builds here. I have tried a re-build and I got 0 errors and 0 warnings. Anyway, I have remarked a typo:

Quote
------- Build: default in Code statitstics (Unix) -------

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #7 on: March 19, 2006, 10:58:39 pm »
very weird. I could build on linux, except from the codestats problem. Are you on rev 2216 on linux ?? Since rev 2216 was the change to codestats.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #8 on: March 19, 2006, 11:00:48 pm »
very weird. I could build on linux, except from the codestats problem. Are you on rev 2216 on linux ?? Since rev 2216 was the change to codestats.

Yes, I am in rev2216. For me I can build all, except the copystrings project. If I comment out the lines you told me, it compiles fine.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #9 on: March 19, 2006, 11:03:12 pm »
so it seems sdk.h is still correct (relief ...), why can it be used in the other plug-ins and not in copystrings ???

By the way, copystrings did not compile on my system, meaning it is NOT included in the build system.
I use command line : make --> and indeed ther's no makefile in the copystrings, so it is left out. How did you build it ?? Are the settings for the copystrings project ok then ???

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #10 on: March 19, 2006, 11:04:30 pm »
info : gcc : 4.0.2  (oh yeah : I am on suse) .

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #11 on: March 19, 2006, 11:08:42 pm »
so it seems sdk.h is still correct (relief ...), why can it be used in the other plug-ins and not in copystrings ???

By the way, copystrings did not compile on my system, meaning it is NOT included in the build system.
I use command line : make --> and indeed ther's no makefile in the copystrings, so it is left out. How did you build it ?? Are the settings for the copystrings project ok then ???

I avoid to compile C::B with make, because it takes so much on my poor Pentium III 500MHz. To compile C::B I use CodeBlocks-unix.cbp and to compile contr. plugins ContribPlugins-unix.workspace. The GCC is the same (IIRC).

May be you should update the CodeBlocks-unix.cbp?

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #12 on: March 19, 2006, 11:14:57 pm »
totally different things seem to happen with :
 1) make build
 2) cbp build
I think I recall something that the pch are not interchangeable between 1) and 2).
But there seem to be more differences, since we both have same compiler (and version of compiler), my make build couldn't compile the codestat, and your without a problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #13 on: March 19, 2006, 11:18:54 pm »
all righty :
 - just to allow everyone to build without error, this is what I am gonna do for now :
a) copystrings.cpp : uncomment the lines as described above (I still don't get it why it wouldn't work)
b) codestatconfig.cpp : add the 2 includes

--> that will be the next revision, and the nightly build will be based on that one.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: [Linux] Error compiling the copystrings (Unix) on Ubuntu 5.10
« Reply #14 on: March 19, 2006, 11:20:15 pm »
totally different things seem to happen with :
 1) make build
 2) cbp build
I think I recall something that the pch are not interchangeable between 1) and 2).
But there seem to be more differences, since we both have same compiler (and version of compiler), my make build couldn't compile the codestat, and your without a problem.

Yes, there is a "problem" with PCH. I have posted it here.

Practically, with make you will have a PCH file. Instead with the cbp a directory with inside the PCH file.

Best wishes,
Michael