You are not logged in.

#1 2013-07-30 20:53:59

Legogris
Member
Registered: 2012-09-11
Posts: 38

makepkg fails to build kernel

This is my first time building the kernel myself. Following this wiki page:
https://wiki.archlinux.org/index.php/Ke … ild_System

makepkg or makepkg -i fails with this output:

[...]
Hunk #1 succeeded at 56 with fuzz 2 (offset -2 lines).
==> Starting build()...
make: *** INTERNAL: readdir: Not a directory
. Stop.
==> ERROR: A failure occured in build().
Aborting...

Subsequent calls to makepkg looks like this: http://ix.io/6Xf

Additional info:
* Linux 3.10.3-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux
* Trying to build 3.10.

I made a bug report here after consulting people on #archlinux here: https://bugs.archlinux.org/task/36337

As you can see it's closed since it's intended behavior. What did I miss?

Offline

#2 2013-07-30 22:42:01

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,895
Website

Re: makepkg fails to build kernel

rm -rf src/ and then makepkg finishes without errors.

What does this tell you? And if you've made a package, why are you requesting assistance?

The point of the prepare() function, is to make the sources ready for the build() function. In this case, a file was created in the source directory due to a patch. When you next ran makepkg, it extracted the contents of the source archive, overriding the previously extracted and patched sources of the first 'makepkg', and then applied the patches to the newly extracted files. Once it encountered the file that was created during the last prepare() function it didn't know what to do, and flagged an error, causing the build to fail. I recommend that you use a clean chroot for your building purposes. Not only will you avoid these problems, you will also prevent packages compiling against libraries that you may not want them to build against. (which prevents headaches down the line after you remove package X, and then find out that package Y was greedy and compiled against package X's libraries, even though you didn't explicitly tell it to)

Incidentally, makepkg and makepkg -i are basically the same thing, if one fails during the prepare, build, or package functions, the other will too. The only difference is that -i tells makepkg to try and install the finished package(s). If "makepkg" fails by itself, "makepkg -i" will fare no better.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-07-31 08:39:31

Legogris
Member
Registered: 2012-09-11
Posts: 38

Re: makepkg fails to build kernel

WorMzy wrote:

rm -rf src/ and then makepkg finishes without errors.

What does this tell you? And if you've made a package, why are you requesting assistance?

What I meant was that it finished without errors but didn't end up with a built package. I admit being a bit tired last night, so I don't really know how or if that particular part happened. Maybe I accidentally built with a modified PKGBUILD that exited prematurely without me realizing. Today I scrapped everything and tried again and can't get makepkg to finish without errors. See below.

WorMzy wrote:

I recommend that you use a clean chroot for your building purposes. Not only will you avoid these problems, you will also prevent packages compiling against libraries that you may not want them to build against. (which prevents headaches down the line after you remove package X, and then find out that package Y was greedy and compiled against package X's libraries, even though you didn't explicitly tell it to)

Incidentally, makepkg and makepkg -i are basically the same thing, if one fails during the prepare, build, or package functions, the other will too. The only difference is that -i tells makepkg to try and install the finished package(s). If "makepkg" fails by itself, "makepkg -i" will fare no better.

Doing the following gives me the exact same results ($CHROOT is a path in my local user's home dir):

sudo mkarchchroot $CHROOT/root base-devel
sudo arch-nspawn $CHROOT/root pacman -Syu
ABSROOT=. abs core/linux
cd core/linux 
sudo makechrootpkg -c -r $CHROOT

Last edited by Legogris (2013-07-31 08:50:57)

Offline

#4 2013-07-31 10:00:42

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,895
Website

Re: makepkg fails to build kernel

I can't reproduce that here. (I'm assuming you mean the "Not a directory" build error, rather than the pre-applied patch error)


Could you tell us a bit more about the machine you're building on (filesystems [mount], free space [df -h], amount of RAM [free -m], type of processor[cat /proc/cpuinfo])?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2013-07-31 10:18:39

Legogris
Member
Registered: 2012-09-11
Posts: 38

Re: makepkg fails to build kernel

Yeah, it's weird. I just tried the exact same procedure on my other desktop Arch machine with different hardware but very similar setup. It looks like it's building fine there.

This is a 2013 Macbook Air. Regarding my home dir being hfsplus I haven't had many issues with that before, and I did redo the whole procedure from scratch a couple of times with the same results.

mount

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=3970628k,nr_inodes=992657,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda6 on / type ext3 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
/dev/sda5 on /boot type ext2 (rw,relatime)
/dev/sda4 on /home type hfsplus (rw,relatime,umask=22,uid=0,gid=0,nls=utf8)

free -m

             total       used       free     shared    buffers     cached
Mem:          7771        988       6783          0         29        291
-/+ buffers/cache:        667       7104
Swap:            0          0          0

df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        90G  9.0G   77G  11% /
dev             3.8G     0  3.8G   0% /dev
run             3.8G  564K  3.8G   1% /run
tmpfs           3.8G     0  3.8G   0% /dev/shm
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs           3.8G  436K  3.8G   1% /tmp
/dev/sda5      1007M   22M  918M   3% /boot
/dev/sda4       280G   20G  261G   7% /home

cat /proc/cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 69
model name	: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
stepping	: 1
microcode	: 0x11
cpu MHz		: 759.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips	: 4601.54
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 69
model name	: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
stepping	: 1
microcode	: 0x11
cpu MHz		: 759.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips	: 4601.54
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 69
model name	: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
stepping	: 1
microcode	: 0x11
cpu MHz		: 759.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips	: 4601.54
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 69
model name	: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
stepping	: 1
microcode	: 0x11
cpu MHz		: 759.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 2
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips	: 4601.54
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

Offline

#6 2013-07-31 10:59:19

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,895
Website

Re: makepkg fails to build kernel

Google suggests that there have been problems with readdir on hfs (http://support.apple.com/kb/TA21420), though I don't know if this is still relevant and/or related to the problem you're experiencing. You could test whether it's a filesystem bug by using the following suggestion: https://wiki.archlinux.org/index.php/Tm … pile_times


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2013-07-31 11:03:38

arokh
Member
Registered: 2013-05-30
Posts: 35

Re: makepkg fails to build kernel

HFS is case preserving, not case sensitive. Should not be used for Linux source files.

Offline

#8 2013-07-31 11:11:03

Legogris
Member
Registered: 2012-09-11
Posts: 38

Re: makepkg fails to build kernel

You're right, it was hfsplus. I guess this will be the final push for me migrating my home dir to zfs instead.

Offline

Board footer

Powered by FluxBB