?
Solved

Apache with SSL on Solaris compiles, but get error when I run it

Posted on 2005-04-26
8
Medium Priority
?
231 Views
Last Modified: 2012-05-05
i,

I am trying to build Apache with SSL support from source, and I compiled OpenSSL 0.9.7g using gcc 2.95.3 on a Solaris 9 system.

The build/compiles for both OpenSSL and Apache *seemed* to go ok, but
when I tried to run Apache, (either ./apachectl start or ./httpd
-<anything>), I am getting an error, something like:

        "Cannot load /usr/local/apache2/module/mod_auth_digest.so into
         the server: ld.so.1: fatal: relocation error: file ...symbol
         __floatdidf not found"


I added /usr/ccs/bin to the beginning of the PATH, and /opt/sft/bin
(where gcc is) to the end of the PATH before doing the OpenSSL build.

The config I used for OpenSSL was:

./config -fPIC shared -prefix=/usr/local/openssl
-openssldir=/usr/local/openssl

The OpenSSL compile/build seemed like it went ok (no errors), and the
subsequent build of Apache (2.0.52) also seemed to be ok.

I then set the LD_LIBRARY_PATH to
"/usr/local/openssl/lib:$LD_LIBRARY_PATH"
before doing the Apache build, and used:

./configure --prefix=/usr/local/apache2 --enable-mods-shared=most
--with-ssl=/usr/local/openssl --enable-ssl=share

when building Apache, which seemed to go all right.

Can anyone tell me how to diagnose/fix this problem?

Thanks,
Jim
0
Comment
Question by:jimcpl
  • 4
  • 2
7 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13864933
you should use the same LD_LIBRARY_PATH during startup of apache as it was during build.
Just add the same line for LD_LIBRARY_PATH to the apachectl script
0
 
LVL 1

Author Comment

by:jimcpl
ID: 13866220
rmazanyich,

I'll try to do that in the apachectl script, but I'm somewhat doubtful that that might be the problem, because I ran the apachectl script within the same terminal window and the same shell, immediately after doing the Apache build.  

To be more specific, after doing the OpenSSL build and the Apache build (per my original msg), I just cd'ed to the /usr/local/apache2/bin directory and typed "apachectl start" or "apachectl startssl" or "httpd -t", and I got the error.

I'll post back later today after I've done as you suggested.

Jim
0
 
LVL 1

Author Comment

by:jimcpl
ID: 13866610
Hi,

I've been doing some searching, and seen some references to setting "LDFLAGS" and "-L" and "-R".  I'm not sure how these should be applied (e.g., set/export before running configure, or edit the output from the configure)?  

Can anyone help with this?

Thanks,
Jim
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 19

Expert Comment

by:ramazanyich
ID: 13866665
try to configure  without  --enable-mods-shared=most
because it is causing problems only on mod_digest I suppose.
0
 
LVL 1

Author Comment

by:jimcpl
ID: 13866772
Hi,

But, one of the main things that I'm trying to accomplish was that I wanted SSL?

Jim
0
 
LVL 1

Author Comment

by:jimcpl
ID: 13871046
Hi,

I finally got Apache working with SSL this afternoon.  The 'key' was a warning message that appeared in the config.log several times.  The message was rather confusing, and actually, I had several colleagues puzzling over it for awhile.

Basically, the message indicated that because I was using a gcc version that was earlier than 3.00, it could not bind libgcc to create the .SO, but it created the .SOs anyway, and the message advised manually linking the .SOs to libgcc.  

What I ended up doing was go through the entire configure/make/make install, then afterwards, looking in the <Apache source root>/modules directory at the modules.mk file.  I then re-linked (ld) each of the modules, including libgcc.a, which was in the /usr/local/openssl/lib-gcc/sparc.../2.95.3 directory to create a new .SO.

Once I did that, Apache started up without a problem.  I then copied over some CA and server certs that I had from a working test system, and VOILA, everything worked!

So, bottom line, it appears that the main problem was using the older gcc, and not anything to do with LD_LIBRARY_PATH, etc.

Once I have a chance, I want to go back and re-do the build, because I had done a lot of messing around with LD_LIBRARY_PATH and LDFLAGS, just to make sure I can reproduce this.

Thanks,
Jim
0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 13902982
The question has been PAQ'd and the 300 points have been refunded.
RomMod
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question