Skip to content
Snippets Groups Projects

Fix: GCC12 compiler errors

Merged Vadim Seregin requested to merge seregin/ECM:VTM11_FIX_FOR_GCC12 into VTM11_ANC

Fix GCC12 compiler errors. It should fix #37 (closed)

Merge request reports

Merged by Vadim SereginVadim Seregin 2 years ago (Mar 16, 2023 11:02pm UTC)

Merge details

  • Changes merged into with 38ee02f1.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Vadim Seregin mentioned in merge request !389 (merged)

    mentioned in merge request !389 (merged)

  • Thanks for the fix. The fix works for the dynamic link. However, I got link error for static link when using with cmake command. Note that static link is a must in our testing environment.

    cmake -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static" path

    The link errors are as follows

    /usr/bin/ld: attempted static link of dynamic object `/usr/lib/gcc/x86_64-linux-gnu/12/libgomp.so'
    collect2: error: ld returned 1 exit status
    make[2]: *** [source/App/SEIRemovalApp/CMakeFiles/SEIRemovalApp.dir/build.make:136: /usr/local/google/home/xlxiangli/program/g-ecm/bin/umake/gcc-12.2/x86_64/release/SEIRemovalApp] Error 1
    make[1]: *** [CMakeFiles/Makefile2:576: source/App/SEIRemovalApp/CMakeFiles/SEIRemovalApp.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 90%] Built target DecoderAnalyserLib
    [ 91%] Linking CXX executable /usr/local/google/home/xlxiangli/program/g-ecm/bin/umake/gcc-12.2/x86_64/release/parcat
    /usr/bin/ld: attempted static link of dynamic object `/usr/lib/gcc/x86_64-linux-gnu/12/libgomp.so'
    collect2: error: ld returned 1 exit status
    make[2]: *** [source/App/Parcat/CMakeFiles/parcat.dir/build.make:104: /usr/local/google/home/xlxiangli/program/g-ecm/bin/umake/gcc-12.2/x86_64/release/parcat] Error 1
    make[1]: *** [CMakeFiles/Makefile2:604: source/App/Parcat/CMakeFiles/parcat.dir/all] Error 2
    [ 92%] Linking CXX static library /usr/local/google/home/xlxiangli/program/g-ecm/lib/umake/gcc-12.2/x86_64/release/libEncoderLib.a
    [ 92%] Linking CXX executable /usr/local/google/home/xlxiangli/program/g-ecm/bin/umake/gcc-12.2/x86_64/release/DecoderApp
    /usr/bin/ld: attempted static link of dynamic object `/usr/lib/gcc/x86_64-linux-gnu/12/libgomp.so'
    collect2: error: ld returned 1 exit status
    make[2]: *** [source/App/DecoderApp/CMakeFiles/DecoderApp.dir/build.make:136: /usr/local/google/home/xlxiangli/program/g-ecm/bin/umake/gcc-12.2/x86_64/release/DecoderApp] Error 1
    make[1]: *** [CMakeFiles/Makefile2:519: source/App/DecoderApp/CMakeFiles/DecoderApp.dir/all] Error 2
    [ 92%] Built target EncoderLib
    make: *** [Makefile:91: all] Error 2

    It is interesting that I had the above link errors for VTM11ECM8 only, not for ECM, not for VTM. I have not figured what was wrong.

    Edited by Xiang Li
  • did you try to do a clean build?

  • Yes, removed everything, regenerated makefile with cmake and then compile.

  • Vadim Seregin added 1 commit

    added 1 commit

    • 7cf32174 - update cmake files and set c++17

    Compare with previous version

  • Updated cmake files, can you please try?

  • Yes, it is working now. Thanks!

  • Vadim Seregin mentioned in commit 38ee02f1

    mentioned in commit 38ee02f1

  • merged

Please register or sign in to reply
Loading