Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need 32-bit curl [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
barefootcoder
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 93

PostPosted: Wed Apr 26, 2006 1:00 am    Post subject: Need 32-bit curl [solved] Reply with quote

I'm working with an Athlon X2 machine (experienced with Gentoo, but new to AMD64). The main thing this machine will be used for is to run Cerberus Helpdesk. I got that installed, but it chokes when it tries to load libcurl. Cerberus support tells me it's because it's a 64-bit library.

So I need a 32-bit version of curl. What I'm wondering is, can't I just compile it myself in 32-bit mode? I could even hack the ebuild a bit to have it done automatically every time I update curl if I get truly ambitious. I think I just need to a) get my gcc working with the multilib use flag, and b) get the libraries compiled (with advice from the forum FAQ) and stuck into /usr/lib32. Does this sound rational? Is there an easier way?

The only stumbling block I have ATM is that I can't seem to convince my gcc to recompile with multilib. When I do an emerge -v, multilib shows up as

Code:
(-multilib)


which I guess means I can't change it (since adding mulitlib to make.conf and packages.use both failed abysmally). My profile is set to

Code:
lrwxrwxrwx  1 root root 50 Jan 16 23:16 /etc/make.profile -> ../usr/portage/profiles/default-linux/amd64/2005.1


which is the multilib profile, right? I have the following emul-linux-x86 libs installed (if that's relevant): baselibs, compat, and glibc. No X on this machine, so I don't think I need any of the others.

Any thoughts?


Last edited by barefootcoder on Thu Apr 27, 2006 11:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
paulisdead
Guru
Guru


Joined: 10 Apr 2002
Posts: 510
Location: Seattle, WA

PostPosted: Wed Apr 26, 2006 3:33 am    Post subject: Reply with quote

There's an older 32 bit curl in my xine32 ebuild that you could use since xine relies on it. It's getting a bit dated, but installing it should work. I didn't break it into a seperate package from xine, though. The xine files could be removed and you could redo it pretty easily to just be curl. Just search the amd64 board for xine32 and you'll find it.
_________________
"we should make it a law that all geeks have dates" - Linus
Back to top
View user's profile Send private message
niskel
Guru
Guru


Joined: 17 Nov 2004
Posts: 457
Location: Fredericton, NB, Canada

PostPosted: Wed Apr 26, 2006 1:16 pm    Post subject: Reply with quote

The reason you can't 'enable' multilib is because it is already enabled. When a USE flag is in ()s, that means the flag exists for certain profiles but your profile does not have the option of changing it. In your case, your profile forces you to use multilib so it is actually already on.
Back to top
View user's profile Send private message
barefootcoder
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 93

PostPosted: Wed Apr 26, 2006 7:18 pm    Post subject: Reply with quote

Quote:
There's an older 32 bit curl in my xine32 ebuild that you could use since xine relies on it. It's getting a bit dated, but installing it should work. I didn't break it into a seperate package from xine, though. The xine files could be removed and you could redo it pretty easily to just be curl. Just search the amd64 board for xine32 and you'll find it.


Thanx, I'll give that a shot. But I'm still interested in compiling it directly because then I could (theoretically) have an ebuild that keeps it updated as well. But this might get me by temporarily.

Quote:
The reason you can't 'enable' multilib is because it is already enabled. When a USE flag is in ()s, that means the flag exists for certain profiles but your profile does not have the option of changing it. In your case, your profile forces you to use multilib so it is actually already on.


Well, I considered that, but then wouldn't it say

Code:
(+multilib)


instead? If it is on, I should be able to compile the libcurl libs for 32-bit then ... maybe I'll just try it and see what it says.

Thanx all for the help.
Back to top
View user's profile Send private message
barefootcoder
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 93

PostPosted: Wed Apr 26, 2006 10:46 pm    Post subject: Reply with quote

Quote:
Just search the amd64 board for xine32 and you'll find it.


Thanx paulisdead. I did find it (you might want to update the first post to include the right URL tho) and it works like a charm. Until I get a chance to see if I can generate the 32-bit libs myself (without creating a chroot), this has helped me move forward on testing the Cerberus stuff. Good deal.
Back to top
View user's profile Send private message
barefootcoder
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 93

PostPosted: Thu Apr 27, 2006 11:52 pm    Post subject: Reply with quote

Okay! I hacked together an ebuild to make the 32-bit libs for me. Since this could conceivably be useful for others in the same boat, I've included it below. A quick diff of this vs. the standard ebuild it's patterned after should reveal what I changed (and it wasn't all that much).

So niskel, you were right and multilib is apparently turned on for my gcc. I still say that it ought to show up as (+multilib) as opposed to (-multilib), but that's a quibble for the emerge authors.

Here's the ebuild. If anyone sees any improvements I could make, please let me know.

Code:
#/usr/local/portage/net-misc/curl32/curl32-7.15.1-r1.ebuild
inherit eutils

DESCRIPTION="A Client that groks URLs (32-bit libs only)"
HOMEPAGE="http://curl.haxx.se/"
SRC_URI="http://curl.haxx.se/download/curl-${PV}.tar.bz2"

LICENSE="MIT X11"
SLOT="0"
KEYWORDS="amd64"
IUSE="ssl ipv6 ldap ares gnutls idn kerberos krb4 test"

RDEPEND="gnutls? ( net-libs/gnutls )
    ssl? ( !gnutls? ( dev-libs/openssl ) )
    ldap? ( net-nds/openldap )
    idn? ( net-dns/libidn )
    ares? ( net-dns/c-ares )
    kerberos? ( app-crypt/mit-krb5 )
    krb4? ( app-crypt/kth-krb )"

DEPEND="${RDEPEND}
    test? (
        sys-apps/diffutils
        dev-lang/perl
    )"
# used - but can do without in self test: net-misc/stunnel

src_unpack() {
    unpack ${A}
    mv ${WORKDIR}/curl-${PV} ${WORKDIR}/${P}
    cd "${S}"
    epatch "${FILESDIR}"/curl-7.15-libtftp.patch
}

src_compile() {
    local myconf
    myconf="$(use_enable ldap)
        $(use_with idn libidn)
        $(use_enable kerberos gssapi)
        $(use_enable ipv6)
        --enable-http
        --enable-ftp
        --enable-gopher
        --enable-file
        --enable-dict
        --enable-manual
        --enable-telnet
        --enable-nonblocking
        --enable-largefile"                                                                               
                                                                                                           
    if use ipv6 && use ares; then
        ewarn "c-ares support disabled because it is incompatible with ipv6."
        myconf="${myconf} --disable-ares"
    else
        myconf="${myconf} $(use_enable ares)"
    fi
   
    if use ipv6 && use krb4; then
        ewarn "kerberos-4 support disabled because it is incompatible with ipv6."
        myconf="${myconf} --disable-krb4"
    else
        myconf="${myconf} $(use_enable krb4)"
    fi
   
    if use gnutls; then
        myconf="${myconf} --without-ssl --with-gnutls=/usr"
    elif use ssl; then
        myconf="${myconf} --without-gnutls --with-ssl=/usr"
    else
        myconf="${myconf} --without-gnutls --without-ssl"
    fi
   
    CFLAGS="-march=i386 -m32 " LDFLAGS="-m32" econf ${myconf} --libdir=/usr/lib32 || die 'configure failed'
    cd "${S}/lib"
    emake || die "install failed for current version"
}

src_install() {
    cd "${S}/lib"
    make DESTDIR="${D}" install || die "installed failed for current version"
}
Back to top
View user's profile Send private message
gerryAU
n00b
n00b


Joined: 02 May 2004
Posts: 27
Location: Melbourne, Australia

PostPosted: Thu Aug 09, 2007 5:32 am    Post subject: Reply with quote

Thanks for the tip , I used it for ingame downloads with ioUrbanTerror 4.0 on x64. (needs libcurl for downloading but wouldn`t with the native x64libcurl, so I installed the 32bit version & now works for me :D


Better late but never :wink:
_________________
Dont waste clock cycles, use GNU/Gentoo!
Back to top
View user's profile Send private message
coder22
n00b
n00b


Joined: 22 Jan 2013
Posts: 1

PostPosted: Tue Jan 22, 2013 9:20 am    Post subject: How should I use your makefile for generating 32 bit libcurl Reply with quote

Hey barefootcoder

Could you please list the instructions that can be used to generate the libcurl for 32 bit machne.
_________________
coder
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum