Please, help: ipo: warning #11010: file format not recognized for programio-std.obj
I have a compilation problem by using a makefile. I've read similar cases for lib.a files, but not for .obj. The whole error is:
[ascotilla@lb-ascotilla-lap bin]$ source ./compilervars.sh intel64 [ascotilla@lb-ascotilla-lap bin]$ make ifort -o motif_program programmain_std.obj programio-std.obj Array.obj -I/usr/local/lib/lne tcdf_c++ -I/usr/local/lib/-lnetcdf ipo: warning #11010: file format not recognized for programio-std.obj programio-std.obj: file not recognized: File format not recognized make: *** [motif_program] Error 1 [ascotilla@lb-ascotilla-lap bin]$
I'm a newbie in both linux and programming, so I'm sure it can probably be something pretty obvious, but I've been trying to look any related information and I'm not being able to go out from there. The program has already been compiled by others, so it shouldn't be a problem with it (but who knows..)
Quite funny, I've just found out that every time I enter in a post is counted three times in the counter...:-)
However, I've still not been able to sort my little problem out. I don't mean to be annoying with that, but I don't have any other help appart from you, the manual and google..which should be enough, but this time I didn't found anything in the last two ones...
I suspect that some of the object files were compiled with the -ipo option and some without. Clean your project of object files and rebuild. If the problem persists, examine your makefile for inconsistent use of the -ipo option.
Maybe I should tell the whole story. Until last week, I just had one compilation problem, apparently related with the link of the string.h library to the function strchr.al. I couldn't sort that out, so I tried to install a debugger following a friend's advice. As I'm a newbie, I made a stupid thing trying to avoid the neverending problem with the permissions, and I used the chown command to have permission for every opperation in every folder (sudo chown -hR ascotilla / ...if any other newbie has the stupid idea of doing that, I strongly recommend to avoid it), and I couldn't access my fedora 12 anymore, so I had to reinstall both the OS (in this case, Fedora 14) and the intel compilers for fortran and c++, and now I have, as well as the strchr problem, two more issues.
The idea of the makefile is to compile together two parts of a model, one in fortran (main program) and the other in c++ (input-outputs), so I tried to compile the different parts separately, to see if they have problems too. These are the three problems:
In the fortran part:
[ascotilla@lb-ascotilla-lap bin]# ifort -fpp programmain.f /tmp/ifortE3odeQ.o: In function `MAIN__': programmain.f:(.text+0x138): undefined reference to `initio_' programmain.f:(.text+0x177): undefined reference to `getgrid_' programmain.f:(.text+0x4f7): undefined reference to `getclimate_' programmain.f:(.text+0xb552): undefined reference to `outannual_' programmain.f:(.text+0xb5bc): undefined reference to `getclimate_' programmain.f:(.text+0xb5e4): undefined reference to `outgrid_' programmain.f:(.text+0xb618): undefined reference to `getgrid_' programmain.f:(.text+0xb655): undefined reference to `termio_'
In the c++ part:
[ascotilla@lb-ascotilla-lap bin]# icpc -std=c++0x programio.cpp programio.cpp(3251): error: identifier "strchr" is undefined if (strchr(buff, '\n')) *strchr(buff, '\n') = '\0'; ^
compilation aborted for programio.cpp (code 2)
And in the makefile:
[ascotilla@lb-ascotilla-lap bin]# make ifort -o motif_program programmain_std.obj programio-std.obj Array.obj -I/usr/local/lib/lne tcdf_c++ -I/usr/local/lib/-lnetcdf ipo: warning #11010: file format not recognized for programio-std.obj programio-std.obj: file not recognized: File format not recognized make: *** [motif_program] Error 1 [ascotilla@lb-ascotilla-lap bin]#
I guess the makefile and fortran problems are related with the new fedora OS, as I didn't have them before, but I really don't know how to sort them out, and I didn't found a solution in the forums which can apply to my case yet.
Thanks for answering mecej4! I don't know if I'm looking in the right place, but in the makefile the -ipo option is not present. I cleaned the object files which were created by the makefile, but still having the same problem...:-(
I have to correct myself. I cleaned the .obj files created by the makefile, but not the others, which came with the model. I moved them now to another folder and now it worked perfectly for the makefile, and for some reason for the fortran section too, thank you so much!! My only problem now is the strchr in the c++ part. I tried also to include the flag -std=c++0x, which avoids a bug, in the makefile, but for some reason it's not working there...but the strchr is the worst!!
Yes, I have several "#include" at the beginning, and string is amongst them. However, is #include string, and not #include string.h
I don't know if there's a difference between them, but doing a grep all the references to string are without the .h at the end. I'll try to change them all to see what happens and I'll let you know... Thank you
I don't know why, but it worked...somehow..the compilation through the makefile now doesn't have the strchr error (which is great, because I already tried that before reinstalling all the system and it didn't work), but the direct compilation leads to much more errors (undefined references)...but as the compilation needs to be done through the makefile, now I just need to worry about how to add the flag -std=c++0x in the makefile (I'm still working on it, but any help will be wellcome)