[SOLVED] truncated or malformed object when compiling for iPhone

Previous topic - Next topic

Dark Schneider

I have this error including if I compile a new empty project, it only fails when compiling for iPhone, many other targets (GP2X-WIZ, GP2X, Xbox-Linux) compiles with no error.

With an empty project, I have this:

Code (glbasic) Select

_______________________________________
*** Configuration: IPHONE ***
precompiling:
GPC - GLBasic Precompiler V.8.142 SN:74167187 - 3D, NET
Wordcount:0 commands
compiling:
arch:
/cygdrive/q/Compiler/platform/iPhone/bin/arm-apple-darwin9-libtool: object: gpc_tempg.o truncated or malformed object (offset field of section 2 in LC_SEGMENT command 0 extends past the end of the file)
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 4.2 sec. Time: 13:16
Build: 0 succeeded.
*** 1 FAILED ***


I think my compiler is up to date, it doesn't detect any new version.

Any ideas?

Kitty Hello

that is very strange. Please attach the .o file and the gpc_tempg.cpp file from the temp directory.

Dark Schneider

#2
I have found that compiling with a new account, administrator or standard there is no problem, at least with an empty project.

Maybe after much time using the same user for working with GLBasic, and after many updates, it has some corruption in GLBasic config, when launching it with the new user (standard one) I see that the output window is in bold font, and my current user one is not bold, so there are different things.

For that, I'd like to know if there is a way to remove all GLBasic configs (including register), because we can only reset the home path. In other words, achieve that when run it again, it was like if it was installed for first time.

Quote from: Kitty Hello on 2011-Jan-14
that is very strange. Please attach the .o file and the gpc_tempg.cpp file from the temp directory.

Attached.

[attachment deleted by admin]

Kitty Hello

Seems a valid file.
On the 2 user accounts compare the PATH environment variable.
Also, delete the temp directory. And in GLBasic options set the temp path to something short. C:\Temp is best.

Dark Schneider

This user has no Path enviroment variable (user vars are only TEMP and TMP), uses the system one, like the other profiles.

Changed the temp folder but not works.

MrTAToad

Do you have MinGW installed or some other development tools ?

Dark Schneider

#6
MinGW not, I have only VS2008 Express, but this was installed much time ago and I could compile for iPhone until recently.

I have found that compiling for OS-X_uni fails too, the output is:

Code (glbasic) Select
_______________________________________
*** Configuration: OS-X_UNI ***
precompiling:
GPC - GLBasic Precompiler V.8.142 SN:74167187 - 3D, NET
Wordcount:0 commands
compile+link:
/cygdrive/q/Compiler/platform/Mac/Bin/../libexec/gcc/powerpc-apple-darwin9/4.0.1/ld: /cygdrive/c/Users/Usuario/AppData/Local/Temp/ccnzpQQ0.o cmdsize field of load command 0 is inconsistant for a segment command with the number of sections it has
/cygdrive/q/Compiler/platform/Mac/Bin/../libexec/gcc/powerpc-apple-darwin9/4.0.1/ld: /cygdrive/c/Users/Usuario/AppData/Local/Temp/ccQuxUc4.o cmdsize field of load command 0 is inconsistant for a segment command with the number of sections it has
Mac OSX compiler wrapper
compile for PowerPC
call:
"Q:\Compiler\platform\Mac\Bin\powerpc-apple-darwin9-g++.exe" -pipe -O3 -w -isysroot "/cygdrive/Q/Compiler/platform/Mac/SDKs/MacOSX10.4u.sdk" -I"/cygdrive/Q/Compiler/platform/Include" -I"/cygdrive/C/Users/Usuario/Documents/GLBasic/Projects/test" -L"/cygdrive/Q/Compiler/platform/Mac/OSX/Lib" -framework OpenGL -framework Cocoa -framework QuickTime -DMACOSX -DMAC -DTARGET_OS_MAC -DNDEBUG -DWANT_SDL -DHAVE_OPENGL "/cygdrive/C/Users/Usuario/AppData/Local/Temp/glbasic/gpc_tempg.cpp" "/cygdrive/C/Users/Usuario/AppData/Local/Temp/glbasic/gpc_temp0.cpp"    -lGLBasicUni -lSDL_mixer -lSDL -lSDLmain -lpng_uni -lstdc++-static -o "/cygdrive/C/Users/Usuario/AppData/Local/Temp/glbasic/output.ppc" -DOSXUNI=1
CurDir:
C:\Users\Usuario\AppData\Local\Temp\glbasic
failed (exit code 1)!
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 2.7 sec. Time: 16:19
Build: 0 succeeded.
*** 1 FAILED ***


I don't know why I have problems with Apple targets.

MrTAToad

Until now, we've generally thought it to be MinGW or something like that...  Can you create a new user in Windows, and compile for Mac in that (try with Admin and standard user settings)

If it works, then there is a pathing problem.

Dark Schneider

With a new user (any type) works fine for both, iPhone and OS-X. Maybe is problem of running apps from Q drive, when compiling for OSX with success, it takes some time, but with this user that fails, it fails immediately. However the Q drive is well constructed, I open it quickly and has content.

I begin to suspect that can be a Windows problem, it has the bad habit of corrupt users when used for long time and heavy use. Recently (but after failure when compiling for iPhone) I had to recover a failure of "user service" (see http://www.ehow.com/how_7576997_repair-profile-list-registry.html ).

At this moment I can't do it, but when I can I will do a profile transfer :rant:, creating a new one and copying all personal files and files in AppData of my interest (a good moment for clearing garbage). But with all new registry values, I expect this problem ends. If it works and I remember, I will talk here about the result, but I think configs in AppData folder should not be the problem.

bigsofty

Little chance but you didn't edit your source in an external editor? I found that once the CTRL chars that the GLBEditor uses for folding could be missinterpreted by other text editors, corrupting the GLB source for the compiler.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Dark Schneider

Not, all in the GLBasic editor, and more if is a new empty project, as the empty one fails too.

Dark Schneider

Confirmed, it was user corruption, I just have made one of my fast user transfer, all is exactly like my previous user profile, but with new and clear registry values, and compiles with no problem.

KH maybe you'd like to advice about this in somewhere (maybe GLBasic help file), I have seen that other people had this problem, but they did one thing more radical, a format, this is not needed because a simple transfer to a new clear user is enough.

The problem could be about the virtual cygdrive or something like that, maybe changing the compilation process, installing GLBasic in a public folder (not protected like the Program Files one), and doing all the compilation process in a GLBasic inner enviroment (its own folder) could evade this, but in any case with a new user this problem is solved.

I can compile again for iPhone :good: