FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 03-26-2010, 04:50 AM
xinglin
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

Hi,

I am Xing, a PHD candidate in University of Utah. I am trying to compile
and install an OpenVZ kernel in FEDORA8, but one error prevents me. The
error is "No build ID note found in /var/tmp/kernel***". I have tried
several ways to solve it but still failed. I introduced what I did to solve
this problem and hope to get some help from you.

The procedure I did to build a kernel RPM from SRPM.
1). Install SCR RPM

-bash-3.2$ sudo rpm -ihv
~/openvz/ovzkernel-2.6.18-128.2.1.el5.028stab064.7.src.rpm
1vzkernel #######################################[100%]

2). Change buildid in kernel-ovz.spec

-bash-3.2$ vim ./SPECS/kernel-ovz.spec
%define buildid .emulab_openvz_migration //for easy distinguish.


3). Prepare kernel source tree.
-bash-3.2$ sudo rpmbuild -bp --target=`uname -m` kernel-ovz.spec
Building target platforms: x86_64
Building for target x86_64

4). create my own patch
I).
-bash-3.2$ sudo cp -r ./BUILD/ovzkernel-2.6.18/linux-2.6.18.x86_64
./BUILD/ovzkernel-2.6.18.orig
-bash-3.2$ sudo cp -r BUILD/ovzkernel-2.6.18.orig
BUILD/ovzkernel-2.6.18.new


II). -bash-3.2$ sudo vim BUILD/ovzkernel-2.6.18.new/kernel/cpt/cpt_files.h

#define check_one_vfsmount(mnt)
(strcmp(mnt->mnt_sb->s_type->name, "rootfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "vzfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "ext3") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "ext2") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "simfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "unionfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "tmpfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "devpts") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "proc") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "sysfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "nfs") != 0 &&
strcmp(mnt->mnt_sb->s_type->name, "binfmt_misc") != 0)

III). Set LDFLAGS(I tried to set in some experiments)
-bash-3.2$ sudo vim BUILD/ovzkernel-2.6.18.new/arch/x86_64/Makefile
LDFLAGS := -m elf_x86_64 --build-id

IV). create the patch(patch can be reused. patch locates at
~/linux-2.6.18-nfs.patch)
-bash-3.2$ cd BUILD
-bash-3.2$ diff -uNrp ovzkernel-2.6.18.orig ovzkernel-2.6.18.new >
~/linux-2.6.18-openvz-nfs.patch


V). copy to $TOPDIR/SOURCE
-bash-3.2$ sudo cp ~/linux-2.6.18-openvz-nfs.patch SOURCES/


5). change kernel spec file.
sudo vim kernel-ovz.spec

I). add new patch into it.

Patch120000: linux-2.6.18-openvz-nfs.patch
# End VZ patches

II). add patch command

%patch110008 -p1

%patch120000 -p1
%endif

6). set LDFLAGS in cmd
-bash-3.2$ echo $LDFLAGS
--build-id
7). Rebuild kernel RPMs.
-bash-3.2$ sudo rpmbuild -bb --with baseonly --without debuginfo
--target=`uname -m` ./SPECS/kernel-ovz.spec
Building target platforms: x86_64
Building for target x86_64
...

Without setting --build-id at
BUILD/ovzkernel-2.6.18.new/arch/x86_64/Makefile, the error is as following:
"extracting debug info from
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/usr/src/kernels/2.6.18-128.2.1.el5.emulab_openvz_migration-x86_64/scripts/genksyms/genksyms
extracting debug info from
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
*** ERROR: No build ID note found in
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
xargs: stat: terminated by signal 13
error: Bad exit status from /var/tmp/rpm-tmp.5481 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.5481 (%install)"

If I set --build-id at BUILD/ovzkernel-2.6.18.new/arch/x86_64/Makefile,
the error is as following:
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
/bin/sh: line 1: 11125 Segmentation fault ld -m elf_x86_64 --build-id
-r -o drivers/i2c/built-in.o drivers/i2c/busses/built-in.o
drivers/i2c/chips/built-in.o drivers/i2c/algos/built-in.o
make[2]: *** [drivers/i2c/built-in.o] Error 139
make[1]: *** [drivers/i2c] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
make: *** [drivers] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.48864 (%build)

2). I also tried to add "%define _missing_build_ids_terminate_build 0" or
"%define debug_package %{nil}" at the top of SPECS/kernel-ovz.spec, but it
does not work and still reports "No BUILD ID" error.

3). If I tried to change $(LD) to $(CC) in /linux/Makefile(The top
Makefile in Linux source tree), but it reports lots of "undefined
reference" errors.
==
arch/x86_64/lib/lib.a(thunk.o): In function `__up_wakeup':
(.sched.text+0xdf): undefined reference to `__up'
/usr/lib64/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
(.text+0x1d): undefined reference to `__init_array_end'
/usr/lib64/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
(.text+0x4a): undefined reference to `__init_array_start'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o: In function
`__do_global_ctors_aux':
crtstuff.c.text+0x6): relocation truncated to fit: R_X86_64_32 against
`.ctors'
collect2: ld returned 1 exit status

4). Add LDFLAGS+=--build-id in kernel-ovz.spec before %build and %install.
But it still reported "No BUILD ID" errors(If I remember correctly).


I really hope to receive any suggestions to solve this problem. Thanks for
your help.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-26-2010, 06:00 AM
xinglin
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

I find in all error cases, the error is because of the same file:
/linux/lib/ts_kmp.ko. Then I looked into the /linux-2.6.18.x86_64/lib and
found there were no object files in that directory. But I can find
genksyms.o at /linux-2.6.18.x86_64/scripts/genksyms/genksyms/. So, it looks
the reason is there is no object file for ts_kmp.

==
extracting debug info from
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/usr/src/kernels/2.6.18-128.2.1.el5.emulab_openvz_migration-x86_64/scripts/genksyms/genksyms
extracting debug info from
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
*** ERROR: No build ID note found in
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
==
I choose no to most of the options when run "make oldconfig". In
/linux/.config, TEXTSEARCH_KMP is set to be m. So, I think that's why there
is no object file for ts_kmp in /lib. I will try to set yes to all options
when run "make oldconfig" to see what difference it will make tomorrow.

#
# Library routines
#
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_DEC16=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 04:45 AM
xinglin
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

On Thu, 25 Mar 2010 23:50:37 -0600, xinglin <xinglin@cs.utah.edu> wrote:
> the error is as following:
> "extracting debug info from
>
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/usr/src/kernels/2.6.18-128.2.1.el5.emulab_openvz_migration-x86_64/scripts/genksyms/genksyms
> extracting debug info from
>
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
> *** ERROR: No build ID note found in
>
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/ts_kmp.ko
> xargs: stat: terminated by signal 13
> error: Bad exit status from /var/tmp/rpm-tmp.5481 (%install)
>
>
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.5481 (%install)"

-bash-3.2$ cd
/var/tmp/kernel-2.6.18-128.2.1.el5.emulab_openvz_migration-root/lib/modules/2.6.18-128.2.1.el5.emulab_openvz_migration/kernel/lib/
-bash-3.2$ ls -l
total 248K
-rwxr--r-- 1 root root 37026 2010-03-26 23:00 crc16.ko
-rwxr--r-- 1 root root 37074 2010-03-26 23:00 crc-ccitt.ko
-rwxr--r-- 1 root root 37074 2010-03-26 23:00 crc-itu-t.ko
drwxr-xr-x 2 root root 4096 2010-03-26 23:00 reed_solomon
-rwxr--r-- 1 root root 37509 2010-03-26 23:00 ts_bm.ko
-rwxr--r-- 1 root root 39249 2010-03-26 23:00 ts_fsm.ko
-rwxr--r-- 1 root root 37262 2010-03-26 23:00 ts_kmp.ko
drwxr-xr-x 2 root root 4096 2010-03-26 23:00 zlib_deflate

It shows that ts_kmp.ko is created. So probably in that binary file, it
does not include a section called .note.gnu.build-id. But the question is
why other binaries have included that section?
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 03:45 PM
Björn Persson
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

xinglin wrote:
> Hi,
>
> I am Xing, a PHD candidate in University of Utah. I am trying to compile
> and install an OpenVZ kernel in FEDORA8, but one error prevents me. The
> error is "No build ID note found in /var/tmp/kernel***". I have tried
> several ways to solve it but still failed. I introduced what I did to solve
> this problem and hope to get some help from you.

Hello Xing! I know nothing about OpenVZ and only a little about compiling
Linux, but I thought I'd point out that Fedora 8 was retired over a year ago.
No bugs will get fixed in Fedora 8 anymore, so it's pretty much off-topic on
this list. I would suggest trying with Fedora 12 instead. I think you're more
likely to get replies if you can reproduce the problem on a current version of
Fedora.

> ~/openvz/ovzkernel-2.6.18-128.2.1.el5.028stab064.7.src.rpm

I see "el5" in there. Have you tried compiling it on RHEL 5 or CentOS 5?

Björn Persson
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 04:19 PM
xinglin
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

On Sat, 27 Mar 2010 17:45:01 +0100, Björn Persson
<bjorn@xn--rombobjrn-67a.se> wrote:
> xinglin wrote:
>> Hi,
>>
>> I am Xing, a PHD candidate in University of Utah. I am trying to
compile
>> and install an OpenVZ kernel in FEDORA8, but one error prevents me. The
>> error is "No build ID note found in /var/tmp/kernel***". I have tried
>> several ways to solve it but still failed. I introduced what I did to
>> solve
>> this problem and hope to get some help from you.
>
> Hello Xing! I know nothing about OpenVZ and only a little about
compiling
> Linux,

OpenVZ is based on Linux Kernel. So, when the disk is partitioned suitably
in the host OS, I think there is no big difference(Apply some patches and
make config) when compiling OpenVZ kernel and Linux Kernel.

> but I thought I'd point out that Fedora 8 was retired over a year
> ago.
> No bugs will get fixed in Fedora 8 anymore, so it's pretty much
off-topic
> on
> this list. I would suggest trying with Fedora 12 instead. I think you're
> more
> likely to get replies if you can reproduce the problem on a current
> version of
> Fedora.

The fact is Emulab does not have Fedora12 now. We just have Fedora8 and
Fedora10.
I will talk with the Emulab administrators about this.

>> ~/openvz/ovzkernel-2.6.18-128.2.1.el5.028stab064.7.src.rpm
>
> I see "el5" in there. Have you tried compiling it on RHEL 5 or CentOS 5?

Not yet. Actually, one of stuffs in our group succeeded to use rpmbuild to
build OpenVZ kernel in Fedora8. But unfortunately, he forgot how he solved
this. The reason I wanted to build a new openvz kernel based on his
image(Fedora8 with OpenVZ supported) is I do not need to repartition the
disk and install utilities. In OpenVZ user guide, it also uses Fedora core
4 as an example to show how to install the host OS. We do have Redhat 9.0
image in our testbed. I will try to compile on Redhat 9.0 or Fedora10 using
rpmbuild. But I think I will try to compile in the traditional way first.
Thanks very much.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 04:27 PM
Garrett Holmstrom
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

On 3/27/2010 12:19, xinglin wrote:
> The fact is Emulab does not have Fedora12 now. We just have Fedora8 and
> Fedora10.
> I will talk with the Emulab administrators about this.

If the lab can't keep up with updates to Fedora releases it should
seriously try going with a distribution with longer term support, such
as CentOS. Fedora 8 lost support over a year ago, and RH 9 lost support
almost six years ago.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 03-27-2010, 04:50 PM
xinglin
 
Default No Build ID error when building new OpenVZ kernel in FEDORA8

On Sat, 27 Mar 2010 12:27:45 -0500, Garrett Holmstrom
<gholms@fedoraproject.org> wrote:
> On 3/27/2010 12:19, xinglin wrote:
>> The fact is Emulab does not have Fedora12 now. We just have Fedora8 and
>> Fedora10.
>> I will talk with the Emulab administrators about this.
>
> If the lab can't keep up with updates to Fedora releases it should
> seriously try going with a distribution with longer term support, such
> as CentOS. Fedora 8 lost support over a year ago, and RH 9 lost support

> almost six years ago.

Get it. Thanks for this information.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 05:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org