Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: libertyernie on March 24, 2009, 06:31:31 PM

Title: Compiling problems in TCL
Post by: libertyernie on March 24, 2009, 06:31:31 PM
I'm having some problems compiling kexec-tools in Tiny Core v1.2. After installing compiletc, I unpacked the source code (from http://ftp.de.debian.org/debian/pool/main/k/kexec-tools/kexec-tools_20080324.orig.tar.gz) and started compiling with ./configure&&make. Unfortunately, I got some errors:
Code: [Select]
mkdir -p purgatory
gcc -lz   --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/entry32.o purgatory/arch/i386/setup-x86.o purgatory/arch/i386/stack.o purgatory/arch/i386/compat_x86_64.o purgatory/arch/i386/purgatory-x86.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/arch/i386/crashdump_backup.o purgatory/sha256.o
/tmp/tcloop/compiletc/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [purgatory/purgatory.ro] Error 1
Apparently, it can't find the zlib libraries, but they seem to be present in /usr/lib thanks to compiletc.
Has anyone else run into this problem?
Title: Re: Compiling problems in TCL
Post by: ^thehatsrule^ on March 24, 2009, 09:11:13 PM
Only the libraries (base) and headers (compiletc) are provided.  The development libraries aren't present, which is why the linker fails.

I don't see another package for the dev files, so maybe it'll be easier just to compile and install zlib first.
Title: Re: Compiling problems in TCL
Post by: Juanito on March 27, 2009, 12:24:42 AM
It's time I had a look at compiletc again - I'll try get around to it in the next few days.
Title: Re: Compiling problems in TCL
Post by: ^thehatsrule^ on March 27, 2009, 04:14:57 PM
Split off-topic discussion to http://forum.tinycorelinux.net/index.php?topic=919.0
Title: Re: Compiling problems in TCL
Post by: Juanito on March 28, 2009, 08:13:39 AM
I added libz.a to compiletc - when compiling zlib the switch "--shared" compiles only the shared libs, but compiling with no switch compiles both static and shared libs - and kexec-tools compiles without errors.

I'll update compiletc and post - the jpeg static libs need adding as well.

Edit: spoke too soon, things work with compiletc.tce, but not with compiletc.tcz  :-\
Title: Re: Compiling problems in TCL
Post by: libertyernie on April 01, 2009, 01:55:34 PM
Thanks for the update to compiletc.tce. I was able to comple kexec-tools. Next step: recompile the kernel! (I've done it for Slax before, so I think I have the general idea.)
Title: Re: Compiling problems in TCL
Post by: Juanito on April 02, 2009, 12:01:18 AM
You're welcome, but you'll notice that if you use compiletc.tcz, kexec-tools will not compile - I'm still thinking about this one...