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

Error When install openabe #61

Open
bo-hub opened this issue May 22, 2021 · 12 comments
Open

Error When install openabe #61

bo-hub opened this issue May 22, 2021 · 12 comments

Comments

@bo-hub
Copy link

bo-hub commented May 22, 2021

I am trying to install openabe in my machine.
I dowloaded the source code and executed the following command

cd libopenabe-1.0.0/
sudo -E ./deps/install_pkgs.sh
. ./env
make

When executed the command "make", the error occured.

...
install ./tools/c_rehash -> /home/bob/code/libopenabe-1.0.0/deps/root/bin/c_rehash
make[3]: Leaving directory '/home/bob/code/libopenabe-1.0.0/deps/openssl/openssl-1.1.1-dev'
make[2]: Leaving directory '/home/bob/code/libopenabe-1.0.0/deps/openssl'
make[2]: Entering directory '/home/bob/code/libopenabe-1.0.0/deps/gtest'
./download_gtest.sh 1.8.0
unzip googletest-release-1.8.0.zip
Archive: googletest-release-1.8.0.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of googletest-release-1.8.0.zip or
googletest-release-1.8.0.zip.zip, and cannot find googletest-release-1.8.0.zip.ZIP, period.
make[2]: *** [Makefile:23: googletest-release-1.8.0] Error 9
make[2]: Leaving directory '/home/bob/code/libopenabe-1.0.0/deps/gtest'
make[1]: *** [Makefile:9: all] Error 2
make[1]: Leaving directory '/home/bob/code/libopenabe-1.0.0/deps'
make: *** [Makefile:16: deps] Error 2

How can I fix this problem?
My OS is ubuntu 20 LTS

@a-thieme
Copy link

a-thieme commented May 28, 2021

I have the same issue with Ubuntu 20.04.1 LTS

@daviddhtn
Copy link

Hi @a-thieme, @bo-hub
The errors occur sine the download link has changed. Edit the file download_gtest.sh in
dopenabe/deps/gtest/ as following
url:
https://github.com/google/googletest/archive/release-${VERSION}.zip ->
https://github.com/google/googletest/archive/refs/tags/release-${VERSION}.zip
wget option:
wget -O ${GTEST_VERSION} ${GTEST_LINK} ->
wget -O ${GTEST_VERSION} ${GTEST_LINK} --no-check-certificate

@bo-hub
Copy link
Author

bo-hub commented Jun 9, 2021

I have edited the file download_gtest.sh as:

#!/bin/bash

VERSION=$1
if [[ $VERSION = "" ]]; then
    echo "[!] Missing version as argument"
    exit 0
fi

GTEST_VERSION=googletest-release-${VERSION}.zip
GTEST_LINK=https://github.com/google/googletest/archive/refs/tags/release-${VERSION}.zip

if [[ ! -f ${GTEST_VERSION} ]]; then
    wget -O ${GTEST_VERSION} ${GTEST_LINK} --no-check-certificate
fi

but the errors still occurred

...
install apps/openssl -> /home/bob/pkg/libopenabe-1.0.0/deps/root/bin/openssl
install ./tools/c_rehash -> /home/bob/pkg/libopenabe-1.0.0/deps/root/bin/c_rehash
make[3]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps/openssl/openssl-1.1.1-dev'
make[2]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps/openssl'
make[2]: Entering directory '/home/bob/pkg/libopenabe-1.0.0/deps/gtest'
./download_gtest.sh 1.8.0
unzip googletest-release-1.8.0.zip
Archive: googletest-release-1.8.0.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of googletest-release-1.8.0.zip or
googletest-release-1.8.0.zip.zip, and cannot find googletest-release-1.8.0.zip.ZIP, period.
make[2]: *** [Makefile:23: googletest-release-1.8.0] Error 9
make[2]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps/gtest'
make[1]: *** [Makefile:9: all] Error 2
make[1]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps'
make: *** [Makefile:16: deps] Error 2

@daviddhtn
Copy link

Hi @bo-hub,
Your previous run may create an empty file: googletest-release-1.8.0.zip (0 kb). Double check and delete this file in gtest folder and run again. Good luck,

@bo-hub
Copy link
Author

bo-hub commented Jun 10, 2021

Hi @daviddhtn
Thanks for your patient explanation.
The gtest error seems fixed by following your advice. The new errors happened in the following steps.

...
cd googletest-release-1.8.0;
mkdir -p build && cd build/ &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/bob/pkg/libopenabe-1.0.0/deps/root ../googletest/ &&
make install &&
touch ../.built
cmake: symbol lookup error: /lib/x86_64-linux-gnu/libssh.so.4: undefined symbol: EVP_PKEY_get_raw_public_key, version OPENSSL_1_1_1
make[2]: *** [Makefile:16: googletest-release-1.8.0/.built] Error 127
make[2]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps/gtest'
make[1]: *** [Makefile:9: all] Error 2
make[1]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps'
make: *** [Makefile:16: deps] Error 2

It seems lack of openssl dev environment , I check out my openssl dev by

bob@bob-vm:~$ which openssl
/usr/bin/openssl

and run

bob@bob-vm:~/pkg/libopenabe-1.0.0$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version (1.1.1f-1ubuntu2.4).
0 upgraded, 0 newly installed, 0 to remove and 180 not upgraded.

It seems my openssl dev already installed.

@PekeDevil
Copy link
Contributor

I'm working with OpenABE and at first, I also ran into some issues while installing.

Did you make sure to run sudo -E ./deps/install_pkgs.sh before jumping to . ./env make when you installed the library for the second time? Otherwise, you may want to check that CMake is installed, if running on a virtual machine some VM images do not have CMake installed by default.

@a-thieme
Copy link

a-thieme commented Jun 25, 2021

Hi @daviddhtn
Thanks for your patient explanation.
The gtest error seems fixed by following your advice. The new errors happened in the following steps.

...
cd googletest-release-1.8.0;
mkdir -p build && cd build/ &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/bob/pkg/libopenabe-1.0.0/deps/root ../googletest/ &&
make install &&
touch ../.built
cmake: symbol lookup error: /lib/x86_64-linux-gnu/libssh.so.4: undefined symbol: EVP_PKEY_get_raw_public_key, version OPENSSL_1_1_1
make[2]: *** [Makefile:16: googletest-release-1.8.0/.built] Error 127
make[2]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps/gtest'
make[1]: *** [Makefile:9: all] Error 2
make[1]: Leaving directory '/home/bob/pkg/libopenabe-1.0.0/deps'
make: *** [Makefile:16: deps] Error 2

It seems lack of openssl dev environment , I check out my openssl dev by

bob@bob-vm:~$ which openssl
/usr/bin/openssl

and run

bob@bob-vm:~/pkg/libopenabe-1.0.0$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version (1.1.1f-1ubuntu2.4).
0 upgraded, 0 newly installed, 0 to remove and 180 not upgraded.

It seems my openssl dev already installed.

I encountered this problem as well. I fixed this by manually installing gtest and removing any mention of gtest from deps/gtest/Makefile, changed the name of deps/gtest/download_gtest.sh and removed any mention of gtest or lgtest from Makefile.common. To manually install gtest, I followed these instructions.

I then encountered a bison error where it said something like "bison -d -v zparser.yy not found". To solve this, I changed line 58 of src/Makefile from $(BISON) -d -v zparser.yy to bison -d -v zparser.yy. This uses the up-to-date system-wide bison program instead of the one inside openabe. Another way to do this may be to change line 9 of src/Makefile.inc from BISON = ${ZROOT}/bin/bison to BISON = /bin/bison

Those fixed my issues. All unit tests passed.

@Zouxiaojun123
Copy link

image
How do solve this question?

@a-thieme
Copy link

image
How do solve this question?

I solved this issue by changing line 9 of src/Makefile.inc from BISON = ${ZROOT}/bin/bison to BISON = /bin/bison or BISON = bison.

I'm pretty sure bison is already installed when you run the initial dependency script for openABE so this just uses that updated (system-wide) version of bison instead of whatever one it tried to install and run inside the openABE directory.

@ChantMisaya
Copy link

image
I'v changed the /deps/gtest/download_gtest.sh as previous solution.
It seems that I have the same issue with @bo-hub, but mine is Makefile:10, his is Makefile:9, so I try to use @a-thieme solution. But I'm a bit confused about here "I encountered this problem as well. I fixed this by manually installing gtest and removing any mention of gtest from deps/gtest/Makefile, changed the name of deps/gtest/download_gtest.sh and removed any mention of gtest or lgtest from Makefile.common. To manually install gtest, I followed these instructions."
Removing any mention of gtest from /deps/gtest/Makefile and removed any mention of gtest or lgtest from Makefile.common, in those two files, which line should be removed?

@dulalsaurab
Copy link

I followed @a-thieme's solution and it worked for me. Just wanted to summarize his solution as @ChantMisaya seems to have some confusion.

  1. Manually instal gtest
  2. rename /deps/gtest/download_gtest.sh --> /deps/gtest/download_gtest.sh.bkp (or whatever you prefer)
  3. comment out ./download_gtest.sh $(VERSION) from /deps/gtest/Makefile
  4. comment out LDLIBS ?= -lgtest -lpthread from Makefile.common
  5. remove gtest from: Makefile.common#L45
  6. change BISON = ${ZROOT}/bin/bison to BISON = /bin/bison from src/Makefile.inc

@aditya-d23
Copy link

image
I am getting this error can anyone help me please

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

8 participants