Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-04-10
13
Medium Priority
?
315 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
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.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

636 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