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

Improve build instructions / process #1

Open
d-suvorov opened this issue Aug 30, 2017 · 11 comments
Open

Improve build instructions / process #1

d-suvorov opened this issue Aug 30, 2017 · 11 comments

Comments

@d-suvorov
Copy link

Hi,
I've run into trouble trying to build MemSAT. As I understand Maven build is not working now because of unsatisfied dependencies. So I've tried importing memsat.psf as a team project in Eclipse and got the following error:

The following errors occurred while importing projects. Some projects may not be loaded.
  Failed to read project description file from location '/home/wotopul/git/WALA/com.ibm.wala.cast.java.polyglot/.project'.
    Failed to read project description file from location '/home/wotopul/git/WALA/com.ibm.wala.cast.java.polyglot/.project'.
    /home/wotopul/git/WALA/com.ibm.wala.cast.java.polyglot/.project (No such file or directory)

It seems that the projects listed in memsat.psf are inconsistent with current state of WALA project. Could you fix this or provide more detailed instructions if I am doing something wrong? More detailed instructions would be helpful anyway as a vanilla Maven building process.

BR

@d-suvorov
Copy link
Author

UPD. I was able to build the project using lines from Travis configuration file and installing everything locally. After amending some configuration I was also able to run tests from Eclipse. Should I close this issue now?

@msridhar msridhar changed the title Building issues Improve build instructions / process Aug 31, 2017
@msridhar
Copy link
Member

I've renamed the issue to reflect the problem here. @wotopul is there anything you could submit as a PR in terms of better configuration, docs, etc.?

@juliandolby
Copy link
Contributor

The MemSAT build process that works on Travis CI uses Maven, and has two steps:

  1. You need to have built the latest WALA by cloning it and doing a 'mvn clean install -DskipTests'. MemSAT relies on WALA projects and Maven expects to find them installed.

  2. 'mvn clean install' in the top-level directory of the clone of MemSAT

Take a look at the Travis CI configuration for MemSAT if you need more details.

@msridhar
Copy link
Member

@juliandolby maybe we should update the MemSAT README with those instructions? That sounds a lot simpler than what is written there now.

@d-suvorov
Copy link
Author

d-suvorov commented Aug 31, 2017

@juliandolby yes, thank you. I've understood that already. But if you aren't going to deploy these WALA artifacts anywhere wouldn't it be better to have this steps explicitly mentioned in README (as suggested by @msridhar )? It will save time for someone else.

@juliandolby
Copy link
Contributor

juliandolby commented Aug 31, 2017 via email

@juliandolby
Copy link
Contributor

I changed the README to have the Maven instructions

@d-suvorov
Copy link
Author

d-suvorov commented Sep 1, 2017

  1. Sorry for delay. Yes, I confirm that these steps lead to successful build on my Linux machine. (You've also missed ant getJars command to fetch some dependencies).

  2. Also I'll leave this point because it might be helpful. To start hacking with MemSAT I still need to import it in Eclipse, it is the only way to run tests individually (correct me if I'm wrong), I'm still working my way through the project so I haven't yet figured out API entry points. Instructions in the previous version of README didn't work (see my very first post), so this is what I have done:

    • Rename fetched dependency cp com.ibm.wala.memsat/lib/kodkod.jar com.ibm.wala.memsat/lib/kodkod-2.0.jar
    • Import MemSAT as a Maven project

Thank you all for fast responses.

@graymalkin
Copy link

graymalkin commented Jun 13, 2018

I'm having a lot of difficulty compiling this project on a linux command line. I'm not a java/maven person so that's possibly not helping.

In particular, having built WALA checked out at R_1.3.8 using the prescribed build command, I'm getting this error in MemSAT when I try building it:

[ERROR] Failed to execute goal on project com.ibm.wala.memsat: Could not resolve dependencies for project com.ibm.wala:com.ibm.wala.memsat:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.ibm.wala:com.ibm.wala.cast.js.rhino:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.cast.java.ecj:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.cast.java:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.ide:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.ide.jdt:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.cast.js:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.cast:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.cast.test:jar:1.5.0-SNAPSHOT, com.ibm.wala:com.ibm.wala.core.tests:jar:1.5.0-SNAPSHOT: Could not find artifact com.ibm.wala:com.ibm.wala.cast.js.rhino:jar:1.5.0-SNAPSHOT -> [Help 1]

Can anyone offer some help and guidance on the current build process?

@graymalkin
Copy link

I've helped myself. I eroneously checked out WALA to the most recent release, and my setup doesn't set $JAVA_HOME as expected by some parts of the build system.

@juliandolby
Copy link
Contributor

In general, MemSAT is kept up to date with the latest WALA, and will likely work only with that version. Thus, getting the latest WALA is the right thing to do.

As for JAVA_HOME, I think it is normally set by the shell, so you should not need to set it by hand.

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

No branches or pull requests

4 participants