User forums > Help
WIndows Project Moved to Linux = Errors
arew264:
Okay, so I'm working on a project that's eventually gonna be run on linux, but I started it out on windows and compiled with Cygwin.
Then when I got sick of debugging with cygwin (debugging with cygwin is basically recompiling your code with diagnostic messages), and set up a SVN repo, stored all my code (the whole project folder, etc), fired up codeblocks on linux, checked out the repo, and opened the project file.
It opens all my files just fine, and I can edit them, etc, but after I changed the compiler from cygwin to GCC, I told it to rebuild and got this as a log:
--- Code: ----------------- Build: Debug in NewMud ---------------
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/admin.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/area.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/build.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/commands.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/commandutils.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/comms.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/editor.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/fight.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/globals.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/handlers.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/load.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/mob.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/objects.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/player.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/room.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/states.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/strings.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/timer.cpp
WARNING: Can't read file's timestamp: /home/arew264/Desktop/newmud/tinymudserver.cpp
Linking console executable: bin/Debug/NewMud
g++: obj/Debug/admin.o: No such file or directory
g++: obj/Debug/area.o: No such file or directory
g++: obj/Debug/build.o: No such file or directory
g++: obj/Debug/commands.o: No such file or directory
g++: obj/Debug/commandutils.o: No such file or directory
g++: obj/Debug/comms.o: No such file or directory
g++: obj/Debug/editor.o: No such file or directory
g++: obj/Debug/fight.o: No such file or directory
g++: obj/Debug/globals.o: No such file or directory
g++: obj/Debug/handlers.o: No such file or directory
g++: obj/Debug/load.o: No such file or directory
g++: obj/Debug/mob.o: No such file or directory
g++: obj/Debug/objects.o: No such file or directory
g++: obj/Debug/player.o: No such file or directory
g++: obj/Debug/room.o: No such file or directory
g++: obj/Debug/states.o: No such file or directory
g++: obj/Debug/strings.o: No such file or directory
g++: obj/Debug/timer.o: No such file or directory
g++: obj/Debug/tinymudserver.o: No such file or directory
g++: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End code ---
Do I need to write my own makefile for linux, or should it all work like it did on Windows? Did I miss something?
TDragon:
I'd bet that you've just encountered the nasty GCC bug I've spent the past couple of weeks hunting. See if both of the following are true:
- You're using GCC 4.2 or later
- At least a portion of C::B (the Compiler depslib) is compiled with "-O2" (or a particular optimization that -O2 enables)
If so, you've run afoul of an optimization bug that occurs in the time_enter function in timestamp.c. The fix, for now, is to get that file compiled either without "-O2" or with "-fno-strict-aliasing"; I choose the latter, and for me, since I build C::B with C::B, it's a simple matter of adding "-fno-strict-aliasing" to the Compiler depslib target before building. If you're using the autotools (bootstrap, configure, make) process, I'm not sure how best to get it fixed but you can probably just recompile that single file by hand and then redo the "make" and "make install" steps.
This bug is filed in GCC Bugzilla as Bug #32328, in case you're interested.
Hope that helps,
John E. / TDM
arew264:
Thanks, there is a good chance this is the case.
I use Arch Linux, a medium sized distro that's major forte is having the latest stable version of ALL major packages. C::B is in the official user repo, and I'll have to check if they used that flag and if to advise them about it.
Morphius Faydal:
Check in the makefile that comes down with the SVN source of Code::Blocks, and you can edit the target for the compiler.
Also, running touch on all the files should modify the timestamp, so you could, hopefully, work around this GCC bug.
TDragon:
--- Quote from: MorphiusFaydal on June 16, 2007, 05:07:13 am ---Also, running touch on all the files should modify the timestamp, so you could, hopefully, work around this GCC bug.
--- End quote ---
Actually, the bug is in the fact that GCC produces incorrect output when compiling C::B -- the error occurs when C::B itself tries to read a file's timestamp and, because of the incorrect output, fails. Because it can't read the timestamp, it assumes the file doesn't exist and skips compiling it -- then errors out because it can't find the compiled object file.
Navigation
[0] Message Index
[#] Next page
Go to full version