LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-28-2016, 09:28 AM   #1
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Rep: Reputation: Disabled
Adding 32-bit binaries to your pure 64-bit build


Android studio is really pushing that you develop in a 64-bit Linux environment but their tool requires a few 32-bit binaries (libc6 libncurses5 libstdc++6 lib32z1).

My Linux build is a pure 64-bit build. Is it possible to add these 32-bit binaries somewhere so that Android Studio will work correctly?
 
Old 01-29-2016, 02:33 AM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth( I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,974
Blog Entries: 3

Rep: Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354
Hi.

"libc6 libncurses5 libstdc++6 lib32z1 android studio" = (About 1,680 results (0.54 seconds) )

http://stackoverflow.com/questions/2...-linux-machine

Hope it helps? WINE came to mind and I got stuck knowing .apk is not .exe
______________________
F-Droid
 
Old 01-29-2016, 05:26 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,838

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by jamison20000e View Post
Hi.

"libc6 libncurses5 libstdc++6 lib32z1 android studio" = (About 1,680 results (0.54 seconds) )

http://stackoverflow.com/questions/2...-linux-machine

Hope it helps? WINE came to mind and I got stuck knowing .apk is not .exe
______________________
F-Droid
This is really not helpful! You might just as well have posted "RTFM", the first few links ( at least ) from your search term refere to debian/ubuntu this is LFS so those instructions are not really helpful and nor is your reply, I expect better from a senior member.
 
Old 01-29-2016, 03:45 PM   #4
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Original Poster
Rep: Reputation: Disabled
Thanks anyways guys. I experimented for a while but then reverted my build back to the 32-bit version. Google has kneecapped Ant and eclipse for developing android apps and so in addition to having to use Android Studio, a few of the binaries in the Android SDK were switched out with 64-bit ones which caused me to try to set it all up on a 64-bit build. After much searching, I was able to switch out the few 64-bit SDK binaries for older 32-bit ones. Moral of the story is to make a backup copy of your Android SDK files before doing an update because the new changes might break your ability to build your app.

Last edited by GameCodingNinja; 01-29-2016 at 08:36 PM.
 
1 members found this post helpful.
Old 01-30-2016, 06:26 AM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,450
Blog Entries: 15

Rep: Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030
Adding 32-bit to a 64-bit system would require a lot of rebuilding packages along the lines of CLFS and CBLFS to create and retune the system to a hybrid environment, and often at times it might not work the best.

You pretty much would have to rebuild the toolchain, about all the system and subsystem daemons and libraries for both architectures, and most of the drivers and activate 32-bit support in the kernel if it already isn't.
 
Old 01-30-2016, 09:43 AM   #6
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Original Poster
Rep: Reputation: Disabled
Wow, thanks Reaper. Supporting both is a lot more intense then I ever imagined.
 
Old 01-30-2016, 09:50 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,450
Blog Entries: 15

Rep: Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030
Yeah pretty much unless you build a hybrid system from the ground-up, stay to one architecture.

Try Slackware with multilib sometime to see how complex it can be to support a hybrid system.
 
Old 02-02-2016, 02:27 PM   #8
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Building a multilib system from an already running pure 64 bit system isn't that hard. Only issue is that multiple packages have to be built twice to get the 32/64 bit libs. You also have to rebuild system-wide gcc and binutils.

I have the following resources available:

Building 32 bit glibc from an already pure 64 bit system: https://github.com/elkrejzi/system-m...2032%20bit.txt (a bit outdated, glibc-2.19, gcc-4.9, but it could be easily modified to support latest toolchain)

Adding multilib capable compiler to LFS chapter 5: https://github.com/elkrejzi/system-m...0toolchain.txt (fairly newer)

List and order of packages which I build twice: https://github.com/elkrejzi/system-m...r-20150924.txt (search for "32 and 64 bit")

Build commands for those packages can be extracted from their respective buildscripts: https://github.com/elkrejzi/system-m...f/buildscripts

WARNING: It's important to use the revision linked above. Packages are a bit outdated there, but that's the last revision the old buildscripts format was supported. Since then, I have rewritten most of the buildscripts to a totally different format and the instructions can't be extracted from them that easy.

Last edited by Krejzi; 02-02-2016 at 09:25 PM.
 
Old 02-02-2016, 06:25 PM   #9
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Original Poster
Rep: Reputation: Disabled
Krejzi, thanks for the info and links. I'll definitely take a look. The first link doesn't seem to work.
 
Old 02-02-2016, 09:26 PM   #10
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by GameCodingNinja View Post
Krejzi, thanks for the info and links. I'll definitely take a look. The first link doesn't seem to work.
Should be working now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install 32-bit binaries on 64-bit CentOS? cooltoad Linux - Software 5 01-27-2014 08:56 PM
[SOLVED] CentOS 5.8 64-bit - cannot execute 32-bit binaries jonatan Linux - Software 1 12-12-2012 01:27 AM
[SOLVED] 32 bit binaries do not run on 64 bit machine frznchckn Linux - Software 51 02-28-2011 12:20 PM
[SOLVED] CLFS 64 bit multilib and pure 64 bit pacthes wanted Openumerix Linux From Scratch 1 11-16-2009 12:23 AM
running 64-bit binaries on 32-bit Linux? cyberfishee Linux - Software 5 01-25-2008 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration