?
Solved

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

Posted on 2007-04-10
13
Medium Priority
?
307 Views
Last Modified: 2010-03-04
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
0
Comment
Question by:larsan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 4
13 Comments
 
LVL 57

Accepted Solution

by:
giltjr earned 1000 total points
ID: 18882671
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
 

Author Comment

by:larsan
ID: 18884270
Thanks.

I found apxs, but it seems to need gcc?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 18885346
gcc is the GNU C/C++ compiler.  you need to be able to compile the source code into a executable program.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 27

Expert Comment

by:Nopius
ID: 18887136
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
 

Author Comment

by:larsan
ID: 18887732
The apache is version 2.0.55

Uname -a generated:
SunOS marcy1 5.9 Generic_118558-02 sun4u sparc SUNW,UltraAX-i2
0
 
LVL 27

Expert Comment

by:Nopius
ID: 18887752
Could you post entire 'httpd -l' and 'httpd -V' output?
0
 

Author Comment

by:larsan
ID: 18888009
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
 
LVL 57

Expert Comment

by:giltjr
ID: 18889069
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
 

Author Comment

by:larsan
ID: 18889150
giltjr: I can't answer that, as we're generally never involved in the installation of server apps.
0
 
LVL 27

Expert Comment

by:Nopius
ID: 18889342
larsan, if you wait, I'll compile that mod_proxy.so tomorrow for your architecture/apache version.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 18890194
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
 
LVL 27

Assisted Solution

by:Nopius
Nopius earned 1000 total points
ID: 18895092
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
 

Author Comment

by:larsan
ID: 18907627
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

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 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