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

Update BDWGC. #4868

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Update BDWGC. #4868

merged 3 commits into from
Aug 28, 2024

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Aug 13, 2024

  • Use a more recent version of BDWGC, which also changes the folder structure.
  • It looks like it uses some GNU-specific extensions, which is why _GNU_SOURCE is necessary for compilation.

Fixes #4857.

@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label Aug 13, 2024
@fruffy fruffy force-pushed the fruffy/bdwgc_change branch from 10ce27c to a8e821d Compare August 15, 2024 08:12
@fruffy fruffy marked this pull request as ready for review August 20, 2024 13:41
fruffy added 2 commits August 20, 2024 17:31
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
@fruffy fruffy force-pushed the fruffy/bdwgc_change branch from a8e821d to b7c42e5 Compare August 20, 2024 15:31
@fruffy
Copy link
Collaborator Author

fruffy commented Aug 20, 2024

@jkhsjdhjs Could try this PR and see whether it works for you?

@fruffy fruffy requested a review from asl August 20, 2024 15:32
@jkhsjdhjs
Copy link
Contributor

Doesn't work for me due to

In file included from /home/jkhsjdhjs/aur/p4lang-p4c/src/p4c-fruffy-bdwgc_change/build/lib/CMakeFiles/p4ctoolkit.dir/Unity/unity_1_cxx.cxx:4:
/home/jkhsjdhjs/aur/p4lang-p4c/src/p4c-fruffy-bdwgc_change/lib/gc.cpp: In function ‘void setup_gc_logging()’:
/home/jkhsjdhjs/aur/p4lang-p4c/src/p4c-fruffy-bdwgc_change/lib/gc.cpp:321:22: error: invalid conversion from ‘void (*)(const char*, GC_word)’ {aka ‘void (*)(const char*, long unsigned int)’} to ‘GC_warn_proc’ {aka ‘void (*)(char*, long unsigned int)’} [-fpermissive]
  321 |     GC_set_warn_proc(&silent);
      |                      ^~~~~~~
      |                      |
      |                      void (*)(const char*, GC_word) {aka void (*)(const char*, long unsigned int)}
In file included from /usr/include/gc.h:2,
                 from /home/jkhsjdhjs/aur/p4lang-p4c/src/p4c-fruffy-bdwgc_change/lib/gc.cpp:32:
/usr/include/gc/gc.h:1409:38: note:   initializing argument 1 of ‘void GC_set_warn_proc(GC_warn_proc)’
 1409 | GC_API void GC_CALL GC_set_warn_proc(GC_warn_proc /* p */) GC_ATTR_NONNULL(1);
      |                                      ^~~~~~~~~~~~

@jkhsjdhjs
Copy link
Contributor

I also just noticed that /usr/include/gc.h and /usr/include/gc_cpp.h simply contain

/* This file is installed for backward compatibility. */
#include <gc/gc.h>

and

/* This file is installed for backward compatibility. */
#include <gc/gc_cpp.h>

respectively.

So if you're already at it, maybe the other includes should be adjusted as well (if that's also compatible with the CMake Fetch Content build variant).

Copy link
Contributor

@jkhsjdhjs jkhsjdhjs left a comment

Choose a reason for hiding this comment

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

Builds fine for me now!

@fruffy fruffy force-pushed the fruffy/bdwgc_change branch from 16a287b to f197041 Compare August 20, 2024 16:39
@fruffy fruffy requested a review from ChrisDodd August 22, 2024 17:50
@fruffy fruffy added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 86ef237 Aug 28, 2024
18 checks passed
@fruffy fruffy deleted the fruffy/bdwgc_change branch August 28, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Topics related to code style and build and test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't find gc_mark.h during build
3 participants