Skip to content

Conversation

@Chinhpham204719
Copy link

Summary

This PR fixes the multiple definition of the global fp1 used for logging, which caused linking errors when building modules like shrreg-tool and libvgpu.so.

Changes

  • Created fp1_global.h to declare extern FILE *fp1;
  • Replaced all FILE *fp1; in headers or multiple source files with #include "fp1_global.h"
  • Defined FILE *fp1 = NULL; only once in libvgpu.c

Related

Fixes #75

@Chinhpham204719 Chinhpham204719 force-pushed the fix_fp1_multiple_definition branch 18 times, most recently from 6cdb408 to baa42da Compare June 19, 2025 06:01
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add another .h file, can we move these to log_utils.h?

@Chinhpham204719 Chinhpham204719 force-pushed the fix_fp1_multiple_definition branch from baa42da to 8812c89 Compare June 19, 2025 06:33
@Chinhpham204719 Chinhpham204719 force-pushed the fix_fp1_multiple_definition branch from 8812c89 to 10c48f4 Compare June 19, 2025 06:54
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

Successfully merging this pull request may close these issues.

bash build.sh error multiple definition of fp1

2 participants