LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Adding 32-bit binaries to your pure 64-bit build (https://www.linuxquestions.org/questions/linux-from-scratch-13/adding-32-bit-binaries-to-your-pure-64-bit-build-4175568152/)

GameCodingNinja 01-28-2016 09:28 AM

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?

jamison20000e 01-29-2016 02:33 AM

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 :rolleyes::hattip:
______________________
F-Droid

Keith Hedger 01-29-2016 05:26 AM

Quote:

Originally Posted by jamison20000e (Post 5489123)
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 :rolleyes::hattip:
______________________
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.

GameCodingNinja 01-29-2016 03:45 PM

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.

ReaperX7 01-30-2016 06:26 AM

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.

GameCodingNinja 01-30-2016 09:43 AM

Wow, thanks Reaper. Supporting both is a lot more intense then I ever imagined.

ReaperX7 01-30-2016 09:50 AM

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.

Krejzi 02-02-2016 02:27 PM

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.

GameCodingNinja 02-02-2016 06:25 PM

Krejzi, thanks for the info and links. I'll definitely take a look. The first link doesn't seem to work.

Krejzi 02-02-2016 09:26 PM

Quote:

Originally Posted by GameCodingNinja (Post 5491804)
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.


All times are GMT -5. The time now is 08:53 AM.