14

I'm trying to build znort987's parser, and have executed sudo apt-get libssl-dev. I can see all sorts of ssl related header files in /usr/include/openssl but opensslconf.h is missing from the openssl folder and the make command raises the error:

 make: *** No rule to make target `/usr/include/openssl/opensslconf.h', needed by `.objs/rmd160.o'.  Stop.

I'm using Ubuntu 14.04 on a 32 bit AMD laptop.

Update: I executed the following to cleanout my installation:

sudo apt-get remove libssl-dev build-essential g++-4.4 libboost-all-dev libsparsehash-dev git-core perl

sudo apt-get install libssl-dev build-essential g++-4.4 libboost-all-dev libsparsehash-dev git-core perl
git clone git://github.com/znort987/blockparser.git
cd blockparser
make

Now I get:

  /usr/include/openssl/e_os2.h:56:33: fatal error: openssl/opensslconf.h: No such file or directory
7

If you're building on a 64-system and you're targeting 32-bit, the following command fixed this issue for me:

sudo apt-get install libssl-dev:i386
| improve this answer | |
  • 2
    And you need to activate this architecture first with sudo dpkg --add-architecture i386 – Sandburg Jul 8 '19 at 8:42
4

This stuff seems to have happened a long time ago (specifically, 2013-05-20 16:56:06 UTC). I ran into a weird problem that looked very much like the OP, but it turned out to be a problem with swig failing to attach the right set of includes when compiling. I ended up hunting through the source just to make sure it wasn't a ubuntu package problem, but it didn't seem to be an issue with ubuntu.

Looking more carefully into this, the openssl package shifted opensslconf.h into a multiarch-aware directory structure. Here's the detailed commit: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/openssl/utopic-updates/revision/11.1.42 and if you want to see how I came up with that revision, I followed the annotated revisions of the debian rules which was a surprisingly efficient way to figure out what happened: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/openssl/utopic-updates/annotate/head:/debian/rules.

And the committer, Kurt Roeckx, writes in the Changelog:

  • Move to /usr/include/$(DEB_HOST_MULTIARCH), and mark libssl-dev Multi-Arch: same.

To be fair, I wish the opensslconf.h was, at least, symlinked into the /usr/include/openssl folder with the rest of the logically related headers. But that's not a bug, that's just my opinion. To the folks that run into this problem like I did, it just takes a bit of sniffing out missing includes to keep things humming along.

And to the OP, it's quite a lot later now, but I just gave your exact set of steps a run through on a 14.04 LTS x64 box and didn't run into the problem you were having. Perhaps the problem was simply solved over time. Hope some of this helps.

| improve this answer | |
  • 1
    I think I'm having the same problem as you now. How did you solve it? – Surya Wijaya Madjid Sep 13 '15 at 6:59
3

have executed sudo apt-get libssl-dev. I can see all sorts of ssl related header files in /usr/include/openssl but opensslconf.h is missing from the openssl folder and the make command raises the error ...

It sounds like the package is defective.

<openssl/opensslconf.h> is created by OpenSSL's Configure command. It should be included with the distro files. The earliest mention I could find was OpenSSL's CHANGELOG at version 0.9.2.

File a bug report at https://bugs.launchpad.net/ubuntu/+filebug/?no-redirect.

| improve this answer | |
1

Looks like it's a problem with 32 vs. 64 bit systems. I cleared everything out, downloaded and built Openssl myself, and followed the instructions for building the parser. During the lnk phase it skipped the "incompatible libcrypto" and then failed.

So I am presuming that the required libraries are only available for 64 bit systems, and are skipped during the install of libssl-dev on 32 bit systems. A clearer error message would be nice.

| improve this answer | |
  • I'm trying to compile a 32 bit program on a 64 bit machine and am getting the same opensslconf.h not found error. installed libssl-dev (is there a 32 bit version of that?) and all but my program doesn't compile because of the missing file. Any ideas? – Roberto Andrade May 8 '15 at 17:00
1

It has moved because of multi arch. On amd64 it's located in /usr/include/x86_64-linux-gnu/openssl/opensslconf.h

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733644

| improve this answer | |
0

I encoutered this issue while compiling a setup meant for an embedded LTS 14 device on LTS 16 PC. This is how I solved it:

 cd /usr/include/openssl/

 sudo ln -s /usr/include/gnutls/openssl.h .

 sudo ln -s ../x86_64-linux-gnu/openssl/opensslconf.h .
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.