Error when installing gem

I’m working on a project and am bundling up my APIs into a gem for
distribution. The gem includes native code that needs to be compiled, so
I’ve included an extconf.rb file, etc. to do this.

On a test machine the gem installs fine, the code is compiled, etc. and
things go well.

But on a development machine (one of my coworkers) the gem won’t
install. The problem is that some of our native libraries and heads on
which the gem depends aren’t in the standard locations; i.e., not in
/usr/lib and /usr/include. Instead they’re in the developer’s git repo.

When we install the gem command says:

—8—
Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/bin/ruby
–with-qpid-dir
–without-qpid-dir
–with-qpid-include
–without-qpid-include=${qpid-dir}/include
–with-qpid-lib
–without-qpid-lib=${qpid-dir}/lib
–with-stdc++lib
–without-stdc++lib
–with-qpidclientlib
–without-qpidclientlib
—8—

But when I include “–without-qpid-dir=~/Programming/Qpid/builddir/src”
(the location of all of the libraries in my development environment) gem
gives me:

ERROR: While executing gem … (OptionParser::InvalidOption)
invalid option: --without-qpid-dir=~/Programming/Qpid/builddir/src/

What’s the problem and what does it expect?

On Tue, Oct 4, 2011 at 10:06 AM, Darryl L. Pierce [email protected]
wrote:

On 10/03/2011 07:40 PM, Luis L. wrote:

Darryl Pierce wrote in post #1024793:

[…]

ERROR: While executing gem … (OptionParser::InvalidOption)
invalid option: --without-qpid-dir=~/Programming/Qpid/builddir/src/

What’s the problem and what does it expect?

gem install – --with-opt-for-gem=…
^^

Note the double slashes to separate options for RubyGems than the
options you provide to the gem installation.

All this is detailed in the RubyGems inline help:

gem help install

Still no joy.

[email protected]:pkg (qpid-nonblocking-io-separate-threads) $
gem install qpid-0.13.0.gem –
–with-qpid-lib=~/Programming/Qpid/builddir/src/
–with-qpid-include=~/Programming/Qpid/qpid/cpp/include/

From the directories you’re feeding into gem install, seems to me that
you didn’t compile and install the Qpid library.

Please read the library documentation about configure, compile and
installation, but you should have a “libqpidclient.a” inside “lib”
directory of the directory you’re pointing.

From here it seems you’re pointing to the source code instead.

The directory pointed to by --with-qpid-lib (I also tried
–with-qpid-dir) exists and contains libqpidclient.so, which is not
being found in the above.

The so (shared object) is the compiled library and is for execution,
you the linking library instead (.a)

Also, is polite reply to the list so all benefit from the answers.

Luis L.

On 10/04/2011 03:18 PM, Luis L. wrote:

From the directories you’re feeding into gem install, seems to me that
you didn’t compile and install the Qpid library.

That’s right. On this system I have the libraries in my development
directories.

The so (shared object) is the compiled library and is for execution,
you the linking library instead (.a)

Hrm, are you sure about that? Our development libraries don’t distribute
any files other than the .so and headers. No .a files, which are
intermediate to the .so.

Also, is polite reply to the list so all benefit from the answers.

I’m not sure what you mean. I did reply to the list.

On 10/04/2011 06:33 PM, Luis L. wrote:

Darryl Pierce wrote in post #1025054:

On 10/04/2011 03:18 PM, Luis L. wrote:

From the directories you’re feeding into gem install, seems to me that
you didn’t compile and install the Qpid library.

That’s right. On this system I have the libraries in my development
directories.

What are the contents of src then? it contains the .so/dll file?

This is Linux, so it’s .so files.

Anyhow, please verify that the directory you’re pointing with
–with-qlib-lib contains the .a file.

There are no .a files in the build output directories.

Darryl Pierce wrote in post #1025054:

On 10/04/2011 03:18 PM, Luis L. wrote:

From the directories you’re feeding into gem install, seems to me that
you didn’t compile and install the Qpid library.

That’s right. On this system I have the libraries in my development
directories.

What are the contents of src then? it contains the .so/dll file?

The so (shared object) is the compiled library and is for execution,
you the linking library instead (.a)

Hrm, are you sure about that? Our development libraries don’t distribute
any files other than the .so and headers. No .a files, which are
intermediate to the .so.

GCC can’t link to .so/dll without a .a file, the .a file contains the
required information about the exported symbols from the library.

The .a files are not intermediate, see above.
(normally will be libmydll.a and your so will be mydll.so/mydll.dll)

Also, is polite reply to the list so all benefit from the answers.

I’m not sure what you mean. I did reply to the list.

Weird, got a copy of your message to my inbox when I normally use
ruby-forum to reply messages.

Anyhow, please verify that the directory you’re pointing with
–with-qlib-lib contains the .a file.


Luis L.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs