Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12824 - [klibc] doesn't build

Attached to Project: Arch Linux
Opened by Massimiliano Brocchini (proc) - Friday, 16 January 2009, 21:22 GMT
Last edited by Jan de Groot (JGC) - Monday, 20 July 2009, 17:47 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture i686
Severity High
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

klibc 1.5.15 doesnt' build with makepkg reporting the following error:

The 'linux' symlink is missing; it should point to a kernel tree
configured for the i386 architecture.
make: *** [linux] Error 1

This happens both on i686 and on the i586 port I'm working on, so it may affect x86_64 too
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 20 July 2009, 17:47 GMT
Reason for closing:  Fixed
Comment by Thomas Bächler (brain0) - Friday, 16 January 2009, 23:56 GMT
Look at the following lines:

_kver=2.6.28-ARCH
and
ln -sf /usr/src/linux-${_kver} linux

You need to make sure the symlink points to an existing linux kernel source (or at least part of it with the relevant headers). The build works fine here.
Comment by Massimiliano Brocchini (proc) - Saturday, 17 January 2009, 10:41 GMT
What do you mean exactly by an "existing linux kernel source (or at least part of it with the relevant headers)"?

I downloaded and untarred linux-2.6.28 sources, but you are symlinking linux-2.6.28-ARCH, so I renamed the directory and build klibc succesfully.
Now I cant build other klibc-* packages because /usr/lib/klibc/include/asm points to asm-x86, but I only have asm-generic in /usr/lib/klibc/include/

Do I need to have linux-2.6.28 sources with ARCH patches applied in order to build klibc-*?
Comment by Thomas Bächler (brain0) - Saturday, 17 January 2009, 11:13 GMT
This should work with any kernel source. klibc doesn't support 2.6.28 yet, so I had to add a patch to add some missing kernel headers. When I install this, asm is a directory, and I actually copy some files there so klcc won't be broken. This is a bit ugly though.
Comment by Massimiliano Brocchini (proc) - Saturday, 17 January 2009, 12:13 GMT
Uhm,

I see this is the relevant part in the PKGBUILD

#ln -sf asm-x86 $startdir/pkg/usr/lib/klibc/include/asm
cp -a linux/arch/x86/include/asm/* $startdir/pkg/usr/lib/klibc/include/asm/

but pacman -Qlp klibc-1.5.15-1-i586.pkg.tar.gz | grep asm gives:

klibc /usr/lib/klibc/include/arch/alpha/machine/asm.h
klibc /usr/lib/klibc/include/arch/arm/klibc/asmmacros.h
klibc /usr/lib/klibc/include/arch/mips/machine/asm.h
klibc /usr/lib/klibc/include/arch/sparc/machine/asm.h
klibc /usr/lib/klibc/include/asm
klibc /usr/lib/klibc/include/asm-generic/
klibc /usr/lib/klibc/include/asm-generic/4level-fixup.h
klibc /usr/lib/klibc/include/asm-generic/Kbuild
klibc /usr/lib/klibc/include/asm-generic/Kbuild.asm
klibc /usr/lib/klibc/include/asm-generic/atomic.h
klibc /usr/lib/klibc/include/asm-generic/audit_change_attr.h
klibc /usr/lib/klibc/include/asm-generic/audit_dir_write.h
klibc /usr/lib/klibc/include/asm-generic/audit_read.h
klibc /usr/lib/klibc/include/asm-generic/audit_signal.h
klibc /usr/lib/klibc/include/asm-generic/audit_write.h
klibc /usr/lib/klibc/include/asm-generic/bitops.h
klibc /usr/lib/klibc/include/asm-generic/bitops/
klibc /usr/lib/klibc/include/asm-generic/bitops/__ffs.h
klibc /usr/lib/klibc/include/asm-generic/bitops/__fls.h
klibc /usr/lib/klibc/include/asm-generic/bitops/atomic.h
klibc /usr/lib/klibc/include/asm-generic/bitops/ext2-atomic.h
klibc /usr/lib/klibc/include/asm-generic/bitops/ext2-non-atomic.h
klibc /usr/lib/klibc/include/asm-generic/bitops/ffs.h
klibc /usr/lib/klibc/include/asm-generic/bitops/ffz.h
klibc /usr/lib/klibc/include/asm-generic/bitops/find.h
klibc /usr/lib/klibc/include/asm-generic/bitops/fls.h
klibc /usr/lib/klibc/include/asm-generic/bitops/fls64.h
klibc /usr/lib/klibc/include/asm-generic/bitops/hweight.h
klibc /usr/lib/klibc/include/asm-generic/bitops/le.h
klibc /usr/lib/klibc/include/asm-generic/bitops/lock.h
klibc /usr/lib/klibc/include/asm-generic/bitops/minix-le.h
klibc /usr/lib/klibc/include/asm-generic/bitops/minix.h
klibc /usr/lib/klibc/include/asm-generic/bitops/non-atomic.h
klibc /usr/lib/klibc/include/asm-generic/bitops/sched.h
klibc /usr/lib/klibc/include/asm-generic/bug.h
klibc /usr/lib/klibc/include/asm-generic/cmpxchg-local.h
klibc /usr/lib/klibc/include/asm-generic/cmpxchg.h
klibc /usr/lib/klibc/include/asm-generic/cputime.h
klibc /usr/lib/klibc/include/asm-generic/device.h
klibc /usr/lib/klibc/include/asm-generic/div64.h
klibc /usr/lib/klibc/include/asm-generic/dma-coherent.h
klibc /usr/lib/klibc/include/asm-generic/dma-mapping-broken.h
klibc /usr/lib/klibc/include/asm-generic/dma-mapping.h
klibc /usr/lib/klibc/include/asm-generic/emergency-restart.h
klibc /usr/lib/klibc/include/asm-generic/errno-base.h
klibc /usr/lib/klibc/include/asm-generic/errno.h
klibc /usr/lib/klibc/include/asm-generic/fcntl.h
klibc /usr/lib/klibc/include/asm-generic/futex.h
klibc /usr/lib/klibc/include/asm-generic/gpio.h
klibc /usr/lib/klibc/include/asm-generic/ide_iops.h
klibc /usr/lib/klibc/include/asm-generic/int-l64.h
klibc /usr/lib/klibc/include/asm-generic/int-ll64.h
klibc /usr/lib/klibc/include/asm-generic/ioctl.h
klibc /usr/lib/klibc/include/asm-generic/iomap.h
klibc /usr/lib/klibc/include/asm-generic/irq_regs.h
klibc /usr/lib/klibc/include/asm-generic/kdebug.h
klibc /usr/lib/klibc/include/asm-generic/libata-portmap.h
klibc /usr/lib/klibc/include/asm-generic/local.h
klibc /usr/lib/klibc/include/asm-generic/memory_model.h
klibc /usr/lib/klibc/include/asm-generic/mm_hooks.h
klibc /usr/lib/klibc/include/asm-generic/mman.h
klibc /usr/lib/klibc/include/asm-generic/mutex-dec.h
klibc /usr/lib/klibc/include/asm-generic/mutex-null.h
klibc /usr/lib/klibc/include/asm-generic/mutex-xchg.h
klibc /usr/lib/klibc/include/asm-generic/page.h
klibc /usr/lib/klibc/include/asm-generic/pci-dma-compat.h
klibc /usr/lib/klibc/include/asm-generic/pci.h
klibc /usr/lib/klibc/include/asm-generic/percpu.h
klibc /usr/lib/klibc/include/asm-generic/pgtable-nopmd.h
klibc /usr/lib/klibc/include/asm-generic/pgtable-nopud.h
klibc /usr/lib/klibc/include/asm-generic/pgtable.h
klibc /usr/lib/klibc/include/asm-generic/poll.h
klibc /usr/lib/klibc/include/asm-generic/resource.h
klibc /usr/lib/klibc/include/asm-generic/rtc.h
klibc /usr/lib/klibc/include/asm-generic/sections.h
klibc /usr/lib/klibc/include/asm-generic/siginfo.h
klibc /usr/lib/klibc/include/asm-generic/signal.h
klibc /usr/lib/klibc/include/asm-generic/statfs.h
klibc /usr/lib/klibc/include/asm-generic/syscall.h
klibc /usr/lib/klibc/include/asm-generic/termios.h
klibc /usr/lib/klibc/include/asm-generic/tlb.h
klibc /usr/lib/klibc/include/asm-generic/topology.h
klibc /usr/lib/klibc/include/asm-generic/uaccess.h
klibc /usr/lib/klibc/include/asm-generic/vmlinux.lds.h
klibc /usr/lib/klibc/include/asm-generic/xor.h

And

stat pkg/usr/lib/klibc/include/asm confirms that asm is still a symlink, but now to asm-i386:

File: `pkg/usr/lib/klibc/include/asm' -> `asm-i386'

I can solve the problem by hand, but I think this is something you may want to check.

May I dare to ask you to modify the PKBUILD to automatically download a kernel source if the directory /usr/src/linux-${_kver} doens't exist? I'm asking this because I think abs makeworld should require minimal user intervention and tools like pacbuilder (http://code.google.com/p/pacbuilder/) requires that packages can be built without any user interaction from abs.

Thanks for your work for the archlinux community and thanks for your patience.
Comment by tigrmesh (tigrmesh) - Sunday, 22 March 2009, 03:04 GMT
klibc 1.5.15-1 built fine for me on i686 and for Eric Bélanger on x86_64. (bug day)
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 04 July 2009, 05:14 GMT
Builds fine here (2.6.30). why this task is still open?

Loading...