How do I make a .so module from a .c file?

I'm trying to set up my apache (on solaris) to use reverse proxy.
This is a production server, so I want to have minimum downtime. (I.e not re-compile apache).

I've downloaded the appropriate .c files. I'll need to convert them to .so to make them work, correct?

I've tried copying files from another apache installation (on windows) but apache then says "unknown file type".

apxs that I've seen here and there, is not available on my machine.

Please, this is extremely urgent.

Best regards,
David
larsanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

giltjrCommented:
You need to copy the files from another Solaris box running the same family of hardware. ".so" files are binary compiled for a unique OS and hardware platform.  So you can't copy a ".so" file from Solaris running on Intel to Solaris running on  a Sparc.

Doc from the Apache site on how to create a ".so" file:

     http://httpd.apache.org/docs/2.0/dso.html

But you should be able to find and download the needed files from the Internet.  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
larsanAuthor Commented:
Thanks.

I found apxs, but it seems to need gcc?
0
giltjrCommented:
gcc is the GNU C/C++ compiler.  you need to be able to compile the source code into a executable program.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

NopiusCommented:
larsan, if you have no precompiled mod_proxy.so files for the same OS/architecture (as giltjr said), yes, you need to recompile and you should to have 'gcc' instaled.

Please tell me what apache version do you have 'httpd -V' and what on what Solaris/platform does it run 'uname -a'.
0
larsanAuthor Commented:
The apache is version 2.0.55

Uname -a generated:
SunOS marcy1 5.9 Generic_118558-02 sun4u sparc SUNW,UltraAX-i2
0
NopiusCommented:
Could you post entire 'httpd -l' and 'httpd -V' output?
0
larsanAuthor Commented:
Ah, stupid paths...

Here it is.

httpd -V:
Server version: Apache/2.0.55
Server built:   Nov 16 2005 15:53:45
Server's Module Magic Number: 20020903:11
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/www/app/apache_2.0.55"
 -D SUEXEC_BIN="/www/app/apache_2.0.55/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

httpd -l:
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

0
giltjrCommented:
Where did you get Apache from?  As it seems you did not compile it, I am assuming you got pre-compiled copy from some place.  Have you tried getting a copy of the ".so" file from where ever you got Apache from?
0
larsanAuthor Commented:
giltjr: I can't answer that, as we're generally never involved in the installation of server apps.
0
NopiusCommented:
larsan, if you wait, I'll compile that mod_proxy.so tomorrow for your architecture/apache version.
0
giltjrCommented:
Then I would suggest that you get the group that is involved and have them do this for you.  Even if you get the module from Nopius, I would think that whomever is responsible for the server installation would not really want you installing other modules.
0
NopiusCommented:
larsan, giltjr is right, EE is not the best authority for getting binaries even from experts.
Moreover, yor server version 2.0.55 is obsolete and has 2 security fixes, that can affect your server (one in mod_imap and one im mod_rewrite). Look for complete ChangesLog: http://www.apache.org/dist/httpd/CHANGES_2.0
I'd recommend you to get 2.0.59 version and build apache yourself with all required modules.

Anyway I compiled modules and you may get binaries and build instructions here:
http://nop-nop.com/larsan/proxy_larsan.tar.gz
Readme is here: http://nop-nop.com/larsan/README
0
larsanAuthor Commented:
Thanks guy's. I can mod the apache, or remove it if I wish. I should have said, WERE never involved.
Typo =)

I'll split the points, as you both contributed.

Thanks a million!

Regards,
David
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.