GP2X Can't Compile Sdl_ttf From Open2x Svn


efegea

Active Member
Joined
Aug 8, 2005
Messages
636
Age
38
Location
GP32Spain, Spain
This is the error I get:



Code:
 open2x-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_ttf\" -DVERSION=\"2.0.7\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/open2x/include -I/usr/local/open2x/include/libxml2 -I/usr/local/open2x/include/freetype2 -I/usr/local/open2x/include -I/usr/local/open2x/include/SDL -D_REENTRANT -I/usr/X11R6/include -MT SDL_ttf.lo -MD -MP -MF .deps/SDL_ttf.Tpo -c SDL_ttf.c  -fPIC -DPIC -o .libs/SDL_ttf.o
In file included from /usr/local/open2x/include/SDL/SDL.h:44,
				 from SDL_ttf.c:57:
/usr/local/open2x/include/SDL/SDL_rwops.h:78: error: syntax error before 'FILE'
/usr/local/open2x/include/SDL/SDL_rwops.h:78: warning: no semicolon at end of struct or union
/usr/local/open2x/include/SDL/SDL_rwops.h:78: warning: no semicolon at end of struct or union
/usr/local/open2x/include/SDL/SDL_rwops.h:78: warning: no semicolon at end of struct or union
/usr/local/open2x/include/SDL/SDL_rwops.h:79: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:88: error: syntax error before '}' token
/usr/local/open2x/include/SDL/SDL_rwops.h:88: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:90: error: syntax error before '}' token
/usr/local/open2x/include/SDL/SDL_rwops.h:90: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:95: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:95: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:97: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:97: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:97: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:99: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:99: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:100: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:100: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:102: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_rwops.h:102: warning: data definition has no type or storage class
/usr/local/open2x/include/SDL/SDL_rwops.h:103: error: syntax error before '*' token
In file included from /usr/local/open2x/include/SDL/SDL.h:46,
				 from SDL_ttf.c:57:
/usr/local/open2x/include/SDL/SDL_audio.h:196: error: syntax error before '*' token
In file included from /usr/local/open2x/include/SDL/SDL_mouse.h:34,
				 from /usr/local/open2x/include/SDL/SDL_events.h:36,
				 from /usr/local/open2x/include/SDL/SDL.h:49,
				 from SDL_ttf.c:57:
/usr/local/open2x/include/SDL/SDL_video.h:543: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_video.h:554: error: syntax error before 'SDL_RWops'
In file included from SDL_ttf.c:58:
/usr/local/open2x/include/SDL/SDL_endian.h:190: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:191: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:192: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:193: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:194: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:195: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:198: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:199: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:200: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:201: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:202: error: syntax error before '*' token
/usr/local/open2x/include/SDL/SDL_endian.h:203: error: syntax error before '*' token
In file included from SDL_ttf.c:59:
SDL_ttf.h:91: error: syntax error before '*' token
SDL_ttf.h:92: error: syntax error before '*' token
SDL_ttf.c:117: error: syntax error before 'SDL_RWops'
SDL_ttf.c:117: warning: no semicolon at end of struct or union
SDL_ttf.c:123: error: syntax error before '}' token
SDL_ttf.c: In function 'RWread':
SDL_ttf.c:232: error: 'src' undeclared (first use in this function)
SDL_ttf.c:232: error: (Each undeclared identifier is reported only once
SDL_ttf.c:232: error: for each function it appears in.)
SDL_ttf.c:234: error: syntax error before ')' token
SDL_ttf.c:235: error: 'SEEK_SET' undeclared (first use in this function)
SDL_ttf.c: At top level:
SDL_ttf.c:239: error: syntax error before '*' token
SDL_ttf.c: In function 'TTF_OpenFontIndexRW':
SDL_ttf.c:254: error: 'src' undeclared (first use in this function)
SDL_ttf.c:254: error: 'SEEK_CUR' undeclared (first use in this function)
SDL_ttf.c:260: warning: incompatible implicit declaration of built-in function 'malloc'
SDL_ttf.c:260: error: dereferencing pointer to incomplete type
SDL_ttf.c:265: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c:265: error: dereferencing pointer to incomplete type
SDL_ttf.c:267: error: dereferencing pointer to incomplete type
SDL_ttf.c:268: error: dereferencing pointer to incomplete type
SDL_ttf.c:282: error: 'SEEK_END' undeclared (first use in this function)
SDL_ttf.c:284: error: 'SEEK_SET' undeclared (first use in this function)
SDL_ttf.c:286: error: dereferencing pointer to incomplete type
SDL_ttf.c:287: error: dereferencing pointer to incomplete type
SDL_ttf.c:289: error: dereferencing pointer to incomplete type
SDL_ttf.c:289: error: 'index' undeclared (first use in this function)
SDL_ttf.c:289: error: dereferencing pointer to incomplete type
SDL_ttf.c:295: error: dereferencing pointer to incomplete type
SDL_ttf.c:301: error: dereferencing pointer to incomplete type
SDL_ttf.c:301: error: 'ptsize' undeclared (first use in this function)
SDL_ttf.c:310: error: dereferencing pointer to incomplete type
SDL_ttf.c:311: error: dereferencing pointer to incomplete type
SDL_ttf.c:312: error: dereferencing pointer to incomplete type
SDL_ttf.c:312: error: dereferencing pointer to incomplete type
SDL_ttf.c:312: error: dereferencing pointer to incomplete type
SDL_ttf.c:313: error: dereferencing pointer to incomplete type
SDL_ttf.c:314: error: dereferencing pointer to incomplete type
SDL_ttf.c:315: error: dereferencing pointer to incomplete type
SDL_ttf.c:322: error: dereferencing pointer to incomplete type
SDL_ttf.c:323: error: dereferencing pointer to incomplete type
SDL_ttf.c:324: error: dereferencing pointer to incomplete type
SDL_ttf.c:333: error: dereferencing pointer to incomplete type
SDL_ttf.c:334: error: dereferencing pointer to incomplete type
SDL_ttf.c:335: error: dereferencing pointer to incomplete type
SDL_ttf.c:336: error: dereferencing pointer to incomplete type
SDL_ttf.c:336: error: dereferencing pointer to incomplete type
SDL_ttf.c:337: error: dereferencing pointer to incomplete type
SDL_ttf.c:338: error: dereferencing pointer to incomplete type
SDL_ttf.c:341: error: dereferencing pointer to incomplete type
SDL_ttf.c:342: error: dereferencing pointer to incomplete type
SDL_ttf.c:356: error: dereferencing pointer to incomplete type
SDL_ttf.c:357: error: dereferencing pointer to incomplete type
SDL_ttf.c:359: error: dereferencing pointer to incomplete type
SDL_ttf.c:360: error: dereferencing pointer to incomplete type
SDL_ttf.c:360: error: dereferencing pointer to incomplete type
SDL_ttf.c: At top level:
SDL_ttf.c:365: error: syntax error before '*' token
SDL_ttf.c: In function 'TTF_OpenFontRW':
SDL_ttf.c:367: error: 'src' undeclared (first use in this function)
SDL_ttf.c:367: error: 'ptsize' undeclared (first use in this function)
SDL_ttf.c: In function 'TTF_OpenFontIndex':
SDL_ttf.c:372: error: 'rw' undeclared (first use in this function)
SDL_ttf.c: In function 'Flush_Cache':
SDL_ttf.c:403: error: dereferencing pointer to incomplete type
SDL_ttf.c:403: error: dereferencing pointer to incomplete type
SDL_ttf.c:406: error: dereferencing pointer to incomplete type
SDL_ttf.c:407: error: dereferencing pointer to incomplete type
SDL_ttf.c:411: error: dereferencing pointer to incomplete type
SDL_ttf.c:412: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'Load_Glyph':
SDL_ttf.c:425: error: dereferencing pointer to incomplete type
SDL_ttf.c:429: error: dereferencing pointer to incomplete type
SDL_ttf.c:453: error: dereferencing pointer to incomplete type
SDL_ttf.c:465: error: dereferencing pointer to incomplete type
SDL_ttf.c:471: error: dereferencing pointer to incomplete type
SDL_ttf.c:472: error: dereferencing pointer to incomplete type
SDL_ttf.c:474: error: dereferencing pointer to incomplete type
SDL_ttf.c:475: warning: incompatible implicit declaration of built-in function 'ceil'
SDL_ttf.c:475: error: dereferencing pointer to incomplete type
SDL_ttf.c:488: error: dereferencing pointer to incomplete type
SDL_ttf.c:492: error: dereferencing pointer to incomplete type
SDL_ttf.c:492: error: dereferencing pointer to incomplete type
SDL_ttf.c:516: warning: incompatible implicit declaration of built-in function 'memcpy'
SDL_ttf.c:529: error: dereferencing pointer to incomplete type
SDL_ttf.c:530: error: dereferencing pointer to incomplete type
SDL_ttf.c:534: error: dereferencing pointer to incomplete type
SDL_ttf.c:535: warning: incompatible implicit declaration of built-in function 'ceil'
SDL_ttf.c:535: error: dereferencing pointer to incomplete type
SDL_ttf.c:541: warning: incompatible implicit declaration of built-in function 'malloc'
SDL_ttf.c:545: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c:605: error: dereferencing pointer to incomplete type
SDL_ttf.c:615: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'Find_Glyph':
SDL_ttf.c:646: error: dereferencing pointer to incomplete type
SDL_ttf.c:646: error: dereferencing pointer to incomplete type
SDL_ttf.c:648: error: dereferencing pointer to incomplete type
SDL_ttf.c:649: error: dereferencing pointer to incomplete type
SDL_ttf.c:651: error: dereferencing pointer to incomplete type
SDL_ttf.c:651: error: dereferencing pointer to incomplete type
SDL_ttf.c:653: error: dereferencing pointer to incomplete type
SDL_ttf.c:654: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_CloseFont':
SDL_ttf.c:662: error: dereferencing pointer to incomplete type
SDL_ttf.c:663: error: dereferencing pointer to incomplete type
SDL_ttf.c:665: error: dereferencing pointer to incomplete type
SDL_ttf.c:666: error: dereferencing pointer to incomplete type
SDL_ttf.c:668: error: dereferencing pointer to incomplete type
SDL_ttf.c:669: error: dereferencing pointer to incomplete type
SDL_ttf.c:669: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontHeight':
SDL_ttf.c:717: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontAscent':
SDL_ttf.c:722: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontDescent':
SDL_ttf.c:727: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontLineSkip':
SDL_ttf.c:732: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontFaces':
SDL_ttf.c:737: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontFaceIsFixedWidth':
SDL_ttf.c:742: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontFaceFamilyName':
SDL_ttf.c:747: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_FontFaceStyleName':
SDL_ttf.c:752: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_GlyphMetrics':
SDL_ttf.c:767: error: dereferencing pointer to incomplete type
SDL_ttf.c:770: error: dereferencing pointer to incomplete type
SDL_ttf.c:771: error: dereferencing pointer to incomplete type
SDL_ttf.c:772: error: dereferencing pointer to incomplete type
SDL_ttf.c:776: error: dereferencing pointer to incomplete type
SDL_ttf.c:779: error: dereferencing pointer to incomplete type
SDL_ttf.c:782: error: dereferencing pointer to incomplete type
SDL_ttf.c:783: error: dereferencing pointer to incomplete type
SDL_ttf.c:784: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_SizeText':
SDL_ttf.c:797: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:798: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_SizeUTF8':
SDL_ttf.c:821: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:822: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_SizeUNICODE':
SDL_ttf.c:862: error: dereferencing pointer to incomplete type
SDL_ttf.c:890: error: dereferencing pointer to incomplete type
SDL_ttf.c:895: error: dereferencing pointer to incomplete type
SDL_ttf.c:923: error: dereferencing pointer to incomplete type
SDL_ttf.c:924: error: dereferencing pointer to incomplete type
SDL_ttf.c:953: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_RenderText_Solid':
SDL_ttf.c:969: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:970: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUTF8_Solid':
SDL_ttf.c:996: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:997: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUNICODE_Solid':
SDL_ttf.c:1039: error: dereferencing pointer to incomplete type
SDL_ttf.c:1062: error: dereferencing pointer to incomplete type
SDL_ttf.c:1092: error: dereferencing pointer to incomplete type
SDL_ttf.c:1103: error: dereferencing pointer to incomplete type
SDL_ttf.c:1131: error: dereferencing pointer to incomplete type
SDL_ttf.c:1132: error: dereferencing pointer to incomplete type
SDL_ttf.c:1138: error: dereferencing pointer to incomplete type
SDL_ttf.c:1139: error: dereferencing pointer to incomplete type
SDL_ttf.c:1139: error: dereferencing pointer to incomplete type
SDL_ttf.c:1141: error: dereferencing pointer to incomplete type
SDL_ttf.c:1144: error: dereferencing pointer to incomplete type
SDL_ttf.c:1146: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c: In function 'TTF_RenderGlyph_Solid':
SDL_ttf.c:1167: error: dereferencing pointer to incomplete type
SDL_ttf.c:1192: warning: incompatible implicit declaration of built-in function 'memcpy'
SDL_ttf.c:1198: error: dereferencing pointer to incomplete type
SDL_ttf.c:1199: error: dereferencing pointer to incomplete type
SDL_ttf.c:1199: error: dereferencing pointer to incomplete type
SDL_ttf.c:1201: error: dereferencing pointer to incomplete type
SDL_ttf.c:1204: error: dereferencing pointer to incomplete type
SDL_ttf.c:1206: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c: In function 'TTF_RenderText_Shaded':
SDL_ttf.c:1224: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:1225: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUTF8_Shaded':
SDL_ttf.c:1251: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:1252: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUNICODE_Shaded':
SDL_ttf.c:1299: error: dereferencing pointer to incomplete type
SDL_ttf.c:1324: error: dereferencing pointer to incomplete type
SDL_ttf.c:1354: error: dereferencing pointer to incomplete type
SDL_ttf.c:1364: error: dereferencing pointer to incomplete type
SDL_ttf.c:1392: error: dereferencing pointer to incomplete type
SDL_ttf.c:1393: error: dereferencing pointer to incomplete type
SDL_ttf.c:1399: error: dereferencing pointer to incomplete type
SDL_ttf.c:1400: error: dereferencing pointer to incomplete type
SDL_ttf.c:1400: error: dereferencing pointer to incomplete type
SDL_ttf.c:1402: error: dereferencing pointer to incomplete type
SDL_ttf.c:1405: error: dereferencing pointer to incomplete type
SDL_ttf.c:1406: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c: In function 'TTF_RenderGlyph_Shaded':
SDL_ttf.c:1435: error: dereferencing pointer to incomplete type
SDL_ttf.c:1461: warning: incompatible implicit declaration of built-in function 'memcpy'
SDL_ttf.c:1467: error: dereferencing pointer to incomplete type
SDL_ttf.c:1468: error: dereferencing pointer to incomplete type
SDL_ttf.c:1468: error: dereferencing pointer to incomplete type
SDL_ttf.c:1470: error: dereferencing pointer to incomplete type
SDL_ttf.c:1473: error: dereferencing pointer to incomplete type
SDL_ttf.c:1474: warning: incompatible implicit declaration of built-in function 'memset'
SDL_ttf.c: In function 'TTF_RenderText_Blended':
SDL_ttf.c:1491: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:1492: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUTF8_Blended':
SDL_ttf.c:1518: warning: incompatible implicit declaration of built-in function 'strlen'
SDL_ttf.c:1519: warning: incompatible implicit declaration of built-in function 'alloca'
SDL_ttf.c: In function 'TTF_RenderUNICODE_Blended':
SDL_ttf.c:1559: error: dereferencing pointer to incomplete type
SDL_ttf.c:1572: error: dereferencing pointer to incomplete type
SDL_ttf.c:1603: error: dereferencing pointer to incomplete type
SDL_ttf.c:1613: error: dereferencing pointer to incomplete type
SDL_ttf.c:1646: error: dereferencing pointer to incomplete type
SDL_ttf.c:1647: error: dereferencing pointer to incomplete type
SDL_ttf.c:1653: error: dereferencing pointer to incomplete type
SDL_ttf.c:1654: error: dereferencing pointer to incomplete type
SDL_ttf.c:1654: error: dereferencing pointer to incomplete type
SDL_ttf.c:1656: error: dereferencing pointer to incomplete type
SDL_ttf.c:1660: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_RenderGlyph_Blended':
SDL_ttf.c:1686: error: dereferencing pointer to incomplete type
SDL_ttf.c:1708: error: dereferencing pointer to incomplete type
SDL_ttf.c:1709: error: dereferencing pointer to incomplete type
SDL_ttf.c:1709: error: dereferencing pointer to incomplete type
SDL_ttf.c:1711: error: dereferencing pointer to incomplete type
SDL_ttf.c:1715: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_SetFontStyle':
SDL_ttf.c:1727: error: dereferencing pointer to incomplete type
SDL_ttf.c: In function 'TTF_GetFontStyle':
SDL_ttf.c:1733: error: dereferencing pointer to incomplete type
make[1]: *** [SDL_ttf.lo] Error 1
make[1]: se sale del directorio `/home/frajan/svn/open2x/libs/SDL_ttf-2.0.7'
make: *** [/usr/local/open2x/lib/libSDL_ttf.a] Error 2
 
Well, um, I just a few hours ago did it successfully. Hmm.

Looking into the errors a bit, it looks like your SDL header files are way different from mine for some reason, the errors make no sense when looking at my SDL headers. Is SDL installed correctly? Are you building packages one at a time or using the toplevel makefile?
 
I'm using the toplevel makefile. The only issue I had is with lubungif, it didn't compile.

I'm running amd64 gentoo linux. I will try to compile SDL again.
 
It seems that linux headers got installed on /usr/local/open2x/open2x .. weird :-S

I've solved the problem by copying all the contents of open2x/open2x/ to open2x/

Then I got another issue, there were not "include/linux/bytecode/little_endian.h" so I copied "include/linux/endian.h" to that and...worked! wow! sdl_ttf compiled!

Now I'm running into issues with static compilation of my game (unresolved symbols and so) but the electricity cutted off and I had to go to work. Will try again when I arrive at home.
 
Hmm, don't know how to explain that.

I've gotten best results installing devkitGP2X, then building the open2x lib on top of that (by modifying the makefile to change the prefix and stuff). You might want to try that if you can't get open2X working right.
 
Well...I compiled my game...it runs too slow ingame but I think it's because it has too many layers, I have to optimize it. But the weird thing is the audio runs too fast, and the "flipped" sprites has corrupted transparency. It also lockups when changing level, and when the text "LEVEL UP" appears, if you are pressing the joystick, the sprites vibrate.

All of this doesn't happens on my pc :-S
 
Back
Top