0

I am trying to compile a new package that is based on OpenWRT (it is some kind of a modified OpenWRT). During the ./configure proccess I am getting a fail due to OpenSSL that is missing but when I checked it is already insatlled.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = (unset),
    LC_COLLATE = "C",
    LC_CTYPE = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Apply config ./ugw/config/GRX750_HE_VDSL_LTE_GW_72
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'libssl'... failed.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'md5sum'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'python3'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'openssl'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install the openssl library (with development headers)

Prerequisite check failed. Use FORCE=1 to override.
make: *** [staging_dir/host/.prereq-build] Error 1

When I run yum install openssl or yum install openssl-devel I am getting

Package openssl-1.0.1e-57.el6.x86_64 already installed and latest version

I already looked at similar issues such - OpenSSL missing during ./configure. How to fix? and OpenSSL not found during ./configure but they didn't help in my case.

Not sure if it is related but maybe those locale warning I am getting at the beginning are related?

My OS is CentOS 6.

Thanks!

A. Sarid
  • 111
  • 1
  • 6
  • `Checking 'libssl'... failed` might be the reason. Is there a package that provides `libssl`? Perhaps `yum install libssl`? I know Ubuntu has a [`libssl-dev`](https://packages.ubuntu.com/xenial/libssl-dev) package. – Nathan.Eilisha Shiraini Jul 12 '17 at 11:45
  • @NathanShiraini AFAIK `libssl-dev` is `openssl-devel` in CentOS – A. Sarid Jul 12 '17 at 11:46
  • It appears you have openSSL installed but you don't have it installed with the developer handles, per the error message, "Please install the openssl library **(with development headers)**" – Ramhound Jul 12 '17 at 16:41
  • Of course 1.0.1e isn't the current version either. – Ramhound Jul 12 '17 at 16:42
  • @Ramhound isn't `openssl-devel` the "development headers"? – A. Sarid Jul 12 '17 at 19:19
  • Have you tried to remove openssl then install it? – Ramhound Jul 12 '17 at 19:37
  • You may need to override the default location of the header files. You should start (and end?) by looking at documentation for the package you are trying to build. Usually, this means setting an environment variable fore `./configure` or by adding an argument to the program. – lungj Jul 12 '17 at 20:19

2 Answers2

1

For anyone who might run into the same problem.
As @lungj pointed out in the comments, it seems that the issue was due to environment variables that were wrongly configured.

Unsetting the following solved the problem:

unset LD_LIBRARY_PATH
unset LDFLAGS
unset CFLAGS

I didn't had to install/change anything else.

A. Sarid
  • 111
  • 1
  • 6
0

For what it's worth, I ran into the same issue, but the issue was that I switched branches from the openwrt repo, and did not fully clean the repo before rebuilding. (even though I did make clean and even git clean -fd, but that was not enough). After some debugging I found that the command being used to test the openssl install was

    echo 'int main(int argc, char **argv) { SSL_library_init(); return 0; }' | \
    gcc $(HOST_CFLAGS) -include openssl/ssl.h -x c -o $(TMP_DIR)/a.out - -lcrypto -lssl $(HOST_LDFLAGS)

And the issue was that the flags were such that the staging_dir/host/lib was used as a library include path. Since the ssl library was built before, but incompatible with my host version of libssl-dev, the compile command failed.

Fully cleaning the git repo before rebuilding (git clean -f -d -X) and then remaking fixed it. Hope this helps someone someday

Arnout
  • 311
  • 1
  • 7