Author Topic: building problems  (Read 5430 times)

Offline UnknownArtists

  • Single posting newcomer
  • *
  • Posts: 5
building problems
« on: August 26, 2007, 12:41:08 pm »
hi,

i am using gentoo and have installed code::blocks. i also have installed gcc (GCC) 4.2.0 and GNU gdb 6.6
now i've created an new project an would test the "hello world" code but there is my problem, i couldn't build it beacuase of the following error:
Code
-------------- Build: Debug in test ---------------
WARNING: Can't read file's timestamp: /home/unknown/coding/test/main.c
Linking console executable: bin/Debug/test
g++: obj/Debug/main.o: No such file or directory
g++: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
what am i doin wrong?

thx4help!


sorry for my bad english (please correct me if i'am wrong with it) i'am still learning :)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: building problems
« Reply #1 on: August 26, 2007, 04:06:10 pm »
GCC 4.2 series has a bug when using -O2 optimization, which causes C::B's depslib component to be miscompiled. For a workaround, use -O2 -fno-strict-aliasing.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline UnknownArtists

  • Single posting newcomer
  • *
  • Posts: 5
Re: building problems
« Reply #2 on: August 26, 2007, 04:45:13 pm »
sry but i don'T have any optimmizationflags enabled. i've just installed codeblocks and tested it with the named result..
i've checked all compileroptions but no optimization is enabled

any other idea?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: building problems
« Reply #3 on: August 26, 2007, 06:23:11 pm »
I'm also using Gentoo and GCC 4.2.0, and the same thing happened to me a few weeks ago. What I can't understand is why the "force compilation if can't read timestamp but file exists" code isn't working for others.

When I separated that code (depslib) to find the reason why it wasn't working, it worked fine. I tried with Code::Blocks once again, and it worked fine too.

Try uninstalling Code::Blocks, cleaning (delete object files and pch) and building again.

Offline UnknownArtists

  • Single posting newcomer
  • *
  • Posts: 5
Re: building problems
« Reply #4 on: August 26, 2007, 11:50:38 pm »
where coul'd i find the
Quote
"force compilation if can't read timestamp but file exists"
option?
and what is
Quote
depslib
?

i've allready uninstalled codeblocks and even if i make a new project the error still exists :(
is there any option i have (unknown) activated?

i could compile the code without problems in the shell
Code
gcc main.c
but not with CB

thx

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: building problems
« Reply #5 on: August 27, 2007, 12:33:02 am »
"force compilation if can't read timestamp but file exists" is _NOT_ an option, it's in the compiler plugin's code. If it's not forcing a compilation then wxFileExists is failing (returning false), which is even more intriguing.

depslib is the library the compiler plugin uses to get the timestamp, and I suppose it checks all dependencies too.

Try compiling Code::Blocks adding the -fno-strict-aliasing flag and see if that solves the problem.

Offline UnknownArtists

  • Single posting newcomer
  • *
  • Posts: 5
Re: building problems
« Reply #6 on: August 27, 2007, 11:15:25 am »
i have created the
Code
/etc/portage/package.use
and added the following line:
Code
dev-util/codeblocks -fno-strict-aliasing
and after deleting the .codeblocks directory in my homefolder and the projects and unmerging codeblocks i recompiled it! but i still have the problem!
my make.conf has the following lines:
Code
USE="X alsa cdr crypt dri doc dvd encode gif gtk java javascript jpeg jpeg2k nvidia opengl qt3 sse sse2 ssl"
CFLAGS="-march=pentium4 -O3 -pipe"
maybe there is a problem....

or have i understood anything wrong?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: building problems
« Reply #7 on: August 27, 2007, 03:28:00 pm »
Remove the line you added to /etc/portage/package.use, it's of no use there.

Try this in a shell:
Code
CFLAGS="-march=pentium4 -O3 -pipe -fno-strict-aliasing" emerge codeblocks

Or, if you want, modify /etc/make.conf so it includes -fno-strict-aliasing in CFLAGS.

Offline UnknownArtists

  • Single posting newcomer
  • *
  • Posts: 5
Re: building problems
« Reply #8 on: August 27, 2007, 07:06:55 pm »
yeah!!!!!!   it works!!!!!!!  great!!!!!!    :lol:
thx for your help

edit:
only one question more: can i set this flags specific to this package, so that will work even after an update world?
« Last Edit: August 27, 2007, 07:09:36 pm by UnknownArtists »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: building problems
« Reply #9 on: August 27, 2007, 08:05:41 pm »
yeah!!!!!!   it works!!!!!!!  great!!!!!!    :lol:
thx for your help

edit:
only one question more: can i set this flags specific to this package, so that will work even after an update world?

Check this link.

kcbanner

  • Guest
Re: building problems
« Reply #10 on: September 03, 2007, 06:35:16 am »
I am getting this same error. Recompiling with -fno-strict-aliasing does not fix it. I am building the latest version from svn.

Ideas?

-kcbanner