Bug 341472

Summary: Can't build staticlib
Product: [Frameworks and Libraries] qca Reporter: Symeon Huang <hzwhuang>
Component: generalAssignee: Ivan Romanov <drizt72>
Status: RESOLVED WORKSFORME    
Severity: major CC: aacid, justin
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Symeon Huang 2014-12-01 20:46:56 UTC
Forgive me because I've sent an email and then open an issue here.

The commands are:
cmake -DCMAKE_INSTALL_PREFIX=/tmp/qca -DBUILD_SHARED_LIBS=OFF ..
make

Then, the error messages showed.

Linking CXX executable ../../bin/base64unittest
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_botanPluginInstance::Staticqca_botanPluginInstance()':
base64unittest.cpp:(.text._ZN29Staticqca_botanPluginInstanceC2Ev[_ZN29Staticqca_botanPluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_botan()'
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_gcryptPluginInstance::Staticqca_gcryptPluginInstance()':
base64unittest.cpp:(.text._ZN30Staticqca_gcryptPluginInstanceC2Ev[_ZN30Staticqca_gcryptPluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_gcrypt()'
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_gnupgPluginInstance::Staticqca_gnupgPluginInstance()':
base64unittest.cpp:(.text._ZN29Staticqca_gnupgPluginInstanceC2Ev[_ZN29Staticqca_gnupgPluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_gnupg()'
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_loggerPluginInstance::Staticqca_loggerPluginInstance()':
base64unittest.cpp:(.text._ZN30Staticqca_loggerPluginInstanceC2Ev[_ZN30Staticqca_loggerPluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_logger()'
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_osslPluginInstance::Staticqca_osslPluginInstance()':
base64unittest.cpp:(.text._ZN28Staticqca_osslPluginInstanceC2Ev[_ZN28Staticqca_osslPluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_ossl()'
CMakeFiles/base64unittest.dir/base64unittest.cpp.o: In function `Staticqca_softstorePluginInstance::Staticqca_softstorePluginInstance()':
base64unittest.cpp:(.text._ZN33Staticqca_softstorePluginInstanceC2Ev[_ZN33Staticqca_softstorePluginInstanceC5Ev]+0xe): undefined reference to `qt_static_plugin_qca_softstore()'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/base64unittest] Error 1
make[1]: *** [unittest/base64unittest/CMakeFiles/base64unittest.dir/all] Error 2
make: *** [all] Error 2

Any ideas would be grateful.

I have to note that this error is reproducible on Windows as well. Using the QCA-2.1.0 source.
Comment 1 Ivan Romanov 2014-12-01 20:56:26 UTC
Try to build without tests and examples, use -DBUILD_TESTS=OFF
Comment 2 Ivan Romanov 2014-12-01 20:57:22 UTC
Which version of Qt do you use?
Comment 3 Symeon Huang 2014-12-07 22:34:36 UTC
Qt 5.3.2 both on Windows and Linux.

I tried with -DBUILD_TESTS=OFF but end up with same error. It seems the error would definitely happen if you link the library to any executable that import the static library.
Comment 4 Albert Astals Cid 2020-01-25 10:36:08 UTC
Is this still a problem?
Comment 5 Bug Janitor Service 2020-02-09 04:33:14 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2020-02-24 04:33:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!