Opened 2 years ago

Closed 2 years ago

#65530 closed defect (fixed)

qt55-qt3d @5.5.1_3: build fails due to assimp

Reported by: chrstphrchvz (Christopher Chavez) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: qt55-qt3d

Description

qt55-qt3d fails to detect system assimp during configure, and fails to build its bundled assimp. Not yet aware whether other Qt versions’ qt3d ports are affected.

The bundled assimp fails during linking:

Undefined symbols for architecture x86_64:
  "Assimp::Importer::SetPropertyInteger(char const*, int)", referenced from:
      Qt3D::AssimpParser::readSceneFile(QString const&) in assimpparser.o
     (maybe you meant: __ZN6Assimp8Importer18SetPropertyIntegerEPKciPb)
  "Assimp::IOSystem::CurrentDirectory() const", referenced from:
      vtable for Assimp::IOSystem in assimphelpers.o
      vtable for Qt3D::AssimpHelper::AssimpIOSystem in assimphelpers.o
ld: symbol(s) not found for architecture x86_64

But I doubt building the bundled assimp is intended: port:assimp has been specified as a library dependency, and so presumably qt55-qt3d once worked with system assimp.

Currently the system assimp is not detected due to C++11 syntax in assimp headers (present at least since assimp 5.1.0), while Xcode clang (at least 12.4 and 14 beta 3) uses C++98 by default (__cplusplus is 199711L). From config.log:

/usr/bin/clang++ -c -pipe -arch x86_64 -stdlib=libc++ -I/opt/local/include -Os -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -mmacosx-version-min=12.0 -fno-exceptions -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I. -isystem /opt/local/include -I/opt/local/libexec/qt5/mkspecs/macx-clang -o .obj/main.o main.cpp
In file included from main.cpp:38:
In file included from /opt/local/include/assimp/scene.h:55:
/opt/local/include/assimp/mesh.h:910:81: error: expected ';' after expression
            mTextureCoordsNames = new aiString *[AI_MAX_NUMBER_OF_TEXTURECOORDS] {};
                                                                                ^
1 error generated.

I am not aware how to control CXXFLAGS for Qt module ports and possibly set -std=c++11.

Change History (4)

comment:1 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Summary: qt55-qt3d: build fails due to assimpqt55-qt3d @5.5.1_3: build fails due to assimp
Version: 2.7.2

comment:2 in reply to:  description Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Replying to chrstphrchvz:

I am not aware how to control CXXFLAGS for Qt module ports and possibly set -std=c++11.

Found it: qt5.cxxflags-append -std=c++11

https://github.com/macports/macports-ports/pull/15480

comment:3 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Edit: NOT Duplicate of #59601

Last edited 2 years ago by chrstphrchvz (Christopher Chavez) (previous) (diff)

comment:4 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In c122e802eee197ae7f9d4e948ab388effafde3d7/macports-ports (master):

qt55-qt3d: fix system assimp detection

Increment revision in case anyone successfully built
bundled assimp.

Fixes: #65530

[skip ci]

Note: See TracTickets for help on using tickets.