WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling problems in TCL  (Read 5018 times)

Offline libertyernie

  • Newbie
  • *
  • Posts: 11
Compiling problems in TCL
« 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?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Compiling problems in TCL
« Reply #1 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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Compiling problems in TCL
« Reply #2 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.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Compiling problems in TCL
« Reply #3 on: March 27, 2009, 04:14:57 PM »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Compiling problems in TCL
« Reply #4 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  :-\
« Last Edit: March 28, 2009, 10:45:52 AM by Juanito »

Offline libertyernie

  • Newbie
  • *
  • Posts: 11
Re: Compiling problems in TCL
« Reply #5 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.)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Compiling problems in TCL
« Reply #6 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...