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

Cannot compile application that links with PerfFlow Aspect via pkg-config #50

Open
ilumsden opened this issue Jun 30, 2022 · 0 comments · May be fixed by #59
Open

Cannot compile application that links with PerfFlow Aspect via pkg-config #50

ilumsden opened this issue Jun 30, 2022 · 0 comments · May be fixed by #59
Assignees
Milestone

Comments

@ilumsden
Copy link
Contributor

I am trying to integrate PerfFlow Aspect into DYAD's new Autotools-based build system. To locate and link PFA, I am using pkg-config and the PKG_CHECK_MODULE m4 macro in my configury. When trying to compile DYAD with PFA support, I got the following error:

error: unable to load plugin '-faddrsig': '-faddrsig: cannot open shared object file: No such file or directory'
make[2]: *** [Makefile:489: dyad_la-dyad.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
error: unable to load plugin '-faddrsig': '-faddrsig: cannot open shared object file: No such file or directory'

For reference, I confirmed that -faddrsig is being introduced automatically by Clang (not Autotools). To test if this issue was being caused by PFA's .pc file, I run DYAD compilation with 3 .pc files that differ in terms of the Cflags and Libs entries:

Original:

Libs: -L${libdir} -lperfflow_runtime -L${libdir} -lperfflow_parser -L${libdir} -lWeavePass
Cflags: -Wc,-Xclang,-load

New w/ Spaces:

Libs: -L${libdir} -lperfflow_runtime -L${libdir} -lperfflow_parser
Cflags: -Wc -Xclang -load -Xclang ${libdir}/libWeavePass.so

New w/o Spaces:

Libs: -L${libdir} -lperfflow_runtime -L${libdir} -lperfflow_parser
Cflags: -Wc,-Xclang,-load,-Xclang,${libdir}/libWeavePass.so

When using the original .pc file, I got the error that I mentioned that the beginning of this comment. When using the new .pc file with spaces, I got the same error as the original, along with the following warning:

warning: unknown warning option '-Wc' [-Wunknown-warning-option]

Interestingly, when I ran with the new .pc file without spaces, I got a different error:

error: unable to load plugin '-I../../src/common': '-I../../src/common: cannot open shared object file: No such file or directory'

Obviously, the -I flag is not a plugin, so something about the ordering of the command-line arguments to clang is messed up. Given that this change in error happens only when changing the .pc file, this implies that this issue seems to be driven by the .pc file.

For reference, I was running all of this on Lassen (POWER9 system), with the following modules/libraries used for dependencies:

  • clang/10.0.1-gcc-8.3.1 (which is recommended in the following PFA README)
  • cmake/3.23.1
  • Other dependencies are satisfied by system defaults
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 a pull request may close this issue.

3 participants