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

libcork.a: error adding symbols: file format not recognized #18

Open
petronny opened this issue Dec 1, 2022 · 6 comments
Open

libcork.a: error adding symbols: file format not recognized #18

petronny opened this issue Dec 1, 2022 · 6 comments

Comments

@petronny
Copy link

petronny commented Dec 1, 2022

FAILED: plugins/core/Standard/qCork/libQCORK_PLUGIN.so 
: && /usr/bin/c++ -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -fpermissive -DSUPPORT_TOPO_STREAM_OPERATORS -Wno-deprecated-declarations -fopenmp -O3 -DNDEBUG  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -shared -Wl,-soname,libQCORK_PLUGIN.so -o plugins/core/Standard/qCork/libQCORK_PLUGIN.so plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/QCORK_PLUGIN_autogen/mocs_compilation.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/src/qCork.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/src/ccCorkDlg.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/QCORK_PLUGIN_autogen/EWIEGA46WW/qrc_qCork.cpp.o  -Wl,-rpath,/build/cloudcompare/src/build/libs/CCPluginAPI:/build/cloudcompare/src/build/libs/qCC_glWindow:/build/cloudcompare/src/build/libs/qCC_io:/build/cloudcompare/src/build/libs/qCC_db:/build/cloudcompare/src/build/libs/qCC_db/extern/CCCoreLib:/build/cloudcompare/src/build/libs/CCFbo:  libs/CCPluginAPI/libCCPluginAPI.so  libs/CCPluginStub/libCCPluginStub.a  /build/cloudcompare/src/cloudcompare-cork/lib/libcork.a  /usr/lib/libmpir.so  libs/qCC_glWindow/libQCC_GL_LIB.so  libs/qCC_io/libQCC_IO_LIB.so  libs/qCC_io/extern/dxflib/libdxflib.a  libs/qCC_io/extern/shapelib/libshapelib.a  /usr/lib/libgdal.so  libs/qCC_db/libQCC_DB_LIB.so  libs/qCC_db/extern/CCCoreLib/libCCCoreLib.so  /usr/lib/libgmpxx.so  /usr/lib/libmpfr.so  /usr/lib/libgmp.so  /usr/lib/libQt5Concurrent.so.5.15.7  libs/CCFbo/libCC_FBO_LIB.so  /usr/lib/libQt5OpenGL.so.5.15.7  /usr/lib/libQt5Widgets.so.5.15.7  /usr/lib/libQt5OpenGLExtensions.a  /usr/lib/libQt5Gui.so.5.15.7  /usr/lib/libQt5Core.so.5.15.7  /usr/lib//libQt5Gui.so  /usr/lib//libQt5Core.so  /usr/lib/libGL.so && :
/usr/bin/ld: /build/cloudcompare/src/cloudcompare-cork/lib/libcork.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
[387/736] Building CXX object plugins/core/Standard/qCSF/CMakeFiles/QCSF_PLUGIN.dir/QCSF_PLUGIN_autogen/mocs_compilation.cpp.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().

https://github.com/arch4edu/cactus/actions/runs/3583606576/jobs/6033047190

@petronny
Copy link
Author

petronny commented Mar 7, 2023

Building cork with g++ instead of the default clang++ fixes the problem.

@AchmadFathoni
Copy link
Contributor

The latest AUR should fix this.

@petronny
Copy link
Author

petronny commented Aug 4, 2023

@skinkie
Copy link

skinkie commented Mar 22, 2024

Still exists.

@Sir-Photch
Copy link

Also having this issue:

Build failure
[533/806] Linking CXX shared library plugins/core/Standard/qCork/libQCORK_PLUGIN.so
FAILED: plugins/core/Standard/qCork/libQCORK_PLUGIN.so
: && /usr/lib/ccache/bin/c++ -fPIC -march=native -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -fpermissive -DSUPPORT_TOPO_STREAM_OPERATORS -Wno-deprecated-declarations -fopenmp -O3 -DNDEBUG  -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto -shared -Wl,-soname,libQCORK_PLUGIN.so -o plugins/core/Standard/qCork/libQCORK_PLUGIN.so plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/QCORK_PLUGIN_autogen/mocs_compilation.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/src/qCork.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/src/ccCorkDlg.cpp.o plugins/core/Standard/qCork/CMakeFiles/QCORK_PLUGIN.dir/QCORK_PLUGIN_autogen/EWIEGA46WW/qrc_qCork.cpp.o  -Wl,-rpath,/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/CCPluginAPI:/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/qCC_glWindow:/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/qCC_io:/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/qCC_db:/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/qCC_db/extern/CCCoreLib:/home/chris/.cache/paru/clone/cloudcompare/src/build/libs/CCFbo:  libs/CCPluginAPI/libCCPluginAPI.so  libs/CCPluginStub/libCCPluginStub.a  /home/chris/.cache/paru/clone/cloudcompare/src/cloudcompare-cork/lib/libcork.a  /usr/lib/libmpir.so  libs/qCC_glWindow/libQCC_GL_LIB.so  libs/qCC_io/libQCC_IO_LIB.so  libs/qCC_io/extern/dxflib/libdxflib.a  libs/qCC_io/extern/shapelib/libshapelib.a  /usr/lib/libgdal.so  libs/qCC_db/libQCC_DB_LIB.so  libs/qCC_db/extern/CCCoreLib/libCCCoreLib.so  /usr/lib/libtbb.so.12.12  /usr/lib/libgmpxx.so  /lib/libmpfr.so  /lib/libgmp.so  /usr/lib/libQt5Concurrent.so.5.15.13  libs/CCFbo/libCC_FBO_LIB.so  /usr/lib/libQt5OpenGL.so.5.15.13  /usr/lib/libQt5Widgets.so.5.15.13  /usr/lib/libQt5OpenGLExtensions.a  /usr/lib/libQt5Gui.so.5.15.13  /usr/lib/libQt5Core.so.5.15.13  /usr/lib//libQt5Gui.so  /usr/lib//libQt5Core.so  /usr/lib/libGL.so && :
/usr/bin/ld: /home/chris/.cache/paru/clone/cloudcompare/src/cloudcompare-cork/lib/libcork.a: error adding symbols: file format not recognized

@Sir-Photch
Copy link

Sir-Photch commented Jun 18, 2024

Apparently, commit 8159e2b causes this issue; By just re-adding CXX="g++" it builds fine.

diff --git a/PKGBUILD b/PKGBUILD
index b93f398..8555512 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -117,7 +117,7 @@ build() {
         -DJsonCpp_LIBRARY=/usr/lib
   )
   msg2 "Build Cork lib"
-  make -C "${srcdir}/${name}-cork" CXXFLAGS="$CXXFLAGS -DSUPPORT_TOPO_STREAM_OPERATORS -fPIC"
+  make -C "${srcdir}/${name}-cork" CXXFLAGS="$CXXFLAGS -DSUPPORT_TOPO_STREAM_OPERATORS -fPIC" CXX="g++"
   msg2 "Build CloudCompare"
   cmake -B build -S "${srcdir}/${name}" -G Ninja "${CMAKE_FLAGS[@]}"
 # shellcheck disable=SC2086 # allow slitting for MAKEFLAGS carrying multiple flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants