-
Notifications
You must be signed in to change notification settings - Fork 142
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
Unable to build use-phasar-as-library example, phasar_FOUND set to false #531
Comments
Hi @icmccorm, I could reproduce your issue. |
Can you please check whether #532 fixes the warnings you get from cmake? |
Sure! I'll be able to look at this in the next day or so, and I'll get back to you ASAP. |
My apologies for the delay! I tried building this in the first docker container configuration I mentioned, which I had linked under Dockerfile-custom.txt. I received the following error:
I haven't been able to try this again with Dockerfile-bootstrap.txt, but I'll follow up again in the next day or two once I can! |
what is the state of this issue? @icmccorm ? |
Sorry for the wait! I just tried building in a local docker container using ./bootstrap.sh on my M1 Mac, and it worked correctly, passing all tests. Closing this issue. |
Looks like the example is again broken on develop branch, with the renaming and split of libraries. I have tried to add the libraries by changing here to set(PHASAR_COMPONENTS
utils
config
llvm_utils
passes
llvm_db
db
llvm_pointer
pointer
llvm_controlflow
controlflow
llvm_typehierarchy
taintconfig
llvm_ifdside
) , but now I get this error
Add |
hi @asesidaa, thanks for pointing that out. You are right, the installation is broken again. Can you try whether https://github.com/secure-software-engineering/phasar/tree/f-FixInstallAfterReworkFolderStructure fixes the issue? |
Thanks for the quick fix. I have tested it, the example now works correctly. Oh, and another issue related to It seems that when installed using |
Thanks for that observation. For this one I don't have a quick fix^^. We will see what we can do about it |
It seems that the json validator repo has updated the cmake file about install, which could be related? https://github.com/pboettch/json-schema-validator/blob/main/CMakeLists.txt#L129 |
Bug description
I receive warnings of the following form when executing
cmake .
as a step toward building the use-phasar-as-library example.This occurs for both
phasar::phasar_phasarllvm_utils
andphasar::phasar_utils
. When usingbootstrap.sh
as opposed to a custom build script, I also encountered this error:I have been able to build and use PhaSAR's example-tool without these errors occurring; this only happens when building something outside of PhaSAR's source.
Configuration
This occurs when building PhaSAR's use-phasar-as-library example in a Docker container on my M1 MacBook Pro; x86 emulation isn't enabled. I have created a directory with the contents of
use-phasar-as-library
and a clone of PhaSAR inside. The structure is like so:When troubleshooting, I built PhaSAR in two ways. In the first configuration, I executed
sudo ./bootstrap.sh
as suggested in the readme. Only this configuration triggered the error withjson_schema_validator
. In the second configuration, I recreated the commands used in the GitHub Actions workflow configuration with an additionalcmake . --install
at the end. Both Dockerfiles are attached below to assist with recreating these errors.Within
CMakeLists.txt
, I set thePHASAR_LIBRARY_DIR
andPHASAR_INCLUDE_DIR
variables to point to theinclude
andlib
directories in bothphasar/build/
as well as/usr/local/lib/phasar/
and/usr/local/include/phasar/
. The error occurred with each of these options.Steps to reproduce
bootstrap.sh
or the commands for a Release build as specified in ci.ymlPHASAR_LIB_DIR
andPHASAR_INCLUDE_DIR
environment variables to point to thelib
andinclude
directories in either/usr/local/../phasar
or in thebuild
directory of the clone of PhaSAR.cmake .
in the directory containing the contents of use-phasar-as-libraryContext (Environment)
Operating System:
Build Type:
Possible solution
Unknown.
Example files
Here are Dockerfiles that recreate each of the configurations I used.
Files:
Many thanks for your time and assistance!
The text was updated successfully, but these errors were encountered: