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

Theta download/install script #15

Open
hajduakos opened this issue Sep 10, 2020 · 11 comments
Open

Theta download/install script #15

hajduakos opened this issue Sep 10, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@hajduakos
Copy link
Member

Installing Theta is now quite easy, we just have to download a few jar/dll/so files and set up an environment variable. I think for this we should create a script (or two: one for Linux and one for Windows). @grbeni if you like the idea, I can work on this.

@hajduakos hajduakos added the enhancement New feature or request label Sep 10, 2020
@grbeni
Copy link
Contributor

grbeni commented Sep 10, 2020

Sounds good, I think it is a great idea. If you need any help, let me know.

@hajduakos
Copy link
Member Author

#16 takes a step towards this direction by automatically downloading Theta. The next step will be to set the PATH / env. variable.

@hajduakos
Copy link
Member Author

I think setting up the PATH and the environment variables could be done in separate scripts, because that only needs to be done once, but every time there is a new release, it has to be downloaded again (without modifying the PATH / env. vars).

@grbeni
Copy link
Contributor

grbeni commented Sep 10, 2020

I think setting up the PATH and the environment variables could be done in separate scripts, because that only needs to be done once, but every time there is a new release, it has to be downloaded again (without modifying the PATH / env. vars).

I agree.

@benedekh
Copy link
Member

@hajduakos The get-theta1.sh script might miss the libgomp.so lib. On an Ubuntu distribution the previously mentioned lib had to be installed by apt-get install libgomp1, otherwise the z3java.so was missing it.

Besides, on Linux, it might not be enough to put the *.so files on the PATH. Theta was complaining that it did not find the *.so files, so they had to be copied into one of the following folders: /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib

If it is a general problem, then could we extend the corresponding README.md with the aforementioned hints?

@hajduakos
Copy link
Member Author

@benedekh thanks for the feedback. The libgom.so is absolutely right, I will include that in the installer script.

Regarding the path, what I usually do is that before executing Theta (with java -jar theta-....jar <ARGUMENTS>), I also execute export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./", where ./ is the directory where both Theta and the so files are stored. This works for a single session in the terminal. I am not sure how this would work out when calling Theta from Gamma. I will take a look how it is done in Gazer.

@benedekh
Copy link
Member

@hajduakos I add Theta to the Dockerimage the following way:

ENV PATH="/tools/theta:${PATH}"
ENV THETA_XSTS_CLI_PATH="/tools/theta/theta-xsts-cli.jar"
.....
WORKDIR /tools/theta
RUN wget https://github.com/ftsrg/gamma/raw/master/plugins/xsts/theta-bin/get-theta.sh -O ./get-theta.sh
RUN chmod +x ./get-theta.sh
RUN ./get-theta.sh

and the workaround commands after that:

RUN cp ./*.so /usr/lib/

Can you spot the place, where I made a mistake, such that the workaround command would not be necessary anymore?

@hajduakos
Copy link
Member Author

@benedekh can you try adding ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/tools/theta" (I think it can replace ENV PATH="/tools/theta:${PATH}", but you can also try having both after each other).

@benedekh
Copy link
Member

benedekh commented Oct 5, 2020

@hajduakos theta seems to be working find with the new environmental variable.

@grbeni
Copy link
Contributor

grbeni commented Apr 27, 2021

The scripts have been working well for everybody that I have had contact with. Is there any specific reason to keep this issue open?

@hajduakos
Copy link
Member Author

As far as I remember, the script only downloads Theta, but does not add it to the path. Based on the discussion above, we can do that in a separate script (download multiple times, but set path only once). So I think we can close this issue and maybe open a new one if there is a demand for setting the path with a script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants