Jump to content
Eternal Lands Official Forums
Aislinn

cal3d CalCore* errors when compiling

Recommended Posts

I've been trying to compile for about a week now and just can't get past the cal3d errors.  I don't know if it's an easy fix for an include that wasn't included, or if my cal3d is malfunctioning.   Any input appreciated.

https://pastebin.com/vDebsvNc

Hmm, I guess we can't use code option anymore. :( At least I can't find it.

Share this post


Link to post
Share on other sites

I'm seeing identical errors while trying to compile for macOS:

Undefined symbols for architecture i386:
  "CalCoreMesh::setFilename(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      _CalLoader_ELLoadCoreMesh in cal3d_io_wrapper.o
      _CalCoreModel_ELLoadCoreMesh in cal3d_io_wrapper.o
  "CalCoreMaterial::setFilename(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      _CalLoader_ELLoadCoreMaterial in cal3d_io_wrapper.o
      _CalCoreModel_ELLoadCoreMaterial in cal3d_io_wrapper.o
  "CalCoreAnimation::setFilename(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      _CalLoader_ELLoadCoreAnimation in cal3d_io_wrapper.o
      CalAnimationCache::loadAnimation(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, float) in cal3d_io_wrapper.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

Share this post


Link to post
Share on other sites

Is this on Arch Aislinn? What version of cal3d library are you using? Ben, your errors look different how are you compiling?

Share this post


Link to post
Share on other sites

I'm using Xcode, the usual method for the macOS client.

Edited by Ben

Share this post


Link to post
Share on other sites
3 minutes ago, bluap said:

Is this on Arch Aislinn? What version of cal3d library are you using? Ben, your errors look different how are you compiling?

 

I'm so sorry, I thought my specs were in my signature and they're not.  Yes, this is on Arch.  My cal3d version is 0.11.0, release 6.

Share this post


Link to post
Share on other sites

I have an Arch install that I use now and again.  That clean compiles and is using the same cal3d version.  I'm in the process of updating the packages so I'll see what happens after that is done.

 

Share this post


Link to post
Share on other sites

Well after a full update and reboot, and rebuild.  It all compiles fine on my Arch box with a minor warning in Achievements.cpp. 

What is your GCC version? (gcc -v)

Just guessing here, but when did you last recompile the cal3d package.  It could be the cxx abi changes are the problem.  Assuming you are using AUR, can recompile and reinstall cal3d?

Share this post


Link to post
Share on other sites

gcc version 8.1.0 (GCC) 

 

Yes, I use AUR, I'll recompile and reinstall and will report what happens.  Thank you for looking into this!

Share this post


Link to post
Share on other sites

Well, this is not going well.  The package in AUR is empty.  So trying to use an outside download here and will need to install with Makefile instead of makepkg and pacman.  

 

So first round of errors give me many that look like this:

hardwaremodel.cpp:754:3: error: ‘memcpy’ was not declared in this scope
   memcpy(&m_pVertexBuffer[(hardwareMesh.baseVertexIndex+i)*m_vertexStride],&vectorVertex[indice].position,sizeof(CalVector));
   ^~~~~~
hardwaremodel.cpp:754:3: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?

So I added #include <cstring> to hardwaremodel.cpp and ran make again.  That seemed to fix that problem.  I ran make again.

 

That brought me to many errors like this:

loader.cpp: In static member function ‘static CalCoreKeyframe* CalLoader::loadCoreKeyframe(CalDataSource&)’:
loader.cpp:889:12: error: cannot convert ‘bool’ to ‘CalCoreKeyframe*’ in return
     return false;
            ^~~~~
loader.cpp: In static member function ‘static CalCoreSkeletonPtr CalLoader::loadXmlCoreSkeleton(const string&)’:
loader.cpp:1341:11: error: could not convert ‘false’ from ‘bool’ to ‘CalCoreSkeletonPtr’ {aka ‘cal3d::RefPtr<CalCoreSkeleton>’}
    return false;
loader.cpp:1347:11: error: could not convert ‘false’ from ‘bool’ to ‘CalCoreSkeletonPtr’ {aka ‘cal3d::RefPtr<CalCoreSkeleton>’}
    return false;
           ^~~~~
loader.cpp:1356:10: error: could not convert ‘false’ from ‘bool’ to ‘CalCoreSkeletonPtr’ {aka ‘cal3d::RefPtr<CalCoreSkeleton>’}
   return false;
          ^~~~~

 

And now I'm stuck.

 

 

Share this post


Link to post
Share on other sites

Hmm.  I did a clean build of the AUR package I already had built and I get those same errors about false to bool (not the memcpy which is probably sorted by the AUR config script).  I've not got time now but you could try replacing false with 0, as its actually a pointer value I think.  Otherwise, I'll see if I can get it working when I get home tonight.

Share this post


Link to post
Share on other sites

You might have a problem with the C++ language version used:
G++ 8.1 uses the 2014 standard of C++, and one of the things that changed there is pointer comparisons and conversions.
In this case, the funtions return "0" on error, and should return "nullptr" (or throw an exception).

 

Try using "-std=c++98", "-std=c++03", or "-std=c++11" when compiling the library (and possibly the client!)

 

 

Edited by revi

Share this post


Link to post
Share on other sites

So far, cal3d compiled successfully with your fix, bluap.  Will try the client again. 

 

Whoa,  hallelujah, it works!  Client compiled and I'm on it.  Thank you SO much!  :)

Share this post


Link to post
Share on other sites

Good news, I'm glad its working.  I'll see if I can submit a patch to get the AUR updated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×