-
Notifications
You must be signed in to change notification settings - Fork 208
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
Allow linking multiple object files built from Souffle generated code #2371
Allow linking multiple object files built from Souffle generated code #2371
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2371 +/- ##
=======================================
Coverage 77.52% 77.52%
=======================================
Files 466 467 +1
Lines 30690 30778 +88
=======================================
+ Hits 23791 23862 +71
- Misses 6899 6916 +17
|
Hi @ruricolist thanks for integrating this! |
Please can you resolve the conflicts? Quentin has recently restructured the driver so that Souffle works better as a library. |
bfd3e9b
to
39f0f75
Compare
d680d9e
to
2c9248c
Compare
I've rebased and added two tests (one to show how linking is broken without namespaces, one to show that namespaces fix the problem). What's being tested here doesn't fit any of the predefined CMake test patterns, so most of the actual test is in Python. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for this port of my original change.
Hi, when using Souffle version 2.4, I encounter a problem that did not exist with version 2.2. The issue arises when I attempt to generate and link multiple Souffle files. It gives the same error with #2356. The specific process of generating *.cpp files I follow is:
Where A.dl is included in both B.dl and C.dl. This procedure was functioning correctly in version 2.2, but it leads to errors in the most recent version. I am looking for assistance on how to use namespaces in my Souffle programs to resolve this issue. Specifically, can you please provide an example of a solution that employs namespaces to fix this problem? |
Hi, In the first case, you need to create a top level datalog file that includes A, B and C, and pass only that top file to In the second case, you need to generate code with different namespaces for B and C:
|
Hi again, It was the second case and it worked with different namespaces. |
This addresses #2356 using the approach linked by @quentin in his comments there. I've taken the linked commit from his branch and adjusted it to apply to Souffle master, with some adjustments for generating multiple files.
Since the inability to link object files of Souffle programs is relevant to multiple projects using Souffle, I think it is desirable to address the problem directly in the short term.