Jump to content

error: ‘vswprintf_s’ was not declared in this scope


Recommended Posts

Hi,

I have a building issue under Linux with svn version 7055

==== Building lowlevel ====
debug.cpp
../../../source/lib/debug.cpp: In member function ‘bool PrintfWriter::operator()(const wchar_t*, ...)’:
../../../source/lib/debug.cpp:279: erreur: ‘vswprintf_s’ was not declared in this scope
../../../source/lib/debug.cpp: At global scope:
../../../source/lib/debug.cpp:41: attention : ‘LINE_41_2’ defined but not used
../../../source/lib/debug.cpp:42: attention : ‘LINE_42_2’ defined but not used
../../../source/lib/debug.cpp:43: attention : ‘LINE_43_2’ defined but not used
../../../source/lib/debug.cpp:44: attention : ‘LINE_44_2’ defined but not used
../../../source/lib/debug.cpp:45: attention : ‘LINE_45_2’ defined but not used
../../../source/lib/debug.cpp:46: attention : ‘LINE_46_2’ defined but not used
../../../source/lib/debug.cpp:47: attention : ‘LINE_47_2’ defined but not used
../../../source/lib/debug.cpp:48: attention : ‘LINE_48_2’ defined but not used
../../../source/lib/debug.cpp:49: attention : ‘LINE_49_2’ defined but not used
../../../source/lib/debug.cpp:50: attention : ‘LINE_50_2’ defined but not used
make[1]: *** [obj/lowlevel_Debug/debug.o] Erreur 1
make: *** [lowlevel] Erreur 2

It seems that vswprintf_s is not declared. Is that windows specific ?

Thanks for your help.

Link to comment
Share on other sites

Same error here, Linux (Ubuntu Jaunty), last svn version.


==== Building lowlevel ====
debug.cpp
../../../source/lib/debug.cpp: In member function ‘bool PrintfWriter::operator()(const wchar_t*, ...)’:
../../../source/lib/debug.cpp:279: error: ‘vswprintf_s’ was not declared in this scope
make[1]: *** [obj/lowlevel_Debug/debug.o] Error 1
make: *** [lowlevel] Error 2

Edited by Sharwin_F
Link to comment
Share on other sites

Same error here, on Mac OsX, rev 7057 :) :


debug.cpp
../../../source/lib/debug.cpp: In member function 'bool PrintfWriter::operator()(const wchar_t*, ...)':
../../../source/lib/debug.cpp:279: error: 'vswprintf_s' was not declared in this scope
make[1]: *** [obj/lowlevel_Debug/debug.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....

Note that I compiled with gcc 4.3

Edit : switched to gcc 4.2 and finally gcc 4.1, but got other various errors plus the one above :


ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ sudo gcc_select mp-gcc41
Selecting version "mp-gcc41" for gcc
ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ ./update-workspaces.sh
==== Building Premake ====
make[1]: `../bin/premake' is up to date.
WARNING: Detected GCC <4.2 -- disabling PCH for Atlas (will increase build times)
Generating GNU makefiles:
...pyrogenesis
...network
...engine
...graphics
...i18n
...atlas
...gui
...lowlevel
...AtlasObject
...AtlasScript
...wxJS
...AtlasUI
...ActorEditor
...ColourTester
...Collada
...test_gen
...test
ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces arnaud$ cd gcc
ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces/gcc arnaud$ make -j3
==== Building network ====
==== Building graphics ====
==== Building engine ====
make[1]: `../../../binaries/system/libnetwork_dbg.a' is up to date.
==== Building i18n ====
make[1]: `../../../binaries/system/libi18n_dbg.a' is up to date.
==== Building atlas ====
make[1]: `../../../binaries/system/libgraphics_dbg.a' is up to date.
==== Building gui ====
make[1]: `../../../binaries/system/libatlas_dbg.a' is up to date.
==== Building lowlevel ====
debug.cpp
make[1]: `../../../binaries/system/libgui_dbg.a' is up to date.
debug_stl.cpp
make[1]: `../../../binaries/system/libengine_dbg.a' is up to date.
==== Building AtlasObject ====
make[1]: `../../../binaries/system/libAtlasObject_dbg.a' is up to date.
==== Building AtlasScript ====
cc1plus: make[1]: `../../../binaries/system/libAtlasScript_dbg.a' is up to date.
error: obj/lowlevel_Debug/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
cc1plus: error: obj/lowlevel_Debug/precompiled.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
==== Building wxJS ====
precompiled.cpp
Linking wxJS
../../../source/lib/debug.cpp: In member function 'bool PrintfWriter::operator()(const wchar_t*, ...)':
../../../source/lib/debug.cpp:279: error: 'vswprintf_s' was not declared in this scope
../../../source/lib/debug.cpp: At global scope:
../../../source/lib/debug.cpp:41: warning: 'LINE_41_2' defined but not used
../../../source/lib/debug.cpp:42: warning: 'LINE_42_2' defined but not used
../../../source/lib/debug.cpp:43: warning: 'LINE_43_2' defined but not used
../../../source/lib/debug.cpp:44: warning: 'LINE_44_2' defined but not used
../../../source/lib/debug.cpp:45: warning: 'LINE_45_2' defined but not used
../../../source/lib/debug.cpp:46: warning: 'LINE_46_2' defined but not used
../../../source/lib/debug.cpp:47: warning: 'LINE_47_2' defined but not used
../../../source/lib/debug.cpp:48: warning: 'LINE_48_2' defined but not used
../../../source/lib/debug.cpp:49: warning: 'LINE_49_2' defined but not used
../../../source/lib/debug.cpp:50: warning: 'LINE_50_2' defined but not used
make[1]: *** [obj/lowlevel_Debug/debug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
==== Building Collada ====
precompiled.cpp
make[1]: *** [obj/lowlevel_Debug/debug_stl.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:255: error: '__m128i' does not name a type
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:256: error: '__m128d' does not name a type
make[1]: *** [obj/Collada_Debug/precompiled.h.gch] Error 1
make: *** [Collada] Error 2

Edited by arn34
Link to comment
Share on other sites

Oops, sorry :) We've been emulating secure CRT (e.g. strcpy_s) functions for non-Windows platforms as needed, I didn't realize vsprintf wasn't yet included.

r7060 attempts to fix this. (I can only test on Windows, please yell if that doesn't do the trick)

Edited by janwas
Link to comment
Share on other sites

Worked for me too, execpt that I get a new error :


==== Building pyrogenesis ====
main.cpp
Linking pyrogenesis
/usr/bin/ld: warning -L: directory name (../../../libraries/dl/lib) does not exist
/usr/bin/ld: Undefined symbols:
___stack_chk_fail
___stack_chk_guard
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/libCollada_dbg.so] Error 1
make: *** [Collada] Error 2
make: *** Waiting for unfinished jobs....
/usr/bin/ld: warning -L: directory name (../../../libraries/comsuppw/lib) does not exist
/usr/bin/ld: Undefined symbols:
___stack_chk_fail
___stack_chk_guard
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis_dbg.app/Contents/MacOS/pyrogenesis_dbg] Error 1
make: *** [pyrogenesis] Error 2
ActorEditorListCtrl.cpp
AnimListEditor.cpp
ActorEditor.cpp
PropListEditor.cpp
ActorViewer.cpp
ColourTester.cpp
ColourTesterColourCtrl.cpp
ColourTesterFileCtrl.cpp
ColourTesterImageCtrl.cpp
ActionButton.cpp
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:34:19: error: IL/il.h: No such file or directory
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:35:20: error: IL/ilu.h: No such file or directory
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp: In constructor 'ColourTesterImageCtrl::ColourTesterImageCtrl(wxWindow*)':
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:48: error: 'ilInit' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:49: error: 'ILuint' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:49: error: expected primary-expression before ')' token
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:49: error: 'ilGenImages' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:50: error: 'IL_KEEP_DXTC_DATA' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:50: error: 'IL_TRUE' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:50: error: 'ilSetInteger' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp: In member function 'void ColourTesterImageCtrl::SetImageFile(const wxFileName&)':
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:55: error: 'ilBindImage' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:57: error: 'IL_ORIGIN_UPPER_LEFT' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:57: error: 'ilOriginFunc' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:58: error: 'IL_ORIGIN_SET' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:58: error: 'ilEnable' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:59: error: 'ilLoadImage' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:67: error: 'IL_DXTC_DATA_FORMAT' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:67: error: 'ilGetInteger' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:69: error: 'IL_RGBA' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:69: error: 'IL_UNSIGNED_BYTE' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:69: error: 'ilConvertImage' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:75: error: 'ILinfo' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:75: error: expected `;' before 'info'
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:76: error: 'info' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:76: error: 'iluGetImageInfo' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp: In member function 'wxString ColourTesterImageCtrl::GetImageFiletype()':
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:96: error: 'IL_DXTC_DATA_FORMAT' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:96: error: 'ilGetInteger' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:97: error: 'IL_DXT1' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:98: error: 'IL_DXT2' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:99: error: 'IL_DXT3' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:100: error: 'IL_DXT4' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:101: error: 'IL_DXT5' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:103: error: 'IL_IMAGE_WIDTH' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:103: error: 'ilGetInteger' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:103: error: 'IL_IMAGE_HEIGHT' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp: In member function 'void ColourTesterImageCtrl::CalculateImage()':
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:126: error: 'ilBindImage' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:128: error: 'ILubyte' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:128: error: 'data' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:128: error: 'ilGetData' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:129: error: 'ILinfo' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:129: error: expected `;' before 'info'
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:130: error: 'info' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:130: error: 'iluGetImageInfo' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:137: error: 'p0' was not declared in this scope
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:137: error: 'p1' was not declared in this scope
make[1]: *** [obj/AtlasUI_Debug/ColourTesterImageCtrl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [AtlasUI] Error 2

Note that I did not compiled again fcollada after new svn release, I just ran once again ./update-workspace.sh and make -j3. Maybe should I have ? I'll try immediately !

Link to comment
Share on other sites

/usr/bin/ld: Undefined symbols:

___stack_chk_fail

___stack_chk_guard

Hmm, sounds like you might have glibc older than 2.4, which doesn't support the stack-protection feature. So either we need to make the build system detect this, or you can hack it by removing the "-fstack-protector-all" line (I think that's all that's needed; if not, maybe the next line too) from build/premake/premake.lua and then do ./update-workspaces.sh and make clean etc.

Link to comment
Share on other sites

Right, glibc is 2.m4

I am running Tiger, so I guess other mac users will encounter this.

About devIL, it is installed (I did compile last version of 0ad). But I don't know what's wrong with my system today, it doesn't find anything (I've had to reinstall libenet through macports cause it wasn't able to find it anymore ?).

I'll make some tests with macports devIL, althought it seems to me the 1.6.8 version provided by macports is not compatible with gcc 4.3 => I'll switch back to gcc 4.2 :)

Link to comment
Share on other sites

Right, I managed to get the game compile once again, so I'll update the wiki to recommend getting libdevil from macports, using gcc4.2, which is compatible with devIL 1.6.8 AFAIK, and commenting the two lines here above. I suggest that you handle it in the build system.

I just get a last error, but that doesn't prevent the launching of the game :


ColourTesterImageCtrl.cpp
In file included from ../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:34:
/opt/local/include/IL/il.h:448: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:448: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:449: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:449: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:456: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:456: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:467: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:467: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:469: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:469: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:472: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:472: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:473: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:473: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:476: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:476: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:492: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:492: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:504: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:504: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:505: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:505: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:506: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:506: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h:521: error: '<anonymous>' has incomplete type
/opt/local/include/IL/il.h:521: error: invalid use of 'ILvoid'
In file included from ../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:35:
/opt/local/include/IL/ilu.h:125: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:125: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:128: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:128: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:129: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:129: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:134: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:134: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:135: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:135: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:136: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:136: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:137: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:137: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:140: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:140: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:143: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:143: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:145: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:145: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:151: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:151: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:152: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:152: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:154: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:154: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:155: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:155: error: invalid use of 'ILvoid'
/opt/local/include/IL/ilu.h:169: error: '<anonymous>' has incomplete type
/opt/local/include/IL/ilu.h:169: error: invalid use of 'ILvoid'
/opt/local/include/IL/il.h: In constructor 'ColourTesterImageCtrl::ColourTesterImageCtrl(wxWindow*)':
/opt/local/include/IL/il.h:476: error: too few arguments to function 'ILvoid ilInit(<type error>)'
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:48: error: at this point in file
/opt/local/include/IL/il.h: In member function 'void ColourTesterImageCtrl::CalculateImage()':
/opt/local/include/IL/il.h:467: error: too few arguments to function 'ILubyte* ilGetData(<type error>)'
../../../source/tools/atlas/AtlasUI/ColourTester/ColourTesterImageCtrl.cpp:128: error: at this point in file
make[1]: *** [obj/AtlasUI_Debug/ColourTesterImageCtrl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [AtlasUI] Error 2

strange isn't it, as ColourTesterImageCtrl.cpp compiled with gcc 4.3 (see code snippet here above) ? Another ALCvoid-like issue ?

Edited by arn34
Link to comment
Share on other sites

Those compile errors are from Atlas (and its freestanding tools), which is compiled separately from the game (thus explaining why it still runs).

Another ALCvoid-like issue ?

That's possible, but I thought we'd concluded that GCC > 4.2 causes the error. Here it's the opposite.

Can you post a few of the referenced lines in il.h and ilu.h so I can check?

Link to comment
Share on other sites

But 7060 introduces this new issue:

==== Building network ====
precompiled.cpp
In file included from ../../../source/lib/precompiled.h:72,
from ../../../source/pch/network/precompiled.h:18,
from ../../../source/pch/network/precompiled.cpp:18:
../../../source/lib/secure_crt.h:86: erreur: ‘va_list’ has not been declared
../../../source/lib/secure_crt.h:87: erreur: ‘va_list’ has not been declared

Link to comment
Share on other sites

Those compile errors are from Atlas (and its freestanding tools), which is compiled separately from the game (thus explaining why it still runs).

Yes, I don't worry about that, I know the game runs OK. Anyway, I'd like to help fixing Atlas not running on OS X, so it would be great if I could at least compile it :D

Another ALCvoid-like issue ?

That's possible, but I thought we'd concluded that GCC > 4.2 causes the error. Here it's the opposite.

:)

Can you post a few of the referenced lines in il.h and ilu.h so I can check?

I'll do it tomorrow and post you all that in PM

Link to comment
Share on other sites

Last revision solves the first error on this trhead, thanks!!!!

but... still something goes wrong compiling on Linux :)

I am able to run the game, but when I press the button to start the match, it crashed and all I get is this:


Assertion failure: (uint32)2 < JS_MIN(((obj)->map)->freeslot, ((obj)->map)->nslots), at jsapi.c:2118
Aborted

Here you have the compilation error:


==== Building AtlasUI ====
precompiled.cpp
In file included from /usr/include/wx-2.8/wx/dcgraph.h:17,
from /usr/include/wx-2.8/wx/dc.h:881,
from /usr/include/wx-2.8/wx/wx.h:48,
from /usr/include/wx-2.8/wx/wxprec.h:68,
from ../../../source/tools/atlas/AtlasUI/Misc/precompiled.h:43,
from ../../../source/tools/atlas/AtlasUI/Misc/precompiled.cpp:18:
/usr/include/wx-2.8/wx/geometry.h:91: warning: redundant redeclaration of ‘wxPoint2DInt operator*(wxInt32, const wxPoint2DInt&)’ in same scope
/usr/include/wx-2.8/wx/geometry.h:90: warning: previous declaration of ‘wxPoint2DInt operator*(wxInt32, const wxPoint2DInt&)’
/usr/include/wx-2.8/wx/geometry.h:93: warning: redundant redeclaration of ‘wxPoint2DInt operator*(const wxPoint2DInt&, wxInt32)’ in same scope
/usr/include/wx-2.8/wx/geometry.h:92: warning: previous declaration of ‘wxPoint2DInt operator*(const wxPoint2DInt&, wxInt32)’
/usr/include/wx-2.8/wx/geometry.h:96: warning: redundant redeclaration of ‘wxPoint2DInt operator/(const wxPoint2DInt&, wxInt32)’ in same scope
/usr/include/wx-2.8/wx/geometry.h:95: warning: previous declaration of ‘wxPoint2DInt operator/(const wxPoint2DInt&, wxInt32)’
ActorEditor.cpp
ActorEditorListCtrl.cpp
AnimListEditor.cpp
PropListEditor.cpp
ActorViewer.cpp
ColourTester.cpp
ColourTesterColourCtrl.cpp
ColourTesterFileCtrl.cpp
ColourTesterImageCtrl.cpp
ActionButton.cpp
ToolButton.cpp
Canvas.cpp
ColourDialog.cpp
DraggableListCtrl.cpp
DraggableListCtrlCommands.cpp
EditableListCtrl.cpp
EditableListCtrlCommands.cpp
FieldEditCtrl.cpp
ListCtrlValidator.cpp
QuickComboBox.cpp
QuickFileCtrl.cpp
QuickTextCtrl.cpp
FileHistory.cpp
HighResTimer.cpp
SnapSplitterWindow.cpp
virtualdirtreectrl.cpp
AtlasDialog.cpp
AtlasWindow.cpp
ErrorReporter.cpp
AtlasClipboard.cpp
AtlasEventLoop.cpp
AtlasWindowCommand.cpp
AtlasWindowCommandProc.cpp
Datafile.cpp
Observable.cpp
FFmpeg.cpp
VideoRecorder.cpp
DLLInterface.cpp
ScenarioEditor.cpp
SectionLayout.cpp
Sidebar.cpp
Cinematic.cpp
Environment.cpp
LightControl.cpp
Terrain.cpp
Trigger.cpp
AlterElevation.cpp
FlattenElevation.cpp
PaintTerrain.cpp
PlaceObject.cpp
ScriptedTool.cpp
TransformObject.cpp
Brushes.cpp
MiscState.cpp
ObjectSettings.cpp
Tools.cpp
Linking AtlasUI
../../../binaries/system/libAtlasScript_dbg.a(ScriptInterface.o): In function `~ScriptInterface_impl':
/media/DATOS_Bigas2/jocs/0AD/build/workspaces/gcc/../../../source/tools/atlas/AtlasScript/ScriptInterface.cpp:606: undefinedreference to `JS_EndRequest'
/media/DATOS_Bigas2/jocs/0AD/build/workspaces/gcc/../../../source/tools/atlas/AtlasScript/ScriptInterface.cpp:606: undefinedreference to `JS_EndRequest'
../../../binaries/system/libAtlasScript_dbg.a(ScriptInterface.o): In function `ScriptInterface_impl':
/media/DATOS_Bigas2/jocs/0AD/build/workspaces/gcc/../../../source/tools/atlas/AtlasScript/ScriptInterface.cpp:572: undefinedreference to `JS_BeginRequest'
/media/DATOS_Bigas2/jocs/0AD/build/workspaces/gcc/../../../source/tools/atlas/AtlasScript/ScriptInterface.cpp:572: undefinedreference to `JS_BeginRequest'
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/libAtlasUI_dbg.so] Error 1
make: *** [AtlasUI] Error 2

Edited by Sharwin_F
Link to comment
Share on other sites

Assertion failure: (uint32)2 < JS_MIN(((obj)->map)->freeslot, ((obj)->map)->nslots), at jsapi.c:2118

Aborted

Hm, this might be another instance of a known problem when the SpiderMonkey library wasn't compiled with the same version/flags we need. Mid-term, Philip (who knows more about the topic) was wanting to add source+makefiles to SVN so that we can rule out such incompatibilities. Unfortunately I don't know a short-term workaround, nor can I help with the wxW issue.

Link to comment
Share on other sites

Checked out last svn revision and modified il.h and ilu.h (I replaced all ILvoid by void, execpt typedef) to solve ILvoid problems (this worked perfectly), but I now get a new error in Atlas compilation :


In file included from ../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:32:
../../../source/tools/atlas/AtlasUI/ErrorReporter/ErrorReporter.h:1:20: warning: no newline at end of file
../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:48:2: error: #error libxml2 must have threading support enabled
SectionLayout.cpp
make[1]: *** [obj/AtlasUI_Debug/DLLInterface.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [AtlasUI] Error 2

About my installed libxml2 (through macports) :

ordinateur-de-arnaud:~/Desktop/0ad/build/workspaces/gcc arnaud$ port info libxml2
libxml2 @2.7.3 (textproc)
Variants: debug, universal

Libxml is the XML C library developed for the Gnome project. XML itself is a metalanguage to design markup languages. Though the
library is written in C, a variety of language bindings make it available in other environments.
Homepage: http://xmlsoft.org/

Library Dependencies: libiconv, zlib
Platforms: darwin
Maintainers: cedric.luthi@gmail.com

The error message is pretty clear, so I'll try to compile libxml2 with thread support. The one provided by macports doesn't fit obviously ...

Link to comment
Share on other sites

Well, after reading the man pages, it seems to me that thread support is enabled by default. Can someone confirm that ?

Anyway, I modified the portfile, passing the --with-threads option to ./configure and it does not seem to do much more : I still get the error, so I believe that DLLInterface.cpp just can't check correctly that LIBXML_THREAD_ENABLED is set on my system. Don't know why ...

How could I verify that LIBXML_THREAD_ENABLED is set ?

And is this option mandatory finally ?

Link to comment
Share on other sites

Could you look in /usr/include/libxml2/libxml/xmlversion.h (I'm assuming it's the same path on OS X) for the block of code that sets LIBXML_THREAD_ENABLED?

We use libxml2 in multiple threads simultaneously, so it really needs to have been compiled with LIBXML_THREAD_ENABLED (else it uses some per-process global data structures, if I remember correctly). Our code doesn't directly depend on that flag, but it checks to make sure libxml2 was compiled properly.

Link to comment
Share on other sites

in xmlversion.h, I have :


/**
* LIBXML_THREAD_ENABLED:
*
* Whether the thread support is configured in
*/
#if 1
#if defined(_REENTRANT) || defined(__MT__) || \
(defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
#define LIBXML_THREAD_ENABLED
#endif
#endif

edit: oups, sorry, I did not see that espes had already replied ...

Edited by arn34
Link to comment
Share on other sites

Well, the problem persists (svn rev. 7078) :


In file included from ../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:32:
../../../source/tools/atlas/AtlasUI/ErrorReporter/ErrorReporter.h:1:20: warning: no newline at end of file
../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:48:2: error: #error libxml2 must have threading support enabled
SectionLayout.cpp
make[1]: *** [obj/AtlasUI_Debug/DLLInterface.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [AtlasUI] Error 2

Edited by arn34
Link to comment
Share on other sites

I tried patching build/premake/extern_libs.lua in another way, like suggested by espes :

So I removed your changes made in rev 7078 :


-- libxml2 needs _REENTRANT or __MT__ for thread support;
-- OS X doesn't get either set by default, so do it manually
if OS == "osx" then
tinsert(package.defines, "_REENTRANT")
end

and replaced them by the patch suggested by espes :


if OS == "macosx" then
tinsert(package.buildoptions, "-D_REENTRANT")
end

Don't know what's the deep difference (all I can see are the obvious "macosx" vs "osx" and "package.buildoptions, "-D_REENTRANT"" vs "package.defines, "_REENTRANT""), but it worked :


...
DLLInterface.cpp
ScenarioEditor.cpp
In file included from ../../../source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp:32:
../../../source/tools/atlas/AtlasUI/ErrorReporter/ErrorReporter.h:1:20: warning: no newline at end of file
SectionLayout.cpp
...

But now I get this error later (wouldn't be funny otherwise ;) ) :


Linking ColourTester
/usr/bin/ld: can't locate file for: -lAtlasUI_dbg
/collect2: ld returned 1 exit status
usr/bin/ld: can't locate file for: -lAtlasUI_dbg
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/ActorEditor_dbg.app/Contents/MacOS/ActorEditor_dbg] Error 1
make[1]: *** [../../../binaries/system/ColourTester_dbg.app/Contents/MacOS/ColourTester_dbg] Error 1
make: *** [ColourTester] Error 2
make: *** Waiting for unfinished jobs....
make: *** [ActorEditor] Error 2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...