Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
using 32-bit library on 64-bit system
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Art Werschulz  
View profile  
 More options Nov 10, 2:33 pm
Newsgroups: comp.os.linux.development.system
From: Art Werschulz <a...@dsm.fordham.edu>
Date: Tue, 10 Nov 2009 14:33:55 -0500
Local: Tues, Nov 10 2009 2:33 pm
Subject: using 32-bit library on 64-bit system
Hi.

We have a mixed bunch of 32-bit (i686) and 64-bit (x86_64) Fedora 11
machines.  I created a library on one of the 32-bit machines by issuing
the commands
   g++ -c List.cc
   ar q libList.a List.o
   ranlib libList.a

Suppose that I attempt to use same on a 64-bit machine:
   g++ -o foo foo.o -L. -lList
I get the following:
   /usr/bin/ld: skipping incompatible libList.a when searching for -lList
   /usr/bin/ld: cannot find -lList

Now it's my impression that the 64-bit machines can use 32-bit
libraries, see (e.g.) /usr/lib vs. /usr/lib64.  Other than the fact that
these two directories are using shared libraries (.so), is there
something I'm missing here that would allow the 32-bit libraries to be
used on the 64-bit machines?

Many thanks.
--
Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: a...@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone:   Fordham U. (212) 636-6325, Columbia U. (646) 775-6035


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Schwartz  
View profile  
 More options Nov 10, 3:34 pm
Newsgroups: comp.os.linux.development.system
From: David Schwartz <dav...@webmaster.com>
Date: Tue, 10 Nov 2009 12:34:22 -0800 (PST)
Local: Tues, Nov 10 2009 3:34 pm
Subject: Re: using 32-bit library on 64-bit system
On Nov 10, 11:33 am, Art Werschulz <a...@dsm.fordham.edu> wrote:

> We have a mixed bunch of 32-bit (i686) and 64-bit (x86_64) Fedora 11
> machines.  I created a library on one of the 32-bit machines by issuing
> the commands
>    g++ -c List.cc
>    ar q libList.a List.o
>    ranlib libList.a

> Suppose that I attempt to use same on a 64-bit machine:
>    g++ -o foo foo.o -L. -lList
> I get the following:
>    /usr/bin/ld: skipping incompatible libList.a when searching for -lList
>    /usr/bin/ld: cannot find -lList

You just tried to link a 32-bit library into a 64-bit executable.

> Now it's my impression that the 64-bit machines can use 32-bit
> libraries, see (e.g.) /usr/lib vs. /usr/lib64.  Other than the fact that
> these two directories are using shared libraries (.so), is there
> something I'm missing here that would allow the 32-bit libraries to be
> used on the 64-bit machines?

32-bit executables can use 32-bit libraries. 64-bit executables cannot
(for practical purposes) use 32-bit libraries.

What are you trying to do exactly? Are you trying to produce a 64-bit
executable using a 32-bit library? Or are you trying to produce a 32-
bit executable using a 32-bit library on a 64-bit machine?

DS


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Art Werschulz  
View profile  
 More options Nov 11, 12:27 pm
Newsgroups: comp.os.linux.development.system
From: Art Werschulz <a...@dsm.fordham.edu>
Date: Wed, 11 Nov 2009 12:27:33 -0500
Local: Wed, Nov 11 2009 12:27 pm
Subject: Re: using 32-bit library on 64-bit system
Hi.

David Schwartz <dav...@webmaster.com> writes:
> 32-bit executables can use 32-bit libraries. 64-bit executables cannot
> (for practical purposes) use 32-bit libraries.

I wasn't aware of the latter.

> What are you trying to do exactly? Are you trying to produce a 64-bit
> executable using a 32-bit library? Or are you trying to produce a 32-
> bit executable using a 32-bit library on a 64-bit machine?

This put me on the right path.  For those who are interested, I needed
to add the -m32 option to g++.  The problem was then that I didn't have
the stubs-32.h file.  A bit of searching led me to the glibc-devel.i586
package, which did the trick.

Thanks, David.

--
Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: a...@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone:   Fordham U. (212) 636-6325, Columbia U. (646) 775-6035


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Schwartz  
View profile  
 More options Nov 11, 6:30 pm
Newsgroups: comp.os.linux.development.system
From: David Schwartz <dav...@webmaster.com>
Date: Wed, 11 Nov 2009 15:30:22 -0800 (PST)
Local: Wed, Nov 11 2009 6:30 pm
Subject: Re: using 32-bit library on 64-bit system
On Nov 11, 9:27 am, Art Werschulz <a...@dsm.fordham.edu> wrote:

> Thanks, David.

You're welcome. By the way, you asked the wrong question. You should
have asked "how can I build a 32-bit binary on a 64-bit system".

DS


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Art Werschulz  
View profile  
 More options Nov 12, 9:21 am
Newsgroups: comp.os.linux.development.system
From: Art Werschulz <a...@dsm.fordham.edu>
Date: Thu, 12 Nov 2009 09:21:01 -0500
Local: Thurs, Nov 12 2009 9:21 am
Subject: Re: using 32-bit library on 64-bit system
Hi.

David Schwartz <dav...@webmaster.com> writes:
> On Nov 11, 9:27 am, Art Werschulz <a...@dsm.fordham.edu> wrote:

>> Thanks, David.

> You're welcome. By the way, you asked the wrong question. You should
> have asked "how can I build a 32-bit binary on a 64-bit system".

You're right.  Of course,
   do {
     ask_question;
     get_answer;
   } while (! issue_clarified);
is a pretty useful general paradigm.  :-)

--
Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: a...@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone:   Fordham U. (212) 636-6325, Columbia U. (646) 775-6035


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google