Closed hMcLauchlan closed 3 years ago
Thank you. I have fixed lib missing issue in efce80e1b7cde73aaa4ee71cfb1e767de04a92e2.
However, I did not encounter LTO issue. I can build it successfully. I am using below: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0 cmake version 3.16.3
What is your configuration?
Or you can try to fix and send patch for review.
I'm currently testing on:
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
cmake version 3.18.2
which fails.
I also compiled off temp_master
on my dev machine, which has
gcc version 10.3.1 20210422 (Red Hat 10.3.1-1) (GCC)
cmake version 3.19.7
which succeeds. I reckon some improvement to LTO between GCC 8 and GCC 9+ is the reason.
I think the fix I made (forcing the LTO plugin to be loaded) should be idempotent with any GCC fixes. That is to say, it will fix builds on older GCC without breaking newer builds. I just ported that change on my personal machine with GCC10 and it works fine.
I'll send a patch shortly. Thanks!
Following up on https://github.com/jyao1/openspdm/pull/185, I tried to get cmake compiling but found I could not. Two problems arose:
LTO issues
After snooping around a bit, it looks a bit like this issue here (https://stackoverflow.com/questions/39236917/using-gccs-link-time-optimization-with-static-linked-libraries).
As far as I can tell, this might be a linux-y problem that doesn't manifest on windows. Although I don't have a windows machine handy so it's hard to test. In either case, I applied the recommended fix from that post
Missing library issues
Following the previous fix, I hit:
which seemed to have a fairly simple fix. I just added
after which my build works.
Followup
As followup, I want to ask:
For now I will keep working on top of these fixes on modifications to #185. Thanks!