[users@httpd] Linking a third party library with httpd during installation
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
Re: [users@httpd] Linking a third party library with httpd during installation
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
Re: [users@httpd] Linking a third party library with httpd during installation
ср, 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
[users@httpd] Is it possible to override ... ?
Hi, We are using Apache 2.4.48. This Apache is primarily acting as a proxy, and we use the WebLogic Plugin for Apache to connect from the Apache to a WebLogic server/backend. In the Apache ssl.conf, we have a , and in that , they have a : . . . WLSRequest On SetHandler weblogic-handler WebLogicCluster xxx.foo.com:14101 WLCookieName OAM_JSESSIONID SecureProxy ON WLSSLWallet ".../wallet" Debug OFF WLLogFile "/logs/oam_location.out" . . . Because of the , this Apache is not able to serve local content (e.g., html, etc.), but I have a requirement to be able to serve a single HTML page from this Apache. Unfortunately, they want to keep that in the ssl.conf, so I am trying to figure out how I might be able to configure the Apache so that it can serve that HTML page that I am needing? I have tried to add an Alias in front of the , i.e.: === Alias "/foo" "/apps/products/apache/instances/apache_oam/foo" . . . === But I am getting a Forbidden response. Also sometimes the browser seems to "loop", adding "/index.html" to the end of the URL in the address bar. So I was wondering: Is there a way to accomplish what I am trying to do, without disturbing the ?? Thanks, Jim - 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
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
> 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
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
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
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 > >
[users@httpd] Re: Is it possible to override ... ?
I haven't figured out how to get rid of the Forbidden problem, but I've found a kind of workaround to get the Apache to send a response... Since accessing the /foo was causing a Forbidden (403) error, I added an ErrorDocument: = ErrorDocument 403 "This is the response message that I want" Alias "/foo" "/apps/products/apache/instances/apache_oam/foo" . . . = That does cause the browser to get a response message, but I KNOW it is a real hack, and also NOT GOOD, because I think that with the ErrorDocument, that means every time a user gets a 403 error, they are going to see that "This is the response message that I want" response message :(!! So far to try to avoid the Forbidden error, I've tried adding: Require all granted <.Directory> But I still get the Forbidden error. If anyone knows how I cat avoid the Forbidden error (so I wouldn't need the ErrorDocument), please help? Thanks, Jim On Wednesday, October 20, 2021, 03:40:53 PM EDT, ohaya wrote: Hi, We are using Apache 2.4.48. This Apache is primarily acting as a proxy, and we use the WebLogic Plugin for Apache to connect from the Apache to a WebLogic server/backend. In the Apache ssl.conf, we have a , and in that , they have a : . . . WLSRequest On SetHandler weblogic-handler WebLogicCluster xxx.foo.com:14101 WLCookieName OAM_JSESSIONID SecureProxy ON WLSSLWallet ".../wallet" Debug OFF WLLogFile "/logs/oam_location.out" . . . Because of the , this Apache is not able to serve local content (e.g., html, etc.), but I have a requirement to be able to serve a single HTML page from this Apache. Unfortunately, they want to keep that in the ssl.conf, so I am trying to figure out how I might be able to configure the Apache so that it can serve that HTML page that I am needing? I have tried to add an Alias in front of the , i.e.: === Alias "/foo" "/apps/products/apache/instances/apache_oam/foo" . . . === But I am getting a Forbidden response. Also sometimes the browser seems to "loop", adding "/index.html" to the end of the URL in the address bar. So I was wondering: Is there a way to accomplish what I am trying to do, without disturbing the ?? Thanks, Jim