Revopoint / 3DViewer

GNU General Public License v3.0
22 stars 5 forks source link

Compile failed #9

Closed sxiii closed 6 months ago

sxiii commented 1 year ago

Greetings!

Trying to compile on Garuda Linux Soaring (Gnome edition).

Everything is going OK until this error:

/usr/bin/ld: /home/s/3DViewer-git/3DViewer/src/../thirdparty/quazip/linux/lib/libquazip.so.1.3.0: undefined reference to `operator delete(void*, unsigned long)@Qt_5'

Tried googling but nothing exact shows up unfortunately. I was thinking that this might have to do something with Qt5 version, but I have qt5-base package installed and tried using ENV Variable to force it to use qt5. Didn't helped.

Also tried doing a research about quazip, I've got package quazip-qt5 installed. Doesn't seem to help though...

Thanks!

X3msnake commented 1 year ago

The error message you provided indicates that there is an undefined reference to the operator delete function from the Qt library version 5 in the libquazip.so.1.3.0 library. This typically occurs when there is a mismatch between the Qt version used during the compilation of the libquazip library and the Qt version being used during the linking phase of your application.

To resolve this issue, you should ensure that the Qt version used to compile the libquazip library is the same version used in your application. Follow these steps to help resolve the problem:

  1. Check Qt Versions: Verify that you have the same version of the Qt library installed, which was used to build the libquazip.so.1.3.0 library. If not, install the appropriate version of Qt.

  2. Rebuild libquazip: If you have the source code for libquazip, try recompiling it using the same version of Qt that your application is using. Make sure you follow the correct build instructions and ensure that the correct Qt version is being picked up during the build process.

  3. Check Library Paths: Ensure that the correct path to the Qt libraries is included in the linker's search paths. This is typically done by specifying the appropriate -L flag during the linking phase of your application.

  4. Check Compiler Flags: Verify that the correct Qt-specific compiler flags are set during the compilation and linking of your application. These flags may include -DQT_5 or something similar, which ensures that the correct Qt version symbols are used.

  5. Clean and Rebuild: If you've made any changes to the build configurations, make sure to clean the previous build artifacts and then rebuild both the libquazip library and your application.

  6. Check Dependencies: Ensure that there are no conflicting or outdated libraries present in the system that might be interfering with the linkage process.

Remember that the specific steps to resolve this issue might vary depending on your build system, operating system, and the tools you are using. If you are using a build system like CMake, qmake, or others, make sure to adjust the configuration accordingly. Additionally, checking the documentation or community forums for both Qt and QuaZip can also provide useful insights into resolving this type of issue.


Source: https://chat.openai.com/share/09c9826f-b126-46de-bdcf-8fc3974426bb

sxiii commented 1 year ago

Hi @X3msnake . Thanks for the hints, but, unfortunately, before I've posted this error, I've already tried manually compiling and adding paths etc. I actually tried today once again "from scratch", and the project seems to still be 'unbuildable' (quits with the same error). I might probably use NixPkg or Docker Ubuntu image to build it, but still, would be great to see if the project will move along with the newer/widely supported versions of both Qt (6 instead of 5) and libquazip (1.4 instead of 1.3). Right now I'm using the 'debtap' auto-repacked DEB-to-Arch PKG version, but it has some interface freezes and overall work not 100% perfect.