Package Details: mingw-w64-assimp 5.2.5-1

Git Clone URL: https://aur.archlinux.org/mingw-w64-assimp.git (read-only, click to copy)
Package Base: mingw-w64-assimp
Description: Portable Open Source library to import various well-known 3D model formats in an uniform manner (mingw-w64)
Upstream URL: http://www.assimp.org/
Licenses: BSD
Submitter: xantares
Maintainer: patlefort
Last Packager: patlefort
Votes: 2
Popularity: 0.000000
First Submitted: 2015-10-30 17:33 (UTC)
Last Updated: 2022-09-09 20:31 (UTC)

Latest Comments

1 2 Next › Last »

Martchus commented on 2022-08-01 10:52 (UTC)

Looks like the latest version doesn't build due to some warning treated as error:

[ 70%] Building CXX object code/CMakeFiles/assimp.dir/AssetLib/STL/STLLoader.cpp.obj
In file included from /usr/i686-w64-mingw32/include/c++/12.1.0/vector:70,
                 from /build/mingw-w64-assimp/src/assimp-5.2.4/include/assimp/DefaultLogger.hpp:57,
                 from /build/mingw-w64-assimp/src/assimp-5.2.4/include/assimp/fast_atof.h:30,
                 from /build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:49:
In member function ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {unsigned int}; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’,
    inlined from ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’ at /usr/i686-w64-mingw32/include/c++/12.1.0/bits/stl_vector.h:1294:21,
    inlined from ‘void Assimp::SMDImporter::CreateOutputMeshes()’ at /build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:255:50:
/usr/i686-w64-mingw32/include/c++/12.1.0/bits/vector.tcc:114:27: error: array subscript 0 is outside array bounds of ‘void [2147483647]’ [-Werror=array-bounds]
  114 |         if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
      |             ~~~~~~~~~~~~~~^~~~~~~~~
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp: In member function ‘void Assimp::SMDImporter::CreateOutputMeshes()’:
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:240:57: note: at offset -8 into object of size [4, 2147483647] allocated by ‘operator new []’
  240 |     FaceList* aaiFaces = new FaceList[pScene->mNumMeshes];
      |                                                         ^
In member function ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {unsigned int}; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’,
    inlined from ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’ at /usr/i686-w64-mingw32/include/c++/12.1.0/bits/stl_vector.h:1294:21,
    inlined from ‘void Assimp::SMDImporter::CreateOutputMeshes()’ at /build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:255:50:
/usr/i686-w64-mingw32/include/c++/12.1.0/bits/vector.tcc:114:54: error: array subscript 0 is outside array bounds of ‘void [2147483647]’ [-Werror=array-bounds]
  114 |         if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
      |                                        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp: In member function ‘void Assimp::SMDImporter::CreateOutputMeshes()’:
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:240:57: note: at offset -8 into object of size [4, 2147483647] allocated by ‘operator new []’
  240 |     FaceList* aaiFaces = new FaceList[pScene->mNumMeshes];
      |                                                         ^
In member function ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {unsigned int}; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’,
    inlined from ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’ at /usr/i686-w64-mingw32/include/c++/12.1.0/bits/stl_vector.h:1294:21,
    inlined from ‘void Assimp::SMDImporter::CreateOutputMeshes()’ at /build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:255:50:
/usr/i686-w64-mingw32/include/c++/12.1.0/bits/vector.tcc:119:13: error: array subscript 0 is outside array bounds of ‘void [2147483647]’ [-Werror=array-bounds]
  119 |             ++this->_M_impl._M_finish;
      |             ^~
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp: In member function ‘void Assimp::SMDImporter::CreateOutputMeshes()’:
/build/mingw-w64-assimp/src/assimp-5.2.4/code/AssetLib/SMD/SMDLoader.cpp:240:57: note: at offset -8 into object of size [4, 2147483647] allocated by ‘operator new []’
  240 |     FaceList* aaiFaces = new FaceList[pScene->mNumMeshes];
      |                                                         ^
cc1plus: all warnings being treated as errors
make[2]: *** [code/CMakeFiles/assimp.dir/build.make:2477: code/CMakeFiles/assimp.dir/AssetLib/SMD/SMDLoader.cpp.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:125: code/CMakeFiles/assimp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().

Martchus commented on 2022-01-08 16:14 (UTC)

Makes sense. It would be best if makepkg itself would not pull-in any LTO flags if !buildflags is set as an option (so we don't have to adjust all our packages and !buildflags is really ensuring no extra flags are added as one would expect).

patlefort commented on 2022-01-03 01:25 (UTC)

I assumed it was only a problem for mingw. After some more reading, gcc on mingw simply doesn't support lto and lto-fat-objects simply allows it to fallback to standard linking, so enabling lto is pointless for static libs. Stripping also is causing problems with lto and static libs from what you linked. So with that, I think it would be reasonable to disable lto with !buildflags and packages can still opt-in on shared libs or .exe. We'll have to bring it up to the maintainers.

Martchus commented on 2022-01-02 21:26 (UTC)

Yes, that's also what's suggested in https://archlinux.org/todo/lto-fat-objects. Adding it to mingw-env (or even specific PKGBUILDs) seems conceptionally wrong, though. Wouldn't it be better if that flag was added at the same point where other LTO flags are added?

Static libs with LTO enabled also seem quite big so it is questionable whether we actually want it for mingw-w64 packages (which generally contain static libs in contrast to regular packages)?

patlefort commented on 2022-01-02 14:07 (UTC)

I found out that adding -ffat-lto-objects fix the issue with static linking. Maybe it should be added to the default flags in mingw-env?

Martchus commented on 2022-01-02 11:01 (UTC)

Since you had to disable LTO: I'm wondering whether disabling buildflags should disable lto as well. Otherwise we needed to disable it likely in many packages or workaround issues with static libraries.

xantares commented on 2021-06-09 17:06 (UTC)

It should be fixed now

Martchus commented on 2021-06-09 15:40 (UTC) (edited on 2021-06-09 15:47 (UTC) by Martchus)

Luckily assimp is only an optional dependency for mingw-w64-qt6-quick3d. I guess for now I'll simply disable the feature completely.

Btw, it looks like the regular package is also using the bundled version and they also ran into the build error: https://github.com/archlinux/svntogit-packages/blob/packages/qt6-quick3d/trunk/qt6-3d-gcc11.patch

Martchus commented on 2021-06-09 14:54 (UTC)

I was trying to compile mingw-w64-quick3d for the 6.1.1 update and ran into the following error:

  31 -- Running syncqt for module: 'QtQuick3DAssetImport'
  32 CMake Warning (dev) at /usr/i686-w64-mingw32/lib/cmake/assimp-5.0/assimpTargets.cmake:54 (if):
  33   if given arguments:
  34 
  35     "ON"
  36 
  37   An argument named "ON" appears in a conditional statement.  Policy CMP0012
  38   is not set: if() recognizes numbers and boolean constants.  Run "cmake
  39   --help-policy CMP0012" for policy details.  Use the cmake_policy command to
  40   set the policy and suppress this warning.
  41 Call Stack (most recent call first):
  42   /usr/i686-w64-mingw32/lib/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  43   cmake/FindWrapQuick3DAssimp.cmake:7 (find_package)
  44   /usr/i686-w64-mingw32/lib/cmake/Qt6/QtFindPackageHelpers.cmake:113 (find_package)
  45   src/plugins/assetimporters/configure.cmake:13 (qt_find_package)
  46   src/plugins/assetimporters/CMakeLists.txt:9 (include)
  47 This warning is for project developers.  Use -Wno-dev to suppress it.
  48 
  49 -- Found WrapQuick3DAssimp: TRUE (Required is at least version "5")
  50 -- Performing Test Assimp
  51 CMake Warning (dev) at /usr/i686-w64-mingw32/lib/cmake/assimp-5.0/assimpTargets.cmake:54 (if):
  52   if given arguments:
  53 
  54     "ON"
  55 
  56   An argument named "ON" appears in a conditional statement.  Policy CMP0012
  57   is not set: if() recognizes numbers and boolean constants.  Run "cmake
  58   --help-policy CMP0012" for policy details.  Use the cmake_policy command to
  59   set the policy and suppress this warning.
  60 Call Stack (most recent call first):
  61   /usr/i686-w64-mingw32/lib/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  62   /build/mingw-w64-qt6-quick3d/src/qtquick3d-everywhere-src-6.1.0/cmake/FindWrapQuick3DAssimp.cmake:7 (find_package)
  63   /build/mingw-w64-qt6-quick3d/src/qtquick3d-everywhere-src-6.1.0/config.tests/quick3d_assimp/CMakeLists.txt:7 (find_package)
  64 This warning is for project developers.  Use -Wno-dev to suppress it.
  65 
  66 -- Performing Test Assimp - Failed
…
  95 Configure summary:
  96 
  97 QtQuick3D:
  98   Assimp ................................. yes
  99   System Assimp .......................... no

Apparently Qt's build system is unable to make use of the package. I've only noticed it now because now the bundled assimp no longer compiles (likely just a missing #include).

I've also noticed that there's no static version of the library which would be needed for the static Qt builds. If you look at the condition producing the warning within the CMake module that's actually the condition to distinguish shared from static builds so likely this is a prime example for a library where the static version can not easily be installed alongside the shared version (without running into configuration issues). Maybe I'll just try to make it work with the bundled version for now.

patlefort commented on 2020-11-03 19:15 (UTC)

Yes that's what I meant.