Re: Linking a third party library with httpd during installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, @Eric, @Konstantin for pointing that out that missing quote and extra whitespace. Appreciate it. I'm new to all this linking and these always make me confused. 

I tried the following,

       CFLAGS='-DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF' LDFLAGS='-L./libxxx -Wl,-Bstatic -lxxx -Wl,-rpath=/opt/openssl/lib' ./configure --prefix=/etc/apache2 --enable-ssl --with-ssl=/opt/openssl/ --with-pcre=/usr/local/pcre --enable-so

and it shows me,

checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  adding "-g" to CFLAGS
  adding "-O2" to CFLAGS
  adding "-pthread" to CFLAGS
  setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
configure:
configure: Configuring Apache Portable Runtime Utility library...
configure:
checking for APR-util... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/apache/Downloads/httpd-2.4.46':
configure: error: C compiler cannot create executables
See `config.log' for more details


I do not understand why it shows my C compiler is not working? The config.log https://pastebin.com/U72JMZqF

Thanks, 
Shariful



On Wed, Oct 20, 2021 at 1:18 PM Konstantin Kolinko <knst.kolinko@xxxxxxxxx> wrote:
ср, 20 окт. 2021 г. в 21:59, Shariful Alam <dipto181@xxxxxxxxx>:
>
> Hello,
>
> I'm trying to install httpd-2.4.46 from the source. Usually, I use the following command to configure and it works fine,
>
>         ~/Downloads/httpd-2.4.46$ CFLAGS='-DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF' LDFLAGS=-Wl,-rpath=/opt/openssl/lib ./configure --prefix=/etc/apache2 --enable-ssl --with-ssl=/opt/openssl/ --with-pcre=/usr/local/pcre --enable-so
>
>
> Currently, I'm trying to link a third-party library while installing the httpd. using the following command,
>
>          ~/Downloads/httpd-2.4.46$ CFLAGS='-DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF' LDFLAGS= -L./libxxx -Wl, -Bstatic -lxxx -Wl, -rpath=/opt/openssl/lib ./configure --prefix=/etc/apache2 --enable-ssl --with-ssl=/opt/openssl/ --with-pcre=/usr/local/pcre --enable-so
>
>
> and it shows the following error,
>
>    -bash: -L./libxxx: No such file or directory
>
> However, the "libxxx " directory presents in the same directory from where I'm running the above command.
>

Note that in your command line there is a whitespace just after
"LDFLAGS=" and before its supposed value.

A shell command may be preceded by a series of variable assignments.
When the shell encounters the whitespace just after "LDFLAGS=" it
interprets that it ends those assignments, and tries to execute
"-L./libxxx" as the command.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux