lvc / abi-compliance-checker

A tool for checking backward API/ABI compatibility of a C/C++ library
https://lvc.github.io/abi-compliance-checker/
GNU Lesser General Public License v2.1
621 stars 76 forks source link

When I run the test suite: cc1plus: error: unrecognized command line option ‘-fdump-translation-unit’ #114

Closed simonrenger closed 2 years ago

simonrenger commented 2 years ago

I get this:

Temporary header file '/tmp/L_QmXNqpbm/dump1.h' with the following content will be compiled to create GCC translation unit dump:

  // add includes
  #include "/mnt/d/plugins/test/libsample_c/libsample.v1/libsample.h"

The GCC parameters:
  gcc -fdump-translation-unit -fkeep-inline-functions -c -U__cplusplus -D_Bool="bool" -fpreprocessed -x c++-header -fpermissive -w "/tmp/L_QmXNqpbm/dump1.i"  -I/mnt/d/plugins/test/libsample_c/libsample.v1

cc1plus: error: unrecognized command line option ‘-fdump-translation-unit’

As it seems -fdump-translation-unit is removed from gcc/g++

simonrenger commented 2 years ago

created a PR in the installer to solve this issue

linuxhw commented 2 years ago

You have two options on latest systems:

  1. Use abi-dumper to create ABI dumps and then compare them to generate report
  2. Provide old GCC version installation by -gcc-path option