 |
 |
Building Bzip Shared Library
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2008
Status:
Offline
|
|
Need a bit of help here.
For one of the programs I'm compiling, while reading the ./configure output, I was told my bzip installation was out-of-date. I'm trying to compile bzip with shared library support.
How do I compile bzip into a shared library?
Thank you.
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Easiest is probably to use one of the ports collections - macports has 1.0.5, which is an update over the 1.0.4 that my Leopard installation has, and the other collections have probably update by now as well. If you really want to build it, I guess you should download the tarball and do the regular ./configure, make and sudo make install. That it's a shared library shouldn't be anything different - you only have to make sure that the directory it ends up in is in the libpath when building something else.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2008
Status:
Offline
|
|
See there is no ./configure for bzip
to compile I have to use
make install PREFIX=/tmp
There is no option for shared libraries. I understand I could use macports but this doesn't help me out in trying to understand how to manually compile bzip.
(Sorry for creating another account. Could not log into last one.)
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Well, if it doesn't follow the standard conventions, I guess I'll have to investigate the specific package. On a business trip atm, I'll give it a spin when I'm back at my Mac and have a chance to look at it.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Just typing "make" and then "sudo make install" from the source directory seems to work fine for me. Takes only a few seconds to build.
What problems are you having exactly?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2008
Status:
Offline
|
|
Hi,
My problem is I want to compile bzip as a shared library in a nonstandard directory. I have the non standard directory part solved by simply doing the command...
"sudo make install PREFIX=/path/to/..."
But I still don't know how to compile as a shared library (sorta). By simplying compiling with sudo make install or by using PREFIX you library will be static and will have the name ...."libbz2.a"
When you compile bzip from macports, the files look like this
"
ls -la /opt/local/lib
total 1024
drwxr-xr-x 8 root admin 272 Oct 12 19:56 .
drwxr-xr-x 11 root admin 374 Oct 12 09:46 ..
-rw-rw-r-- 1 root admin 0 Dec 17 2007 .turd_MacPorts
-rwxr-xr-x 2 root admin 77196 Oct 12 19:56 libbz2.1.0.4.dylib
-rwxr-xr-x 2 root admin 77196 Oct 12 19:56 libbz2.1.0.dylib
-rwxr-xr-x 2 root admin 77196 Oct 12 19:56 libbz2.1.dylib
-rw-r--r-- 2 root admin 212320 Oct 12 19:56 libbz2.a
-rwxr-xr-x 2 root admin 77196 Oct 12 19:56 libbz2.dylib
"
Since my last post, I emailed the maintainer of bzip from macports and asked him how bzip is being built as a shared library. He pointed me to
"http://trac.macports.org/browser/trunk/dports/archivers/bzip2/files/patch-Makefile-dylib.diff"
So now what I did is
downloaded bzip source
extracted source from tar.gz archive.
cd /source
patch -p0 < /Path/to/patch-Makefile-dylib.diff
make
sudo make install PREFIX=/tmp
after running sudo make install.... I get this error...
"
cp: libbz2.1.0.4.dylib: No such file or directory
make: *** [install] Error 1
"
So although I have learned a little more on how to compile as a shared library, I still can't get it to compile properly.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |