Problem compiling 32-bit Openssl in 64-bit system

discuss compiling applications for Puppy
Post Reply
Message
Author
Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#1 Post by Scooby »

Tried to compile it for 32 bit on a 64 bit system

ran configure with linux-generic32
Installed musl-i686 package

Problem during linking

/usr/bin/ld: skipping incompatible /usr/lib/musl/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc


Any input on this?

*edit*
Started up a 32 bit linux and of course then I could compile it
Would be nice to know how to do it from a 64 bit

Anyway openssl came out 2,6 Mb stripped
Is that OK or could it be shrunk?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

Your musl toolchain isn't setup right. See:
http://wiki.musl-libc.org/wiki/Getting_started

The easiest way to make the tools work without modifying system variables is to change a line in musl's config.mak
prefix = /usr/local/musl
to
prefix = /usr/local
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#3 Post by Scooby »

Mine is actually /usr/lib/musl and I only had musl 32 bit installed

Code: Select all

file xattr.o 
xattr.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
Were xattr.o resides inside /usr/lib/musl/lib/libc.a

I compiled it on 32-bit linux using exactly the same musl package and
it worked.

I am missing something

Will keep trying...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

Scooby wrote:Mine is actually /usr/lib/musl and I only had musl 32 bit installed

Code: Select all

file xattr.o 
xattr.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
Were xattr.o resides inside /usr/lib/musl/lib/libc.a

I compiled it on 32-bit linux using exactly the same musl package and
it worked.

I am missing something

Will keep trying...
yes - that is why I recommended /usr/local - otherwise you have to set $PATH, $LD_LIBRARY_PATH and possibly other variables

either way you want to use musl-gcc (not just gcc - its a wrapper) as your compiler either by setting $CC or editing makefile or whatever build tool script may automatically try to use gcc instead
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply