Jump to content

Problem building FCollada


Recommended Posts

So i'm really pulling my hair out. I have all the dependencies and I can't compile this library. This is the error I get.

** By the way, i'm on OS X **

bash -c 'mkdir -p output/{debug,release}/{FCollada/{FCDocument,FMath,FUtils},FColladaPlugins/FArchiveXML}'

g++ -W -Wall -Wno-unused-parameter -Wno-unused-function -DLINUX -fpic -O0 -g -D_DEBUG -IFCollada -I/usr/include/libxml2 -c FCollada/FCDocument/FCDGeometryInstance.cpp -o output/debug/FCollada/FCDocument/FCDGeometryInstance.o

FCollada/FCDocument/FCDGeometryInstance.cpp:1: warning: -fpic is not supported; -fPIC assumed

FCollada/FUtils/FUStringBuilder.h: In member function ‘void FUStringBuilderT<Char>::set(const TYPE&) [with TYPE = long unsigned int, Char = fchar]’:

FCollada/FUtils/FUStringConversion.h:340: instantiated from ‘static fstring FUStringConversion::ToFString(const T&) [with T = size_t]’

FCollada/FCDocument/FCDGeometryInstance.cpp:90: instantiated from here

FCollada/FUtils/FUStringBuilder.h:187: error: call of overloaded ‘append(const long unsigned int&)’ is ambiguous

FCollada/FUtils/FUStringBuilder.hpp:191: note: candidates are: void FUStringBuilderT<Char>::append(Char) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.hpp:199: note: void FUStringBuilderT<Char>::append(const fm::stringT<CharT>&) [with Char = fchar] <near match>

FCollada/FUtils/FUStringBuilder.hpp:201: note: void FUStringBuilderT<Char>::append(const Char*) [with Char = fchar] <near match>

FCollada/FUtils/FUStringBuilder.hpp:227: note: void FUStringBuilderT<Char>::append(const FUStringBuilderT<Char>&) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.h:120: note: void FUStringBuilderT<Char>::append(int32) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.h:121: note: void FUStringBuilderT<Char>::append(uint32) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.h:122: note: void FUStringBuilderT<Char>::append(uint64) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.hpp:235: note: void FUStringBuilderT<Char>::append(float) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.hpp:261: note: void FUStringBuilderT<Char>::append(double) [with Char = fchar]

FCollada/FUtils/FUStringBuilder.hpp:297: note: void FUStringBuilderT<Char>::append(const FMVector3&) [with Char = fchar] <near match>

FCollada/FUtils/FUStringBuilder.hpp:307: note: void FUStringBuilderT<Char>::append(const FMVector4&) [with Char = fchar] <near match>

make: *** [output/debug/FCollada/FCDocument/FCDGeometryInstance.o] Error 1

Thanks! I really appreciate your help.

Edited by kodai
Link to comment
Share on other sites

I still get this error.

FCollada/FUtils/FUFileManager.cpp: In static member function ‘static bool FUFileManager::MakeDirectory(const fstring&)’:
FCollada/FUtils/FUFileManager.cpp:214: error: ‘mkdir’ was not declared in this scope
FCollada/FUtils/FUFileManager.cpp: In static member function ‘static fstring FUFileManager::GetApplicationFolderName()’:
FCollada/FUtils/FUFileManager.cpp:380: error: aggregate ‘stat stat_buf’ has incomplete type and cannot be defined
FCollada/FUtils/FUFileManager.cpp:393: error: invalid use of undefined type ‘struct stat’
FCollada/FUtils/FUFileManager.cpp:380: error: forward declaration of ‘struct stat’
FCollada/FUtils/FUFileManager.cpp:395: error: ‘S_ISLNK’ was not declared in this scope
make: *** [output/debug/FCollada/FUtils/FUFileManager.o] Error 1

It looks like, under OS X, in FUFileManager.cpp, it keeps defaulting to Linux, not __APPLE__. So, if I change the final if from Linux To Apple, and remove the conditional Linux statements and just leave the windows and apple ifs, it fixes those errors.

However, when I try to compile I still get an error:

FCollada/FUtils/FUFileManager.cpp: In static member function ‘static bool FUFileManager::MakeDirectory(const fstring&)’:
FCollada/FUtils/FUFileManager.cpp:218: error: invalid conversion from ‘const char*’ to ‘const unsigned char*’
FCollada/FUtils/FUFileManager.cpp:218: error: initializing argument 7 of ‘OSErr AddFolderDescriptor(FolderType, FolderDescFlags, FolderClass, FolderLocation, OSType, OSType, const unsigned char*, Boolean)’
FCollada/FUtils/FUFileManager.cpp:218: warning: unused variable ‘err’
FCollada/FUtils/FUFileManager.cpp: In static member function ‘static fstring FUFileManager::GetApplicationFolderName()’:
FCollada/FUtils/FUFileManager.cpp:384: warning: ‘NSAddressOfSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:188)
FCollada/FUtils/FUFileManager.cpp:384: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:179)
FCollada/FUtils/FUFileManager.cpp:384: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:179)
FCollada/FUtils/FUFileManager.cpp:384: warning: ‘NSAddressOfSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:188)
make: *** [output/debug/FCollada/FUtils/FUFileManager.o] Error 1

So, I tried just deleting

	OSErr err = AddFolderDescriptor('extn', 0, 'relf', 0, 0, 0, _fname.c_str(), false);

from

#elif defined(__APPLE__)
fm::string _fname = TO_STRING(directory);
OSErr err = AddFolderDescriptor('extn', 0, 'relf', 0, 0, 0, _fname.c_str(), false);

And to my great pleasure, once that line is also removed, it makes.

*(I think all that function does is create some sort of directory, and the line I removed simply tells the OS that there's been some sort of error, so I don't think it's that critical that I can't remove it for the time being)

**(I should also mention there were a tremendous amount of warnings, for whatever that's worth)

So I go to the workspaces folder and run the update for ./update-workspaces.sh

I should mention that I had to edit my update-workspaces.sh

from

premake_dir=$(pwd)/../../premake

to


premake_dir=$(pwd)/../premake

However, when i try to make -j3 in the gcc (the last step), I get an error when it tries to build.

*(It should be noted that i had to use sudo. so, sudo make -j3)

==== Building AtlasScript ====
ScriptInterface.cpp
timer.cpp
../../../source/lib/timer.cpp: In function ‘void timer_LatchStartTime()’:
../../../source/lib/timer.cpp:72: error: cannot convert ‘timespec*’ to ‘timeval*’ for argument ‘1’ to ‘int gettimeofday(timeval*, void*)’
../../../source/lib/timer.cpp: In function ‘double timer_Time()’:
../../../source/lib/timer.cpp:90: error: ‘struct timespec’ has no member named ‘tv_usec’
AtlasObjectText.cpp
make[1]: *** [obj/lowlevel_Debug/timer.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....
AtlasObjectXML.cpp
Linking AtlasObject
Linking AtlasScript

Now, I don't know where to go from here. I should mention though that I have to copies of trunk. The one that I used above is brand new and I went through it fresh when I wrote this post (just to make sure I hadn't messed up)

But on my original trunk, the same thing happens except during the final compile I get:

==== Building Collada ====
timer.cpp
precompiled.cpp
../../../source/lib/timer.cpp: In function ‘void timer_LatchStartTime()’:
../../../source/lib/timer.cpp:72: error: cannot convert ‘timespec*’ to ‘timeval*’ for argument ‘1’ to ‘int gettimeofday(timeval*, void*)’
../../../source/lib/timer.cpp: In function ‘double timer_Time()’:
../../../source/lib/timer.cpp:90: error: ‘struct timespec’ has no member named ‘tv_usec’
make[1]: *** [obj/lowlevel_Debug/timer.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....
make[1]: `../../../binaries/system/libwxJS_dbg.a' is up to date.
CommonConvert.cpp
Decompose.cpp
DLL.cpp
../../../source/collada/DLL.cpp: In member function ‘virtual void BufferedOutputCallback::operator()(const char*, unsigned int)’:
../../../source/collada/DLL.cpp:78: warning: comparison between signed and unsigned integer expressions
../../../source/collada/DLL.cpp:84: warning: comparison between signed and unsigned integer expressions
GeomReindex.cpp
Maths.cpp
PMDConvert.cpp
PSAConvert.cpp
StdSkeletons.cpp
XMLFix.cpp
../../../source/collada/XMLFix.cpp: In function ‘void FixBrokenXML(const char*, const char**, size_t*)’:
../../../source/collada/XMLFix.cpp:178: error: invalid conversion from ‘int*’ to ‘intptr_t*’
../../../source/collada/XMLFix.cpp:178: error: initializing argument 3 of ‘void xmlDocDumpFormatMemory(xmlDoc*, xmlChar**, intptr_t*, int)’
make[1]: *** [obj/Collada_Debug/XMLFix.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Collada] Error 2

The same error about time.

What do you guys think? I hope my little excursion helps others who are trying to install on OS X!

Thanks so much, again, I appreciate your assistance.

And thank you Philip, for the patch!

Link to comment
Share on other sites

It looks like, under OS X, in FUFileManager.cpp, it keeps defaulting to Linux, not __APPLE__. So, if I change the final if from Linux To Apple, and remove the conditional Linux statements and just leave the windows and apple ifs, it fixes those errors.

Replacing "-DLINUX" with "-D__APPLE__" in CXXFLAGS in the Makefile builds with the __APPLE__ conditional statements.

I get the same error on the "Building Collada" part of the final make.

Link to comment
Share on other sites

I wonder if anyone has gotten this to work on OS X.

Thanks for the bit on the Makefile conditional statement. That's very helpful!

I hope someone can help us fix this :)

EDIT:

Ok, so I'm making a bit of progress. I can ease the pain of compilation errors. In XMLFix.cpp, change line 178 from

xmlDocDumpFormatMemory(doc, &mem,&size, 0);

to

xmlDocDumpFormatMemory(doc, &mem, (intptr_t *)size, 0);

then edit timer.cpp @ line 80ish to be:

#if OS_WIN
t = whrt_Time();
#elif HAVE_CLOCK_GETTIME
struct timespec cur;
(void)clock_gettime(CLOCK_REALTIME, &cur);
t = (cur.tv_sec - start.tv_sec) + (cur.tv_nsec - start.tv_usec)*1e-9;
#elif HAVE_GETTIMEOFDAY
struct timeval curz;
gettimeofday(&curz, 0);
t = (curz.tv_sec - start.tv_sec) + (curz.tv_usec - start.tv_nsec)*1e-6;
#else
# error "timer_Time: add timer implementation for this platform!"
#endif

That'll let Collada compile.

Atlas UI has PAGES of warnings, and this kind creature.

==== Building AtlasUI ====
../../../source/lib/res/sound/snd_mgr.cpp: In function ‘LibError alc_init()’:
../../../source/lib/res/sound/snd_mgr.cpp:259: error: invalid conversion from ‘const char*’ to ‘ALCubyte*’
../../../source/lib/res/sound/snd_mgr.cpp:259: error: initializing argument 1 of ‘ALCdevice* alcOpenDevice(ALCubyte*)’
../../../source/lib/res/sound/snd_mgr.cpp: In function ‘LibError snd_dev_prepare_enum()’:
../../../source/lib/res/sound/snd_mgr.cpp:689: error: ‘ALCchar’ was not declared in this scope
../../../source/lib/res/sound/snd_mgr.cpp:689: error: expected primary-expression before ‘)’ token
ColourTesterImageCtrl.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
make[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1
make: *** [lowlevel] Error 2
make: *** Waiting for unfinished jobs....

*sigh*

Edited by kodai
Link to comment
Share on other sites

You need libDevIL. Though there's a issue in the 1.6.8 version, I had to frankenstein together 1.6.8 and 1.7.0 includes to get it working.

Also, there's a typedef conflict with spidermonkey, you'll need to patch up jsotypes.h later.

It's compiling and launching for me (with a bunch of edits, here's my diff)

My problem now is that I cannot get libxml2 working with threading. I compile it with "--enable-threads", but "LIBXML_THREAD_ENABLED" is still not set, and it crashes and burns when starting a game. Anyone have any ideas?

Link to comment
Share on other sites

You need libDevIL. Though there's a issue in the 1.6.8 version, I had to frankenstein together 1.6.8 and 1.7.0 includes to get it working.

Also, there's a typedef conflict with spidermonkey, you'll need to patch up jsotypes.h later.

It's compiling and launching for me (with a bunch of edits, here's my diff)

My problem now is that I cannot get libxml2 working with threading. I compile it with "--enable-threads", but "LIBXML_THREAD_ENABLED" is still not set, and it crashes and burns when starting a game. Anyone have any ideas?

I made your edits and i do have libdevil installed. But i couldn't figure out how to get 1.7.0 on os x. The compile still feels on compiling Atlas.

Link to comment
Share on other sites

Here's my diff for livDevIL

Oh, and it turns out that libxml2 was compiling right, the crash was just a FCollada assertion failure that was breaking (since I removed the CoreServices debugger call earlier as it was creating a undefined symbol for some reason). I commented out the sigtrap, and yay.

JrWZB.jpg

delightful. Congratulations on getting it to work :)

I will try it tomorrow! Hope it works!

Link to comment
Share on other sites

It's delightful to see 0 A.D. running on OSX - congratulations!

I've hopefully fixed the snd_mgr trouble (OpenAL's ALC string types differ between platforms, ugh). Please PM me if it's still broken (unfortunately I can only test on Windows).

Edited by janwas
Link to comment
Share on other sites

Here's my diff for livDevIL

Oh, and it turns out that libxml2 was compiling right, the crash was just a FCollada assertion failure that was breaking (since I removed the CoreServices debugger call earlier as it was creating a undefined symbol for some reason). I commented out the sigtrap, and yay.

JrWZB.jpg

I don't mean to be a bother, but could you post the pasteit of your il.h ? It'd just be easier than going through the diff.

Thanks so much!

Also, I can now build up to pyrogenesis, but that fails because it says:

Linking pyrogenesis
ld: library not found for -lenet
collect2: ld returned 1 exit status
make[1]: *** [../../../binaries/system/pyrogenesis_dbg.app/Contents/MacOS/pyrogenesis_dbg] Error 1
make: *** [pyrogenesis] Error 2

Thoughts?

Edited by kodai
Link to comment
Share on other sites

library not found for -lenet [..] Thoughts?

We require the Enet library for networking, but unfortunately I can't help regarding its installation on OSX.

Great! thank you so much for the link. I found it, installed and it works properly. Of course, now I have a new error, and I have no idea how to fix this one. There can't possibly be something wrong with the external libraries.

what do you guys think?

==== Building AtlasUI ====
test_XeroXMB.cpp
test_XMLWriter.cpp
ScenarioEditor.cpp
test_AtlasObjectXML.cpp
Linking test
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/include/wx-2.8/wx/mac/carbon/glcanvas.h:49: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:61)
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/include/wx-2.8/wx/mac/carbon/glcanvas.h:53: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:61)
/opt/local/include/js/jsotypes.h:77: error: conflicting declaration ‘typedef struct JSUint64 uint64’
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:48: error: ‘uint64’ has a previous declaration as ‘typedef uint64_t uint64’
make[1]: *** [obj/AtlasUI_Debug/ScenarioEditor.o] Error 1
make: *** [AtlasUI] Error 2

I suspect it has something to do with spider monkey? What do you guys think?

Edited by kodai
Link to comment
Share on other sites

Great! thank you so much for the link. I found it, installed and it works properly. Of course, now I have a new error

Great :) heh, we'll fix the errors one by one until none remain.

There can't possibly be something wrong with the external libraries.

Sure there can, especially in the realm of conflicting declarations. Googling "cssmconfig.h uint64 redefinition" shows a similar problem, but it is only reported to be a 'warning'. Unfortunately I don't have much advice about how to fix this one :/ It may help to look into the cssmconfig header and see if there are any macros you could define to prevent it from declaring its uint64 (possibly the include guard to just skip the entire header). This macro would have to be defined in our header that brings in SpiderMonkey or (depending on how cssmconfig is included) in the compiler command line (-> premake.lua).

Link to comment
Share on other sites

I've made a dollop of development, but I'm not sure. (one step forward, 2 steps back? haha)

I modified my jsotypes.h to read:

#ifndef _UINT64 
typedef JSUint64 uint64;
#define _UINT64
#endif

This removes they error from before but I now get this one haha.

==== Building AtlasUI ====
SectionLayout.cpp
ScenarioEditor.cpp
DLLInterface.cpp
ScriptedTool.cpp
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/include/wx-2.8/wx/mac/carbon/glcanvas.h:49: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:61)
/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/wxPython-2.8.7.1.0003_s-py2.5-macosx-10.3-fat.egg/wx/include/wx-2.8/wx/mac/carbon/glcanvas.h:53: warning: ‘AGLDrawable’ is deprecated (declared at /System/Library/Frameworks/AGL.framework/Headers/agl.h:61)
ObjectSettings.cpp
Linking AtlasUI
ld warning: in obj/AtlasUI_Debug/ActorEditor.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ActorEditorListCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AnimListEditor.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/PropListEditor.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ActorViewer.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ColourTester.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ColourTesterColourCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ColourTesterFileCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ColourTesterImageCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ActionButton.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ToolButton.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Canvas.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ColourDialog.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/DraggableListCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/DraggableListCtrlCommands.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/EditableListCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/EditableListCtrlCommands.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/FieldEditCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ListCtrlValidator.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/QuickComboBox.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/QuickFileCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/QuickTextCtrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/FileHistory.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/HighResTimer.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/SnapSplitterWindow.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/virtualdirtreectrl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasDialog.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasWindow.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ErrorReporter.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasClipboard.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasEventLoop.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasWindowCommand.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AtlasWindowCommandProc.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Datafile.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Observable.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/FFmpeg.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/VideoRecorder.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/DLLInterface.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/precompiled.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ScenarioEditor.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/SectionLayout.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Sidebar.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Cinematic.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Environment.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/LightControl.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Terrain.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Trigger.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/AlterElevation.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/FlattenElevation.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/PaintTerrain.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/PlaceObject.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ScriptedTool.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/TransformObject.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Brushes.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/MiscState.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/ObjectSettings.o, file is not of required architecture
ld warning: in obj/AtlasUI_Debug/Tools.o, file is not of required architecture
ld warning: in /opt/local/lib/libxml2.dylib, file is not of required architecture
ld warning: in ../../../binaries/system/libAtlasObject_dbg.a, file is not of required architecture
ld warning: in ../../../binaries/system/libAtlasScript_dbg.a, file is not of required architecture
ld warning: in ../../../binaries/system/libwxJS_dbg.a, file is not of required architecture
ld warning: in /opt/local/lib/libboost_signals-mt.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libboost_filesystem-mt.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libboost_system-mt.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libIL.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libILU.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libjs.dylib, file is not of required architecture
ld warning: in /opt/local/lib/libz.dylib, file is not of required architecture
ld: in /opt/local/lib/libz.1.dylib, file is not of required architecture
collect2: ld returned 1 exit status
ld warning: duplicate dylib /opt/local/lib/libz.1.dylib
ld warning: duplicate dylib /opt/local/lib/libxml2.2.dylib
lipo: can't open input file: /var/tmp//ccMVzScP.out (No such file or directory)
make[1]: *** [../../../binaries/system/libAtlasUI_dbg.so] Error 1
make: *** [AtlasUI] Error 2

What do we think about this error?

Link to comment
Share on other sites

I don't mean to be a bother, but could you post the pasteit of your il.h ? It'd just be easier than going through the diff.

uhh... apply the diff? You don't have to go through it...

Great! thank you so much for the link. I found it, installed and it works properly.

It's dirty install things without package managements. Rather, throw together a quick macports Portfile

# $Id$

PortSystem 1.0

name enet
version 1.2
categories net
maintainers foobar
description UDP network communication layer
long_description ENet is a thin, simple and robust network communication layer on top of UDP featuring optional reliable, in-order delivery of packets.
homepage http://enet.bespin.org
platforms darwin
master_sites http://enet.bespin.org/download/
distfiles enet-1.2.tar.gz

checksums enet-1.2.tar.gz \
md5 e0d9f468d8c6f6bfd07083b3b40f5e69 \
sha1 8da3d1665e64b9f037a3e4d48d3477a846ba44e7 \
rmd160 1b68ceb791eecfeebb99762f334eacac2461eb19 \



use_autoconf yes

build.target

I suspect it has something to do with spider monkey? What do you guys think?

Like I said before, "there's a typedef conflict with spidermonkey, you'll need to patch up jsotypes.h later."

I modified my jsotypes.h to read:

#ifndef _UINT64 
typedef JSUint64 uint64;
#define _UINT64
#endif

That's what I did, but now that I think about it, there's probably a better way to fix it.

What do we think about this error?

No idea, that didn't happen to me. :\

Edited by espes
Link to comment
Share on other sites

It's delightful to see 0 A.D. running on OSX - congratulations!

I've hopefully fixed the snd_mgr trouble (OpenAL's ALC string types differ between platforms, ugh). Please PM me if it's still broken (unfortunately I can only test on Windows).

Since I don't seem to have the privileges to PM you, yeah... snd_mgr was working fine, the fix broke it for me.

../../../source/lib/res/sound/snd_mgr.cpp: In function 'LibError alc_init()':
../../../source/lib/res/sound/snd_mgr.cpp:259: error: invalid conversion from 'ALCubyte*' to 'const ALCchar*'
../../../source/lib/res/sound/snd_mgr.cpp:259: error: initializing argument 1 of 'ALCdevice* alcOpenDevice(const ALCchar*)'
../../../source/lib/res/sound/snd_mgr.cpp: In function 'LibError snd_dev_prepare_enum()':
../../../source/lib/res/sound/snd_mgr.cpp:689: error: invalid conversion from 'ALCubyte*' to 'const ALCchar*'
../../../source/lib/res/sound/snd_mgr.cpp:689: error: initializing argument 2 of 'ALCboolean alcIsExtensionPresent(ALCdevice*, const ALCchar*)'
make[1]: *** [obj/lowlevel_Debug/snd_mgr.o] Error 1

ALC's strings may differ between different distros of OpenAL, not just the Mac build (I'm just using the default Mac version, and it uses ALCchar's)

...

Yeah, the ALC from macports uses ALubyte's, it's probably a version thing.

..

Yeah, it was supposed to change from ALCubyte's to ALCchar's with the version 1.1 headers, though they both identify themselves as 1.1 >:-(

...

nevermind, I created a ticket

Edited by espes
Link to comment
Share on other sites

Since I don't seem to have the privileges to PM you, yeah... snd_mgr was working fine, the fix broke it for me.

Unfortunately we had to disable PM for new users due to spam, but I've enabled it for you now (and anyone gets access to the PM system after having made 10 posts, if someone really feel like they need to be able to send a PM before that please send me an email or post about it on the forums).

Link to comment
Share on other sites

Ok, so I'm making a bit of progress. I can ease the pain of compilation errors. In XMLFix.cpp, change line 178 from

CODE

xmlDocDumpFormatMemory(doc, &mem,&size, 0);

to

CODE

xmlDocDumpFormatMemory(doc, &mem, (intptr_t *)size, 0);

Caution, that only suppresses the compile error and risks stack corruption. I've now changed the type of "size" to intptr_t to fix this.

ALC's strings may differ between different distros of OpenAL, not just the Mac build (I'm just using the default Mac version, and it uses ALCchar's)

Correct, my bad. Simon has fixed this in the meantime.

Link to comment
Share on other sites

My /usr/include/libxml2/libxml/tree.h (from libxml2 2.7.3) says

				xmlDocDumpFormatMemory  (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);

so I think this change will cause errors if int != intptr_t (i.e. on 64-bit systems) with that version of libxml2. Older versions (e.g. 2.6.30) seem to use "int *size" too. Where is the intptr_t* coming from?

(Edit: Oops, took too long to reply and terato beat me.)

Edit again: Oh, this is probably because OS X is using FCollada's LibXML directory instead of the system library, and we copied FCollada 3.05B's code which introduced this intptr_t patch for some unknown reason. This should be fixed on OS X by using the system libxml2 instead of FCollada's copy. (Not sure what should be done on Windows). I've reverted janwas's patch now, since it's not the right solution.

Link to comment
Share on other sites

jan's patch was made to allow me to compile on my MacBook Pro under Tiger unfortunately. It seemed to be the very last thing that bloqued my compilation.

It is obviously not the good solution, but now how can I force OsX to use system libxml2 instead of FCollada's copy ? Which files/directories do I have to delete ou modify ?

TIA

Link to comment
Share on other sites

If you delete (or rename) libraries/fcollada/src/FCollada/LibXML and libraries/fcollada/include/LibXML, then recompile FCollada, then compile the game, it ought to pick up the system library correctly. (It fails on OS X and not on Linux because OS X typically has a case-insensitive filesystem, so it uses the LibXML directory instead of libxml.)

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...