Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Shariful Alam
Hi Yann,
Thank you very much. That command works! Configuration script runs with no
error so far. Much appreciated.

Thanks,
Shariful

On Wed, Oct 20, 2021 at 4:25 PM Yann Ylavic  wrote:

> On Wed, Oct 20, 2021 at 10:55 PM Shariful Alam  wrote:
> >
> > I do not understand why it shows my C compiler is not working? The
> config.log https://pastebin.com/U72JMZqF
>
> This is because "./configure" will try to run this command to test the
> compile:
>
>   gcc -DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF -g
> -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -L./libxxx
> -Wl,-Bstatic -lxxx -Wl,-rpath=/opt/openssl/lib conftest.c
>
> which raises:
>   1. /usr/bin/ld: cannot find -lxxx
>   2. /usr/bin/ld: cannot find -lgcc_s
>   3. /usr/bin/ld: cannot find -lgcc_s
>
> You probably can address 1. by using the real lib name.
> For 2. and 3. I'd suggest:
>   LDFLAGS='-L./libxxx -Wl,-Bstatic -lxxx -Wl,-Bdynamic
> -Wl,-rpath=/opt/openssl/lib'
> because only the libs between -Bstatic and -Bdynamic should be linked
> statically.
> Though probably the '-Wl,-Bstatic -lxxx -Wl,-Bdynamic' belongs more in
> LIBS=...
>
> Also note that you could use NOTEST_LDFLAGS and NOTEST_LIBS (instead
> of LDFLAGS and LIBS) for them to apply to the httpd linking only (they
> won't be added to all the gcc tests run by ./configure). They need to
> be correct still, otherwise ./configure will pass but not make..
>
> Regards;
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Shariful Alam
Hi Eric,
I believe the *config.log* file that the error is referring to is in
*httpd-2.4.46*'s root directory. Here is full the config.log,
https://pastebin.com/U72JMZqF. On lines 101-105, it shows that my static
archive file is missing,


   1. configure:5361: checking whether the C compiler works
   2. configure:5383: gcc -DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE
   -DOPENSSL_LOAD_CONF -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE
   -L./libxxx -Wl,-Bstatic -lxxx -Wl,-rpath=/opt/openssl/lib conftest.c >&5
   3. /usr/bin/ld: cannot find -lxxx
   4. /usr/bin/ld: cannot find -lgcc_s
   5. /usr/bin/ld: cannot find -lgcc_s
   6. collect2: error: ld returned 1 exit status
   7. configure:5387: $? = 1
   8. configure:5425: result: no
   9. configure: failed program was


Any Idea why is that?


On Wed, Oct 20, 2021 at 3:57 PM Eric Covener  wrote:

> > configure: error: in `/home/apache/Downloads/httpd-2.4.46':
> > configure: error: C compiler cannot create executables
> > See `config.log' for more details
>
> IIUC you can find the compiler error in srclib/apr-util/config.log by
> scrolling backwards from the end and looking for your gcc.
> One of the flags you're passing is causing the compiler to blow up
> when probing for capabilities.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Yann Ylavic
On Wed, Oct 20, 2021 at 10:55 PM Shariful Alam  wrote:
>
> I do not understand why it shows my C compiler is not working? The config.log 
> https://pastebin.com/U72JMZqF

This is because "./configure" will try to run this command to test the compile:

  gcc -DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF -g
-O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -L./libxxx
-Wl,-Bstatic -lxxx -Wl,-rpath=/opt/openssl/lib conftest.c

which raises:
  1. /usr/bin/ld: cannot find -lxxx
  2. /usr/bin/ld: cannot find -lgcc_s
  3. /usr/bin/ld: cannot find -lgcc_s

You probably can address 1. by using the real lib name.
For 2. and 3. I'd suggest:
  LDFLAGS='-L./libxxx -Wl,-Bstatic -lxxx -Wl,-Bdynamic
-Wl,-rpath=/opt/openssl/lib'
because only the libs between -Bstatic and -Bdynamic should be linked
statically.
Though probably the '-Wl,-Bstatic -lxxx -Wl,-Bdynamic' belongs more in LIBS=...

Also note that you could use NOTEST_LDFLAGS and NOTEST_LIBS (instead
of LDFLAGS and LIBS) for them to apply to the httpd linking only (they
won't be added to all the gcc tests run by ./configure). They need to
be correct still, otherwise ./configure will pass but not make..

Regards;
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Eric Covener
> configure: error: in `/home/apache/Downloads/httpd-2.4.46':
> configure: error: C compiler cannot create executables
> See `config.log' for more details

IIUC you can find the compiler error in srclib/apr-util/config.log by
scrolling backwards from the end and looking for your gcc.
One of the flags you're passing is causing the compiler to blow up
when probing for capabilities.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Shariful Alam
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 
wrote:

> ср, 20 окт. 2021 г. в 21:59, Shariful Alam :
> >
> > 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-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Konstantin Kolinko
ср, 20 окт. 2021 г. в 21:59, Shariful Alam :
>
> 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-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Eric Covener
On Wed, Oct 20, 2021 at 2:59 PM Shariful Alam  wrote:
>
> 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

Did you just miss quotes on the value of LDFLAGS?

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Linking a third party library with httpd during installation

2021-10-20 Thread Shariful Alam
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.

I'm not sure if this is the right approach to link a library. Any help on
how can I link a library to "*httpd*" while installing it?


Thanks,

Shariful