# Help compiling shoes

**URL:** <https://www.ruby-forum.com/t/help-compiling-shoes/141988>\
**Category:** Ruby\
**Created:** [July 2, 2008, 12:48pm UTC](https://www.ruby-forum.com/t/help-compiling-shoes/141988 "2008-07-02T12:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hroberts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@hroberts](https://www.ruby-forum.com/u/hroberts)\
**Post date:** [July 2, 2008, 12:48pm UTC](https://www.ruby-forum.com/t/help-compiling-shoes/141988/1 "2008-07-02T12:48:02Z")

</div>

Due to recent concerns I took the (perhaps rash) step of purging my apt  
installed version of Ruby and installed it from source to achieve patch  
level 22 before it was available through the repository. All is well  
with my system now, except that I cannot re-compile Shoes correctly.  
When I try to make it, I get:

CC -o dist/libshoes.so  
/usr/bin/ld: cannot find -lruby  
collect2: ld returned 1 exit status  
make: \*\*\* [dist/libshoes.so] Error 1

Compiling software via make is not one of my strengths, but I have tried  
sudo ldconfig and make -I/usr/local/include to no avail. It seems that  
Ruby or a library cannot be found, but I’m unsure how to proceed. Any  
suggestions or tips would be appreciated.

Thanks,  
Howard

---

<div class="post-metadata">

**Author:** ![hroberts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@hroberts](https://www.ruby-forum.com/u/hroberts)\
**Post date:** [July 2, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/help-compiling-shoes/141988/2 "2008-07-02T12:52:56Z")

</div>

From: Howard R. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

# CC -o dist/libshoes.so

# /usr/bin/ld: cannot find -lruby

# collect2: ld returned 1 exit status

# make: \*\*\* [dist/libshoes.so] Error 1

dÃ©jÃ vu,

got a similar problem and i’d like to quotes \_why’s answer…

* * *

> /usr/bin/ld: cannot find -lruby  
> collect2: ld returned 1 exit status  
> make: \*\*\* [dist/libshoes.so] Error 1

And it doesn’t have the shared lib installed.

You’ll need to rebuild Ruby to include the shared lib:

$ ./configure --enable-shared  
$ make && make install

I’ll look into switching to static linking if the shared lib is  
missing. This is very common.

## \_why"

kind regards -botp

---

<div class="post-metadata">

**Author:** ![hroberts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@hroberts](https://www.ruby-forum.com/u/hroberts)\
**Post date:** [July 2, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/help-compiling-shoes/141988/3 "2008-07-02T13:08:38Z")

</div>

PeÃ±a, Botp wrote:

> got a similar problem and i’d like to quotes \_why’s answer…  
>   
> You’ll need to rebuild Ruby to include the shared lib:
> 
> $ ./configure --enable-shared  
> $ make && make install  
>   
> \_why"  
>   
> kind regards -botp

Exactly the problem, of course. Thanks to you, botp (and \_why, too) for  
the solution.

Sincerly,  
Howard
