Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Oct 2006 01:25:13 -0700
From:      "Dan Bikle" <dan.bikle@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: [FreeBSD-Q] Creating .so libraries on FreeBSD?
Message-ID:  <74252ed10610220125k25f79e94g2384c833cbf5bcd8@mail.gmail.com>
In-Reply-To: <74252ed10610220003p2f619ab7j10dbe6da394e338b@mail.gmail.com>
References:  <74252ed10610220003p2f619ab7j10dbe6da394e338b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi again,

I got scrAPI working on my beastie box.

It turns out the tidy I was using was
from my /usr/ports directory rather than from
sourceforge.

I had to struggle a bit with the sourceforge tidy.

My beastie box was missing a bunch of the gnu tools like libtoolize,
autoconf, automake...

Once I got those installed,
I followed the directions attached to tidy.

Eventually, I ran a make command which made
a whole lot of stuff.  One of those things
was a .so file which was named libtidy-0.99.so.0

I copied it to /tmp/libtidy.so and copied that
to the location pointed to by the Tidy.path
variable.

Mine looks like this:

Tidy.path='/usr/local/lib/ruby/gems/1.8/gems/scrapi-1.2.0/lib/tidy/libtidy.so
'

I'm not sure the best place to put the above variable.

I put it in my controller but that is not a good
DRY place.

But, now I got scrAPI working on my beastie box and
I'm feeling good.

To answer my own question:
How do I make .so files?

ans1: use the Makefile
ans2: use gcc

I saw this fly by on my terminal:

gcc -O2 -Wall -Wno-switch -Wno-parentheses -Wno-unused -o .libs/tidy tidy.o
../src/.libs/libtidy.so -Wl,--rpath -Wl,/usr/local/lib


-Dan

On 10/22/06, Dan Bikle <dan.bikle@gmail.com> wrote:
>
> Beastie People,
>
> I'm working with some ruby software called scrAPI.
>
> I got scrAPI working on my Mac so that's good.
>
> FreeBSD is different story.
>
> My beastie box is tripping over tidy.
>
> I think it wants a tidy.so library.
>
> When I installed scrAPI on my Mac; it came with the
> Mac shared library bolted on already.
>
> I'm not sure how to make a tidy.so library.
>
> On my FreeBSD box...
> I can make a tidy executable using the src I got from source forge.
>
> It looks like I have 2 options:
>
> -Learn how to make a tidy.so
> -Learn how to configure scrAPI so it uses /usr/local/bin/tidy
>  rather than tidy.so
>
> Any tips anyone?
>
> -Dan
>
>


-- 
bikle@bikle.com
http://bikle.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?74252ed10610220125k25f79e94g2384c833cbf5bcd8>