Error when building most recent git build

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
User avatar
applsaucy
Posts:1
Joined:2020-05-27, 03:45
Error when building most recent git build

Post by applsaucy » 2020-05-27, 03:48

Code: Select all

Libs/Models/Loader_mdl_hl1.cpp: In member function 'void LoaderHL1mdlT::Load(ArrayT<CafuModelT::JointT>&) const':
Libs/Models/Loader_mdl_hl1.cpp:204:45: error: taking address of packed member of 'StudioBoneT' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  204 |         const MatrixT         Mat(Vector3fT(&Bone.Value[0]), cf::math::QuaternionfT::Euler(Bone.Value[4], Bone.Value[5], Bone.Value[3]));
      |                                             ^~~~~~~~~~~~~~
Libs/Models/Loader_mdl_hl1.cpp: In member function 'void LoaderHL1mdlT::Load(ArrayT<CafuModelT::AnimT>&) const':
Libs/Models/Loader_mdl_hl1.cpp:412:58: error: taking address of packed member of 'StudioBoneT' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  412 |                 AllData[BoneNr][FrameNr].Pos = Vector3fT(&StudioBones[BoneNr].Value[0]);
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Libs/Models/Loader_mdl_hl1.cpp:413:58: error: taking address of packed member of 'StudioBoneT' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  413 |                 AllData[BoneNr][FrameNr].Ang = Vector3fT(&StudioBones[BoneNr].Value[3]);
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Libs/Models/Loader_mdl_hl1.cpp:514:67: error: taking address of packed member of 'StudioSequenceT' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  514 |             Anim.Frames[FrameNr].BB=BoundingBox3fT(Vector3fT(Sequ.BBMin), Vector3fT(Sequ.BBMax));
      |                                                              ~~~~~^~~~~
Libs/Models/Loader_mdl_hl1.cpp:514:90: error: taking address of packed member of 'StudioSequenceT' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  514 |             Anim.Frames[FrameNr].BB=BoundingBox3fT(Vector3fT(Sequ.BBMin), Vector3fT(Sequ.BBMax));
      |                                                                                     ~~~~~^~~~~
cc1plus: all warnings being treated as errors
scons: *** [Libs/build/linux/g++/release/Models/Loader_mdl_hl1.o] Error 1
scons: building terminated because of errors.
I'm running up-to-date archlinux with gcc 10.0
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Error when building most recent git build

Post by Carsten » 2020-05-29, 21:06

Dear applsaucy,
welcome to the Cafu forums! :welcome:

Unfortunately, in the recent years I've had very little spare time for the further development and maintenance of Cafu, so I cannot fix this problem at it's root quickly. However, you may try removing the -Werror flags in the SConstruct file in the main directory (lines 604 to 606). This will no longer treat warnings as errors and the compile should succeed.
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests