rasdaemon icon indicating copy to clipboard operation
rasdaemon copied to clipboard

undefined reference to `mem_fail_event_trigger_setup' when just enabling some features

Open tai271828 opened this issue 6 months ago • 1 comments

Description

When compiling the source, we will get the error of ras-events.c:309: undefined reference to mem_fail_event_trigger_setup'`.

Build environment:

  • Ubuntu 22.04.4
  • x86
  • Ubuntu Linux_ kernel 6.8.0-38-generic

Steps to Reproduce

  1. Clone the master branch with git clone https://github.com/mchehab/rasdaemon.git. At the time of writing, the corresponding commit is 6250251dd35c88c299ad24789084b53ce707202f.
  2. autoreconf -vfi
  3. ./configure --enable-mce --enable-aer --enable-sqlite3 --enable-extlog --enable-abrt-report
  4. make

Expected Result

Compiled successfully.

Actual Result

The corresponding configuration options:

$ ./configure --enable-mce --enable-aer --enable-sqlite3 --enable-extlog --enable-abrt-report

<Skipped Output Here for Bug Reporting>

compile time options summary                                                                                         
============================                                                                                         
                                                                                                                     
    Sqlite3             : yes                                                                                        
    AER                 : yes                                                                                        
    MCE                 : yes                                                                                        
    EXTLOG              : yes                                                                                        
    CPER non-standard   : no                                                                                         
    ABRT report         : yes                                                                                        
    HISI Kunpeng errors : no                                                                                         
    ARM events          : no                                                                                             DEVLINK             : no                                                                                         
    Disk I/O errors     : no                                                                                         
    Memory Failure      : no                                                                                         
    CXL events          : no                                                                                         
    Memory CE PFA       : no                                                                                         
    AMP RAS errors      : no                                                                                         
    CPU fault isolation : no                                                                                         
    YITIAN RAS errors   : no                                                                                             JAGUAR RAS errors   : no

The error message:

$ make
make  all-recursive
make[1]: Entering directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon'
Making all in util
make[2]: Entering directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon/util'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon/util'
Making all in man
make[2]: Entering directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon/man'
make[2]: Entering directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon'
  CC       rasdaemon-rasdaemon.o
  CC       rasdaemon-ras-events.o
ras-events.c:301:12: warning: ‘filter_ras_mc_event’ defined but not used [-Wunused-function]
  301 | static int filter_ras_mc_event(struct ras_events *ras, char *group, char *event,
      |            ^~~~~~~~~~~~~~~~~~~
  CC       rasdaemon-ras-mc-handler.o
  CC       rasdaemon-bitfield.o
  CC       rasdaemon-trigger.o
  CC       rasdaemon-ras-record.o
  CC       rasdaemon-ras-aer-handler.o
  CC       rasdaemon-ras-mce-handler.o
  CC       rasdaemon-mce-intel.o
  CC       rasdaemon-mce-amd.o
  CC       rasdaemon-mce-intel-p4-p6.o
  CC       rasdaemon-mce-intel-nehalem.o
  CC       rasdaemon-mce-intel-dunnington.o
  CC       rasdaemon-mce-intel-tulsa.o
  CC       rasdaemon-mce-intel-sb.o
  CC       rasdaemon-mce-intel-ivb.o
  CC       rasdaemon-mce-intel-haswell.o
  CC       rasdaemon-mce-intel-knl.o
  CC       rasdaemon-mce-intel-broadwell-de.o
  CC       rasdaemon-mce-intel-broadwell-epex.o
  CC       rasdaemon-mce-intel-skylake-xeon.o
  CC       rasdaemon-mce-amd-k8.o
  CC       rasdaemon-mce-amd-smca.o
  CC       rasdaemon-mce-intel-i10nm.o
  CC       rasdaemon-ras-extlog-handler.o
  CC       rasdaemon-ras-report.o
  CCLD     rasdaemon
/usr/bin/ld: rasdaemon-ras-events.o: in function `setup_event_trigger':
/home/ubuntu/workspace-rasdaemon-deb/rasdaemon/ras-events.c:292: undefined reference to `mem_fail_event_trigger_setup'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:706: rasdaemon] Error 1
make[2]: Leaving directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon'
make[1]: *** [Makefile:1394: all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/workspace-rasdaemon-deb/rasdaemon'
make: *** [Makefile:600: all] Error 2

Additional Information

  • Even if you check out to v0.8.1, you can still reproduce this issue.
  • You won't reproduce this issue with v0.8.0 source.

tai271828 avatar Jul 25 '24 19:07 tai271828