Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.2.0 build fails on big endian archs #4358

Closed
krop opened this issue Jan 26, 2022 · 1 comment · Fixed by #4367
Closed

5.2.0 build fails on big endian archs #4358

krop opened this issue Jan 26, 2022 · 1 comment · Fixed by #4367
Labels
Bug Global flag to mark a deviation from expected behaviour IQM Bugs related to the IQM format.

Comments

@krop
Copy link

krop commented Jan 26, 2022

The assimp 5.2.0 build fails on both ppc64 (be) and s390x:

[  794s] [ 24%] Building CXX object code/CMakeFiles/assimp.dir/AssetLib/IQM/IQMImporter.cpp.o
[  794s] cd /home/abuild/rpmbuild/BUILD/assimp-5.2.0/build/code && /usr/bin/c++ -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_M3D_EXPORTER -DASSIMP_BUILD_NO_M3D_IMPORTER -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_IMPORTER_GLTF_USE_OPEN3DGC=1 -DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0 -DOPENDDLPARSER_BUILD -DRAPIDJSON_HAS_STDSTRING=1 -DRAPIDJSON_NOMEMBERITERATORCLASS -Dassimp_EXPORTS -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/build/include -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/build -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/include -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/. -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/../contrib/pugixml/src -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/../contrib/rapidjson/include -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/../contrib -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/../contrib/openddlparser/include -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/../include -I/home/abuild/rpmbuild/BUILD/assimp-5.2.0/build/code/../include -I/usr/include/minizip -fvisibility=hidden -fno-strict-aliasing -Wall -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG -O2 -g -DNDEBUG -fPIC -Werror -std=gnu++11 -MD -MT code/CMakeFiles/assimp.dir/AssetLib/IQM/IQMImporter.cpp.o -MF CMakeFiles/assimp.dir/AssetLib/IQM/IQMImporter.cpp.o.d -o CMakeFiles/assimp.dir/AssetLib/IQM/IQMImporter.cpp.o -c /home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/AssetLib/IQM/IQMImporter.cpp
[  794s] In file included from /home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/AssetLib/IQM/IQMImporter.cpp:51:
[  794s] /home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/AssetLib/IQM/IQMImporter.cpp: In function 'void swap_block(uint32_t*, size_t)':
[  794s] /home/abuild/rpmbuild/BUILD/assimp-5.2.0/code/AssetLib/IQM/IQMImporter.cpp:67:9: error: 'ByteSwap' has not been declared
[  794s]    67 |         AI_SWAP4( block[ i ] );
[  794s]       |         ^~~~~~~~
[  794s] make[2]: *** [code/CMakeFiles/assimp.dir/build.make:1297: code/CMakeFiles/assimp.dir/AssetLib/IQM/IQMImporter.cpp.o] Error 1
@krop krop added the Bug Global flag to mark a deviation from expected behaviour label Jan 26, 2022
@kimkulling kimkulling added the IQM Bugs related to the IQM format. label Jan 26, 2022
kimkulling added a commit that referenced this issue Jan 26, 2022
- Add missing namespace
- closes #4358
@umlaeute
Copy link
Contributor

i was just going to report this :-)

isn't the proper fix to use fully qualified namespaces in the AI_SWAP4 macro?

that is, rather than

# define AI_SWAP4(p) ByteSwap::Swap4(&(p))
it should read

#   define AI_SWAP4(p) Assimp::ByteSwap::Swap4(&(p)) 

(same for the other macros of coruse)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour IQM Bugs related to the IQM format.
Projects
None yet
3 participants