5

I am getting the below errors when trying to compile the openssl code. Getting below error during "make install" step. Please let me know if anyone resolved this issue. Google search has links but are pointing to an unresolved issue "http://marc.info/?l=openssl-users&m=121239973214424"

making install in crypto...
make[1]: Entering directory `/home/test/openssl-1.0.1f/crypto'
cp: cannot create regular file `./../libs/armeabi/include/openssl/crypto.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/crypto.h': No such file or directory
cp: cannot create regular file `./../libs/armeabi/include/openssl/opensslv.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/opensslv.h': No such file or directory
cp: cannot create regular file `./../libs/armeabi/include/openssl/opensslconf.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/opensslconf.h': No such file or directory
cp: cannot create regular file `./../libs/armeabi/include/openssl/ebcdic.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/ebcdic.h': No such file or directory
cp: cannot create regular file `./../libs/armeabi/include/openssl/symhacks.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/symhacks.h': No such file or directory
cp: cannot create regular file `./../libs/armeabi/include/openssl/ossl_typ.h': No such file or directory
chmod: cannot access `./../libs/armeabi/include/openssl/ossl_typ.h': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/test/openssl-1.0.1f/crypto'
make: *** [install_sw] Error 1
test@ubuntu:~/openssl-1.0.1f$ 

I went through this Error cp: cannot create regular file "": no such file or directory. But, there as script file was written by him. He got a chance to change the file. But, how to do in-case of openssl?

I configured openssl like this

./Configure android shared --prefix=./../libs/armeabi --openssldir=openssl

and did a

make
make install

I tried in root permissions as well, like

sudo make install

but still getting the same error.

Community
  • 1
  • 1
Suman
  • 4,221
  • 7
  • 44
  • 64
  • That mailing list post you cited is from 2008, applies to OpenSSL 0.9.8, and for SuSE Linux. Did you run `setenv-android.sh` to set up the cross-compile environment? – jww Apr 28 '14 at 22:37
  • Yes, i did that all. My old post has that information http://stackoverflow.com/questions/11929773/compiling-the-latest-openssl-for-android/18577811#18577811. In my github link, I manually writtent the android.mk files. This time I am trying to generate .so by cross compiling. And followed all the "EXPORT ..." thing given by @mchiasson. – Suman Apr 29 '14 at 04:58
  • Please show us your `setenv-android.sh`, and the results of running it (before you run `make`). – jww Apr 29 '14 at 05:02
  • Thanks for your help @jww :). Issue got resolved. Issue is not in setenv-android.sh file, it is in the configure line. – Suman Apr 29 '14 at 05:58

1 Answers1

9

After spending a lots of time (Trial and error method) I got the answer. DON'T give the relative path in configure. Give ONLY absolute paths like

./Configure android shared --prefix=`pwd`/../libs/armeabi --openssldir=openssl

due to relative path "cp: cannot create regular file `./../libs/armeabi/include/openssl/crypto.h': No such file or directory" this is failing.

Suman
  • 4,221
  • 7
  • 44
  • 64
  • 1
    `./Configure android shared ...` is somewhat odd. `setenv-android.sh` performs `export SYSTEM=android`, so the system is automatically picked up by `config`. If you have trouble in the future, I would recommend you look at [OpenSSL and Android](http://wiki.openssl.org/index.php/Android). – jww Apr 29 '14 at 06:14