LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-08-2006, 06:38 PM   #1
twistedpair
Member
 
Registered: Jan 2004
Posts: 71

Rep: Reputation: 15
static compile


All,
Csync2 requires librsync, libsqlite, and libssl to be installed. So I have a machine that has this stuff installed, and csync2 installs and runs just fine on that machine. I want to compile a binary of csync though, that I can copy to another machine and just run it without the extra programs. I believe statically compiling it will do the trick, but I think I did something incorrectly. I tried looking for the LDFLAGS setting in the Makefile, and setting it to "-static" without the quotes, but that didn't seem to do the trick. What am I doing wrong?

-Twistedpair
 
Old 01-08-2006, 07:12 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
yea the problem is you can only do static linking to archive type (*.a)
library files that have been compiled using the command "ar"
/usr/bin/ar
 
Old 01-09-2006, 01:27 PM   #3
twistedpair
Member
 
Registered: Jan 2004
Posts: 71

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by foo_bar_foo
yea the problem is you can only do static linking to archive type (*.a)
library files that have been compiled using the command "ar"
/usr/bin/ar
Okay so basically the idea is to install the libraries with:

AR=/usr/bin/ar

in the Makefile?

Then I should be able to specify "-static" in the Makefile for csync and it will just work right?

Thanks,
-Pair
 
Old 01-09-2006, 05:50 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
libssl aready has a static one
don't know about the other library
generally the configure switch is --enable-static
but you just have to read ./configure --help

in the other one it most likely will work better to ad flags to configure.ac
before you do configure but i don't know.

you will jus have to mess with it and check the output to see
a) if the gcc flags are correct
b) fix other problems that might arise
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
RH9 static compile doesn't work tceast Red Hat 0 09-03-2003 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration